openbsd-ports/www/privoxy/patches/patch-miscutil_c
sturm 6035b15ee1 update to 3.0.2
- fixes two memory leaks, one serious
- quite some filter changes, upgraders beware!
- for details, see http://www.privoxy.org/announce.txt

from MAINTAINER
2003-04-01 20:52:59 +00:00

22 lines
533 B
Plaintext

$OpenBSD: patch-miscutil_c,v 1.2 2003/04/01 20:52:59 sturm Exp $
--- miscutil.c.orig Tue Nov 12 09:28:18 2002
+++ miscutil.c Sat Mar 29 18:17:03 2003
@@ -344,7 +344,7 @@ char *strdup( const char *s )
if (result != NULL)
{
- strcpy( result, s );
+ strlcpy( result, s, sizeof(result) );
}
return( result );
@@ -382,7 +382,7 @@ char *safe_strerror(int err)
if (s == NULL)
{
- sprintf(buf, "(errno = %d)", err);
+ snprintf(buf, sizeof(buf), "(errno = %d)", err);
s = buf;
}