From f1ff17b65a2013d61fcdd4e25e2a9fecee07d5fc Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 27 Apr 2005 03:38:33 +0000 Subject: Only process the var_args argument to open() if flags contain O_CREAT. This avoids a bus error crash when using esddsp. PR: 80382 --- audio/esound/Makefile | 2 +- audio/esound/files/patch-esddsp.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 audio/esound/files/patch-esddsp.c (limited to 'audio') diff --git a/audio/esound/Makefile b/audio/esound/Makefile index d94f866..36f660d 100644 --- a/audio/esound/Makefile +++ b/audio/esound/Makefile @@ -7,7 +7,7 @@ PORTNAME= esound PORTVERSION= 0.2.35 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= audio MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/0.2 diff --git a/audio/esound/files/patch-esddsp.c b/audio/esound/files/patch-esddsp.c new file mode 100644 index 0000000..c1175da --- /dev/null +++ b/audio/esound/files/patch-esddsp.c @@ -0,0 +1,18 @@ +--- esddsp.c.orig Tue Apr 26 22:41:23 2005 ++++ esddsp.c Tue Apr 26 22:42:04 2005 +@@ -223,9 +223,12 @@ open (const char *pathname, int flags, . + + dsp_init (); + +- va_start (args, flags); +- mode = va_arg (args, mode_t); +- va_end (args); ++ if ((flags & O_CREAT) != 0) ++ { ++ va_start (args, flags); ++ mode = va_arg (args, int); ++ va_end (args); ++ } + + if (!strcmp (pathname, "/dev/dsp")) + { -- cgit v1.1