summaryrefslogtreecommitdiff
path: root/audio/csound4/patches
diff options
context:
space:
mode:
authorben <ben@pkgsrc.org>2005-11-09 06:35:25 +0000
committerben <ben@pkgsrc.org>2005-11-09 06:35:25 +0000
commitf7842951ec5a86e369dc0beebb8d2dadc4fc9534 (patch)
treed794ca1b457c2faa410e488be57c569f4d861e4a /audio/csound4/patches
parentde1418c25283d82bb5a085fb3c413c7f3195cc61 (diff)
downloadpkgsrc-f7842951ec5a86e369dc0beebb8d2dadc4fc9534.tar.gz
Fix csound to only dereference skipinit when it is not NULL. csound's
malloc set it to NULL, and it was never initialized. This threw SIGSEGV at performance of a score with GEN01.
Diffstat (limited to 'audio/csound4/patches')
-rw-r--r--audio/csound4/patches/patch-af22
-rw-r--r--audio/csound4/patches/patch-ag13
2 files changed, 35 insertions, 0 deletions
diff --git a/audio/csound4/patches/patch-af b/audio/csound4/patches/patch-af
new file mode 100644
index 00000000000..9ae33e79196
--- /dev/null
+++ b/audio/csound4/patches/patch-af
@@ -0,0 +1,22 @@
+$NetBSD: patch-af,v 1.1 2005/11/09 06:35:25 ben Exp $
+
+--- csound/soundin.c.orig 2005-04-10 02:43:07.000000000 -0700
++++ csound/soundin.c
+@@ -204,7 +204,7 @@ int sndgetset(SOUNDIN *p) /* core
+ strsets[filno])
+ strcpy(soundiname, strsets[filno]);
+ else sprintf(soundiname,"soundin.%ld",filno); /* soundin.filno */
+- if ((int) *p->skipinit != 0) {
++ if (p->skipinit != NULL && (int) *p->skipinit != 0) {
+ if (strcmp(p->sfname,soundiname)) {
+ printf("error: cannot tie to a new soundfile\n");
+ return -1;
+@@ -909,7 +909,7 @@ void sndinset(SOUNDIN *p) /* init rou
+ if (p->fdch.fd) { /* if file already open, close it */
+ /* RWD: it is not safe to assume all compilers init this to 0 */
+ /* (IV: but it is allocated with mcalloc...) */
+- if ((int) *p->skipinit == 0) {
++ if (p->skipinit != NULL && (int) *p->skipinit == 0) {
+ /* reload the file */
+ reinit++; close(p->fdch.fd);
+ }
diff --git a/audio/csound4/patches/patch-ag b/audio/csound4/patches/patch-ag
new file mode 100644
index 00000000000..e2cfccd32d4
--- /dev/null
+++ b/audio/csound4/patches/patch-ag
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.1 2005/11/09 06:35:25 ben Exp $
+
+--- csound/diskin.c.orig 2005-03-16 09:08:15.000000000 -0800
++++ csound/diskin.c
+@@ -267,7 +267,7 @@ void newsndinset(SOUNDINEW *p) /*
+ /* should go in SOUNDINEW struct eventually */
+ long snewbufsize = SNDINEWBUFSIZ;
+
+- if (*p->skipinit != FL(0.0)) return;
++ if (p->skipinit != NULL && *p->skipinit != FL(0.0)) return;
+ if (skiptime < 0) {
+ warning(Str(X_1460,"negative skip time, substituting zero."));
+ skiptime = FL(0.0);