Comment 67 for bug 282939

Revision history for this message
Jon Hornstein (jon-hornstein) wrote : Re: gnusound crashes X session immediately on launch (Affects Intrepid, Jaunty, Karmic)

Just my 2 cents worth.

Aisano's crash dump attached on 2009-09-20 #58 in the activity log

/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7192da8]
/lib/tls/i686/cmov/libc.so.6[0xb7190eb0]
/lib/tls/i686/cmov/libc.so.6[0xb71907b7]
/lib/tls/i686/cmov/libc.so.6(__snprintf_chk+0x34)[0xb71906a4]
/usr/bin/gnusound.real(draw_mi/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7192da8]
/lib/tls/i686/cmov/libc.so.6[0xb7190eb0]
/lib/tls/i686/cmov/libc.so.6[0xb71907b7]
/lib/tls/i686/cmov/libc.so.6(__snprintf_chk+0x34)[0xb71906a4]
/usr/bin/gnusound.real(draw_mixer_sliders+0x2f5)[0x806f6e5]
xer_sliders+0x2f5)[0x806f6e5]

This pointed to the function "draw_mixer_sliders" as a culprit.

The only snprintf in the function superficially seems broken!

Without building the code with approprate asserts etc

            if(have_room_for_text)
                snprintf(s, 128, "%d", j + 1);

where s is an 8 byte buffer. The code should read:

            if(have_room_for_text)
                snprintf(s, sizeof(s), "%d", j + 1);

Assumming j never gets over 8 digits the existing code would seem to be ok.