Comment 89 for bug 282939

Revision history for this message
Aisano (info-ais-sanmarino) wrote : Re: gnusound crashes X session immediately on launch (Affects Intrepid, Jaunty, Karmic)

Thank you , Alexey Kotlyarov, I think this was the information I needed.

After downloading "build-dep gnusound" I was able to compile gnusound (well, I had to remove a couple of GTK_DISABLE_DEPRECATED, otherwise it would not compile).

The problem obviously is the one Jon Hornstein discovered on 2010-02-09 and Pascal confirmed on 2010-02-24, namely a wrong buffer length in draw.c (line 720). If it was fixed the fix obviously never reached the Ubuntu 10.04 branch.

After I had applied the fix suggested by Jon Hornstein gnusound did not crash any more. The interesting thing is that the number of audio channels on my computer is 2, so it has no chance of overrunning an 8 character buffer; but obviously with the "O1" or "O2" compiler options snprintf generates a buffer overrun failure even if it's not necessary. Maybe to apply the "fail early" principle. Might be a good idea but I could not confirm it. (It does not happen with the "O0" optimization flag.)

I attach a not quite minimalistic patch -- I had to format the code a bit to see what is happening. If a one-line patch such as Jon's is desirable I can provide it. (I have had no luck yet in doing anything useful with gnusound but I suppose that is normal; the manual says "GNUsound is not for everyone".)

The Ubuntu package list names "Marc Dequènes (Duck)" as the maintainer for gnusound but he does not seem to be on this bug's notification list (or maybe under a different name). If he is not active at the moment somebody else might be able to trigger a patch, maybe even an SRU for Ubuntu 10.04, as the bug seems to make gnusound unusable for those who are affected.