Esound cvs bug in alsa code



Guten Tag Alles,

	esd in cvs kept segfaulting on me when I compiled it to use ALSA
(0.5.9).  Turns out an integer wasn't being initialized, so it was trying to
read array element 400-million-something from an array with only two
elements.  And the kernel said "No!" ;-)

	Attached is a one-line fix for the problem.

Have fun!
- Bibek
? audio_alsa.diff
? blee
? blee.c
? test-blee.c
? test-blee
? test-blee.h
? docs/Makefile
Index: audio_alsa.c
===================================================================
RCS file: /cvs/gnome/esound/audio_alsa.c,v
retrieving revision 1.14
diff -u -w -r1.14 audio_alsa.c
--- audio_alsa.c	2000/09/26 17:00:25	1.14
+++ audio_alsa.c	2000/10/08 17:30:51
@@ -358,6 +358,7 @@
     }
 
 #ifdef ALSA_5_API
+    status.channel = SND_PCM_CHANNEL_PLAYBACK;
     ret = snd_pcm_channel_status( alsa_sound_handle, &status );
     if( ret ) {
                   if( driver_trace ) fprintf( stderr, "error: %s: in snd_pcm_channel_status\n", snd_strerror(ret) );


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]