File sugar-csound-overflow.patch of Package olpcsound

--- Csound5.10.1/OOps/dumpf.c.orig	2008-12-04 14:55:04.000000000 +0000
+++ Csound5.10.1/OOps/dumpf.c	2009-04-27 17:19:55.000000000 +0000
@@ -175,19 +175,19 @@
       outbuf[0] = '\0';
       while (--nk) {
         sprintf(buf1, "%ld\t", (long) *kp++);
-        strncat(outbuf, buf1, 256);
+        strncat(outbuf, buf1, sizeof(buf1)-strlen(buf1)-1);
       }
       sprintf(buf1, "%ld\n", (long) *kp);
-      strncat(outbuf, buf1, 256);
+      strncat(outbuf, buf1, sizeof(buf1)-strlen(buf1)-1);
       len = strlen(outbuf);
       break;
     case 8: *outbuf = '\0';
       while (--nk) {
         sprintf(buf1, "%6.4f\t", *kp++);
-        strncat(outbuf, buf1, 256);
+        strncat(outbuf, buf1, sizeof(buf1)-strlen(buf1)-1);
       }
       sprintf(buf1, "%6.4f\n", *kp);
-      strncat(outbuf, buf1, 256);
+      strncat(outbuf, buf1, sizeof(buf1)-strlen(buf1)-1);
       len = strlen(outbuf);
       break;
     default: csound->Die(csound, Str("unknown kdump format"));
--- Csound5.10.1/Opcodes/gab/sliderTable.c.orig	2008-01-03 13:05:53.000000000 +0000
+++ Csound5.10.1/Opcodes/gab/sliderTable.c	2009-04-27 17:27:44.000000000 +0000
@@ -364,7 +364,7 @@
             break;                                                              \
         }                                                                       \
         *outTable++ =                                                           \
-            *yt1++ = *c1++ * value + *c2++ * *yt1; /* filters the output */     \
+            *yt1 = *c1++ * value + *c2++ * *yt1; /* filters the output */       \
                                                                                 \
         min++; max++; j++; ftp++;                                               \
     }                                                                           \
openSUSE Build Service is sponsored by