- strcpy (s, str);
Yes, the old code is totally wrong for using strcpy.
+ strncpy (s, str, sizeof(s));
And whoever tried to fix it, made it even worse. Now it only copies
either 4 bytes, 8 bytes, or the size of the destination buffer if it
is not a pointer (and it is a pointer, isn't it). He
I found a problem with a patch in startup-notification. The strncpy
statements were not copying the correct amount of data due to using
sizeof() instead of strlen() values. Old patch and fixed patch below.
-Michael
Old Patch
$OpenBSD: patch-libsn_sn-util_c,v 1.1 2005/05/25 23:53:37 marcm Exp