Re: Fix for /usr/ports/devel/startup-notification/patches/patch-libsn_sn-util_c

2006-05-11 Thread Theo de Raadt
- 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

Fix for /usr/ports/devel/startup-notification/patches/patch-libsn_sn-util_c

2006-05-11 Thread Michael Mitton
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