Patch Submission for esound-0.2.32

Boris Buegling boris at icculus.org
Mon Mar 22 13:12:47 PST 2004


See attached patch.
-- 
Boris Buegling <boris at icculus.org>

-------------- next part --------------
Submitted By: Boris Buegling <boris at icculus.org>
Date: 2003-03-22
Initial Package Version: 0.2.32
Origin: None
Description: Both the SDL alsa-driver and esound use the environment variable
AUDIODEV, unfortunately for completely different purposes. If the AUDIODEV
variable is set and contains no slashes, esound will segfault. This patch
introduces a second check, which prevents this.

diff -Naur esound-0.2.32/util.c esound-0.2.32.foo/util.c
--- esound-0.2.32/util.c	2003-08-01 15:25:14.000000000 +0200
+++ esound-0.2.32.foo/util.c	2004-03-22 21:52:50.838188472 +0100
@@ -31,7 +31,10 @@
 			audiodev = "";
 		} else {
 			audiodev = strrchr(audiodev, '/');
-			audiodev++;
+			if (!audiodev)
+				audiodev = "";
+			else
+				audiodev++;
 		}
 		dirname = malloc(strlen(audiodev) + sizeof("/tmp/.esd"));
 		strcpy(dirname, "/tmp/.esd");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/patches/attachments/20040322/261df705/attachment.sig>


More information about the patches mailing list