Description of problem: xvidtune crashes. gcc fortify backtrace produced. Version-Release number of selected component (if applicable): xorg-x11-server-utils-1.0.1-1.2 How reproducible: always Steps to Reproduce: 1. run xvidtune Actual results: crash Expected results: no crash Additional info: glibc detects a buffer overflow in the sprintf. A 10-byte buffer is not big enough to contain a number that large. (gdb) frame 11 #11 0x0804af70 in CreateTyp (form=0x8fc5100, findex=PixelClock, w1name=Variable "w1name" is not available. ) at xvidtune.c:968 968 (void) sprintf(buf, "%6.2f", (float)AppRes.field[findex].val / 1000.0); (gdb) l 963 Widget wids[3]; 964 char buf[10]; 965 966 wids[0] = XtCreateWidget (w1name, labelWidgetClass, form, NULL, 0); 967 if (findex >= PixelClock && findex <= VSyncRate) 968 (void) sprintf(buf, "%6.2f", (float)AppRes.field[findex].val / 1000.0); 969 else 970 (void) sprintf (buf, "%5d", AppRes.field[findex].val); 971 wids[1] = XtVaCreateWidget (w2name, labelWidgetClass, 972 form, XtNlabel, buf, NULL); (gdb) p buf $5 = "1889173.9" # note 9 bytes + \0 used; no space for second decimal place
Fixed in 7.1-4 and later.