[pulseaudio-tickets] [PulseAudio] #27: padsp has access wrapper doesn't check for NULL, breaks "padsp firefox" on ubuntu
PulseAudio
trac-noreply at tango.0pointer.de
Wed Aug 30 08:36:18 PDT 2006
#27: padsp has access wrapper doesn't check for NULL, breaks "padsp firefox" on
ubuntu
--------------------------+-------------------------------------------------
Reporter: alon | Owner: lennart
Type: defect | Status: new
Priority: normal | Milestone:
Component: clients | Severity: major
Keywords: padsp access |
--------------------------+-------------------------------------------------
Hi,
Short summary:
trying "padsp firefox" failed, gdb discovered that the failure was in
access. I'll spare you the stacktrace - the crux of it is that pathname
was ==NULL, and padsp failed in the call to strcmp.
Solution:
this is the unified diff patch I used to fix it. After applying it I
successfully used "padsp firefox" to play some music (using the mplayer
embeddable plugin for firefox).
--- pulseaudio-0.9.5/src/utils/padsp.c 2006-08-19 00:29:26.000000000
+0300
+++ pulseaudio-0.9.5-alon/src/utils/padsp.c 2006-08-29
01:36:30.010620500 +0300
@@ -2122,7 +2122,12 @@
int access(const char *pathname, int mode) {
debug(DEBUG_LEVEL_VERBOSE, __FILE__": access(%s)\n", pathname);
-
+ if (pathname == NULL) {
+ // according to the man page from ubuntu the closest error
condition:
+ // EFAULT pathname points outside your accessible address space
+ errno = EFAULT;
+ return -1;
+ }
if (strcmp(pathname, "/dev/dsp") != 0 &&
strcmp(pathname, "/dev/adsp") != 0 &&
strcmp(pathname, "/dev/sndstat") != 0 &&
--
Ticket URL: <http://www.pulseaudio.org/ticket/27>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server
More information about the pulseaudio-bugs
mailing list