Replace strcpy with memmove to fix continuation line problems

on 64bit architectures, patch by David Couture.
This commit is contained in:
Joey Schulze 2010-09-10 08:50:59 +02:00
parent b03656d74e
commit 2a80f8117f
2 changed files with 7 additions and 1 deletions

View File

@ -7,6 +7,8 @@
- Documentation update
. John Haxby <john.haxby@oracle.com>
- IPv6 support forward ported from FreeBSD
. David Couture <glowplugrelayw0rks@gmail.com>
- Correct continuation line problems on 64bit architecture
Version 1.5

View File

@ -501,6 +501,10 @@ static char sccsid[] = "@(#)syslogd.c 5.27 (Berkeley) 10/10/88";
* Wed May 7 21:00:39 CEST 2007: Martin Schulze <joey@infodrom.org>
* Make sure that the service name is only queried, when it is needed,
* i.e. when we are sending to or receiving from the network.
*
* Fri Sep 10 08:29:04 CEST 2010: Martin Schulze <joey@infodrom.org>
* Replace strcpy with memmove to fix continuation line problems
* on 64bit architectures, patch by David Couture.
*/
@ -2518,7 +2522,7 @@ void init()
if (*p == '\0' || *p == '#')
continue;
#if CONT_LINE
strcpy(cline, p);
memmove(cline, p, strlen(p)+1);
#endif
for (p = strchr(cline, '\0'); isspace(*--p););
#if CONT_LINE