aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/inetutils-syslogd.patch
blob: 0bf9eb7fc60b34db4e00e2516b688622ce0a975b (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From <http://lists.gnu.org/archive/html/bug-inetutils/2015-04/msg00001.html>.

2015-04-01  Ludovic Courtès  <ludo@gnu.org>

	* src/syslogd.c (load_conffile): Use 'bcopy' instead of 'strcpy'
	since the two regions may overlap.
	Reported by Alex Kost <alezost@gmail.com>
	at <http://lists.gnu.org/archive/html/guix-devel/2015-03/msg00780.html>.

--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -1989,7 +1989,7 @@ load_conffile (const char *filename, struct filed **nextp)
       if (*p == '\0' || *p == '#')
 	continue;
 
-      strcpy (cline, p);
+      bcopy (p, cline, strlen (p) + 1);
 
       /* Cut the trailing spaces.  */
       for (p = strchr (cline, '\0'); isspace (*--p);)