openbsd-ports/sysutils/radmind/patches/patch-libsnet_snet_c
sturm a3134d3b4e Initial import of radmind 1.3.0
A suite of Unix command-line tools and a server designed to remotely 
administer the file systems of multiple Unix machines.

At its core, radmind operates as a tripwire. It is able to detect 
changes to any managed filesystem object, e.g. files, directories, 
links, etc. However, radmind goes further than just integrity 
checking: once a change is detected, radmind can optionally reverse 
the change.

WWW: http://rsug.itd.umich.edu/software/radmind/

from William Yodlowsky <bsd at openbsd.rutgers.edu>
2004-06-26 19:00:48 +00:00

18 lines
484 B
Plaintext

$OpenBSD: patch-libsnet_snet_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
--- libsnet/snet.c.orig 2004-06-16 15:43:18.000000000 -0400
+++ libsnet/snet.c 2004-06-16 15:54:07.000000000 -0400
@@ -217,8 +217,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' :