Files
meta-musicians/recipes-musicians/csound/files/0007-util1-csd_util-cs.c-Fix-build-with-gcc8.patch
Andreas Müller ff9499a1c7 Initial commit
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2019-03-16 19:58:53 +01:00

47 lines
1.5 KiB
Diff

From a070eaef29510f9138055896975917211d4fe61f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Mon, 2 Jul 2018 00:55:16 +0200
Subject: [PATCH] util1/csd_util/cs.c: Fix build with gcc8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
util1/csd_util/cs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/util1/csd_util/cs.c b/util1/csd_util/cs.c
index a05ee3b43..768843fff 100644
--- a/util1/csd_util/cs.c
+++ b/util1/csd_util/cs.c
@@ -385,7 +385,7 @@ int main(int argc, char **argv)
while (--j) {
i++;
if (argv[i][0] != '-' && i < 3 && tmp[0] == '\0') {
- strncpy(tmp, argv[i],256);
+ strncpy(tmp, argv[i],255);
/* strip extension */
if (is_orc(tmp) || is_sco(tmp) || is_mid(tmp) || is_csd(tmp))
tmp[strlen(tmp) - 4] = '\0';
@@ -428,12 +428,12 @@ int main(int argc, char **argv)
/* (the last option has the highest precedence) */
s = getenv("CSOUND");
if (s != NULL) /* get default setting from CSOUND, if available */
- strncpy(tmp, s, 256);
+ strncpy(tmp, s, 255);
for (i = (int) strlen(optlst); --i >= 0; ) {
sprintf(tmp2, "CSOUND_%c", optlst[i]);
s = getenv(tmp2);
if (s != NULL) {
- strncpy(tmp, s, 256);
+ strncpy(tmp, s, 255);
if (tmp[0] != '\0') break;
}
}
--
2.14.4