pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/csound4 Fix csound to only dereference skipinit ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b07ffdf9bbfc
branches:  trunk
changeset: 502818:b07ffdf9bbfc
user:      ben <ben%pkgsrc.org@localhost>
date:      Wed Nov 09 06:35:25 2005 +0000

description:
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:

 audio/csound4/distinfo         |   9 +++++++--
 audio/csound4/patches/patch-af |  22 ++++++++++++++++++++++
 audio/csound4/patches/patch-ag |  13 +++++++++++++
 3 files changed, 42 insertions(+), 2 deletions(-)

diffs (64 lines):

diff -r 372d6dc0fee9 -r b07ffdf9bbfc audio/csound4/distinfo
--- a/audio/csound4/distinfo    Wed Nov 09 06:24:03 2005 +0000
+++ b/audio/csound4/distinfo    Wed Nov 09 06:35:25 2005 +0000
@@ -1,10 +1,15 @@
-$NetBSD: distinfo,v 1.5 2005/10/04 19:23:39 joerg Exp $
+$NetBSD: distinfo,v 1.6 2005/11/09 06:35:25 ben Exp $
 
 SHA1 (csound/csound-4.23f13gbs.0.tar.gz) = 2f86efb6e53f43cd16a6cfb0ff9a0786982f7af9
 RMD160 (csound/csound-4.23f13gbs.0.tar.gz) = 46e161975afbf68f5591842e2921ea1822df30b2
 Size (csound/csound-4.23f13gbs.0.tar.gz) = 1676345 bytes
+<<<<<<< distinfo
+=======
+>>>>>>> 1.5
 SHA1 (patch-aa) = ec2b962f512bbb93aa6255dff0efa4d93aa035a8
 SHA1 (patch-ab) = 49e1780581c8aecd4962e7f05d573671576cfe42
-SHA1 (patch-ac) = fc9dd07c754e330d23f13233116852add9e8a633
+SHA1 (patch-ac) = ceafc26767ac533368875994a668b8118426d675
 SHA1 (patch-ad) = 3b1301614e80c9ace2a39c8385162bb8896f6c27
 SHA1 (patch-ae) = c4d1d57ffdcf6b091253d6e4523bdc8ff7f955f7
+SHA1 (patch-af) = dfb30631b332da5c2557cc8e2ef18679d12697d5
+SHA1 (patch-ag) = a3563963001e7b1fe9081e3137fdfc35c8ea953b
diff -r 372d6dc0fee9 -r b07ffdf9bbfc audio/csound4/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/csound4/patches/patch-af    Wed Nov 09 06:35:25 2005 +0000
@@ -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 -r 372d6dc0fee9 -r b07ffdf9bbfc audio/csound4/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/csound4/patches/patch-ag    Wed Nov 09 06:35:25 2005 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index