openbsd-ports/sysutils/radmind/patches/patch-libsnet_snet_c
jasper 2114697ef0 update radmind to 1.9.0
from William Yodlowsky (MAINTAINER)
2007-09-04 20:52:13 +00:00

18 lines
459 B
Plaintext

$OpenBSD: patch-libsnet_snet_c,v 1.2 2007/09/04 20:52:13 jasper Exp $
--- libsnet/snet.c.orig Mon Feb 19 16:10:13 2007
+++ libsnet/snet.c Sun Mar 18 12:15:14 2007
@@ -274,8 +274,11 @@ modifier:
p = va_arg( vl, char * );
len = strlen( p );
SNET_WBUFGROW( len );
- strcpy( cur, p );
- cur += strlen( p );
+ if (strlcpy( cur, p, end - cur ) > (end - cur)) {
+ cur += end - cur;
+ } else {
+ cur += strlen( p );
+ }
break;
case 'c' :