cfdisk crashes if terminal size is too small

Bug #9999 reported by Danilo Piazzalunga
8
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Fix Released
Medium
LaMont Jones

Bug Description

Hello,

I've tried to run cfdisk in a narrow (less than 40 columns) gnome-terminal window,
and cfdisk crashed.

If the user doesn't have rights to read the device, the crash doesn't occur, because
the program merely displays an error message. It can be reproduced only when
actually
seeing the partition layout of a device.

The problem is caused by some (unsafe) usage of sprintf. The patch I'm going to
attach
changes most unsafe sprintf calls to snprintf, and it looks like the bug is solved.

The considered util-linux version is 2.12h-3ubuntu1.

Revision history for this message
Danilo Piazzalunga (danilopiazza) wrote :

Created an attachment (id=718)
Changes unsafe sprintf calls to snprintf

This is the patch against util-linux 2.12h-3ubuntu1 for cfdisk.

Revision history for this message
LaMont Jones (lamont) wrote :

Fixed in 2.12p-1ubuntu1

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/9999

tags: added: iso-testing
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu Package testing tracker.

A list of all reports related to this bug can be found here:
http://packages.qa.ubuntu.com/qatracker/reports/bugs/9999

tags: added: package-qa-testing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.