Hmm.  According to the C standard, strcpy() with overlapping buffers
gives undefined behavior and that's what I'm seeing.

   http://www.opengroup.org/onlinepubs/000095399/functions/strcpy.html

So, it's not a libc6 issue.  But, I wonder why it seems to be only
happening with x64 only now?

Anyway, I've attached a more official patch.  It's been tested on
testing-x64 and stable-x32.


/dc.
diff -Nur sysklogd-1.5.orig/syslogd.c sysklogd-1.5/syslogd.c
--- sysklogd-1.5.orig/syslogd.c	2007-07-04 13:04:01.000000000 -0600
+++ sysklogd-1.5/syslogd.c	2010-07-02 08:12:56.000000000 -0600
@@ -2392,7 +2392,7 @@
 		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

Reply via email to