summaryrefslogtreecommitdiffstats
path: root/main/dev86/dev86-0.16.19-memmove.patch
blob: e0bd8b7ce0037b4cf1affee6199a9493f085c331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
https://bugs.gentoo.org/354351

fix sniped from Debian:
* Fix "FTBFS: ncc: illegal label": apply patch by dai that replaces strcpy
  by memmove (closes: #591133).

--- a/copt/copt.c
+++ b/copt/copt.c
@@ -174,7 +174,7 @@
   /* Delete leading white spaces */
   for (cp = buf; *cp && isspace(*cp); cp++) ;
   if (cp != buf && *cp)
-	strcpy(buf, cp);
+	memmove(buf, cp, strlen(cp) + 1);
 
   return(buf);
 }