Wednesday den 1 April 2015 klockan 17:37 skrev Alfred M. Szmidt detta: > > - strcpy (cline, p); > + bcopy (p, cline, strlen (p) + 1); > > Thanks! I'll read the bug report tomorrow -- I think there is more > than catches the eye. Leading whitespace before the selector is not > valid syntax for syslog.conf AFAIR. > > Also, bcopy was marked deprecated in POSIX 2001, and removed in 2008; > memcpy is always prefered. And in this case, strncpy would be more > apt.
Observe here, that the result of memcpy() is undefined in case of overlapping memory locations, which is not the case of bcopy(). Instead, memmove() is the function to consider.