openbsd-ports/sysutils/radmind/patches/patch-root_c
pvalchev 82806daf7d Update to radmind-1.4.0
from maintainer William Yodlowsky <bsd@openbsd.rutgers.edu>
2005-01-26 00:33:30 +00:00

24 lines
865 B
Plaintext

$OpenBSD: patch-root_c,v 1.2 2005/01/26 00:33:30 pvalchev Exp $
--- root.c.orig Thu Jan 6 16:31:49 2005
+++ root.c Thu Jan 20 12:57:28 2005
@@ -33,7 +33,7 @@ get_root( char *radmind_path, char *path
fprintf( stderr, "%s: path too long\n", p );
return( -1 );
}
- strcpy( tran_name, p );
+ (void)strlcpy( tran_name, p, MAXPATHLEN );
if ( snprintf( test_path, MAXPATHLEN, "%s/tmp/transcript",
radmind_real_path ) > MAXPATHLEN - 1 ) {
@@ -81,8 +81,8 @@ get_root( char *radmind_path, char *path
return( -1 );
}
} else {
- sprintf( file_root, "%s/../file", real_path );
- sprintf( tran_root, "%s", real_path );
+ (void)snprintf( file_root, MAXPATHLEN, "%s/../file", real_path );
+ (void)snprintf( tran_root, MAXPATHLEN, "%s", real_path );
}
}