Format string bug in ppmtolss16

Bug #781930 reported by Emanuel Bronshtein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
syslinux (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: syslinux

/usr/bin/ppmtolss16 have format string bug .

test case :
emanuel@emanuel-desktop /tmp>>mkdir %999999999999999s
emanuel@emanuel-desktop /tmp>>/tmp/%999999999999999s/../../usr/bin/ppmtolss16 < /home/emanuel/Download/lantern.ppm
Integer overflow in format string for prtf at /tmp/%999999999999999s/../../usr/bin/ppmtolss16 line 297.

I take the picture from :
http://cms.brookes.ac.uk/staff/SharonCurtis/teaching/archives/fp/imageplay/images/lantern.ppm

the bug can be found at :
if ( $lost ) {
    printf STDERR
 "$0: Warning: color palette truncated (%d colors ignored)\n", $lost;
}

fix can be :
printf STDERR "%s: Warning: color palette truncated (%d colors ignored)\n", $0 , $lost;

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.