a53b19828d
- drop unused patches - fix wrong memset and strncat usage ({memset,strncat}-fix.patch) OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/csound?expand=0&rev=7
29 lines
1018 B
Diff
29 lines
1018 B
Diff
Index: OOps/dumpf.c
|
|
===================================================================
|
|
--- OOps/dumpf.c.orig
|
|
+++ OOps/dumpf.c
|
|
@@ -175,19 +175,19 @@ static void nkdump(CSOUND *csound, MYFLT
|
|
outbuf[0] = '\0';
|
|
while (--nk) {
|
|
sprintf(buf1, "%ld\t", (long) *kp++);
|
|
- strncat(outbuf, buf1, 256);
|
|
+ strncat(outbuf, buf1, sizeof(outbuf)-strlen(buf1)-1);
|
|
}
|
|
sprintf(buf1, "%ld\n", (long) *kp);
|
|
- strncat(outbuf, buf1, 256);
|
|
+ strncat(outbuf, buf1, sizeof(outbuf)-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(outbuf)-strlen(buf1)-1);
|
|
}
|
|
sprintf(buf1, "%6.4f\n", *kp);
|
|
- strncat(outbuf, buf1, 256);
|
|
+ strncat(outbuf, buf1, sizeof(outbuf)-strlen(buf1)-1);
|
|
len = strlen(outbuf);
|
|
break;
|
|
default: csound->Die(csound, Str("unknown kdump format"));
|