2114697ef0
from William Yodlowsky (MAINTAINER)
24 lines
891 B
Plaintext
24 lines
891 B
Plaintext
$OpenBSD: patch-root_c,v 1.4 2007/09/04 20:52:13 jasper Exp $
|
|
--- root.c.orig Fri Jan 20 16:27:27 2006
|
|
+++ root.c Wed Jul 18 09:41:17 2007
|
|
@@ -35,7 +35,7 @@ get_root( char *radmind_path, char *path, char *file_r
|
|
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 ) {
|
|
@@ -83,8 +83,8 @@ get_root( char *radmind_path, char *path, char *file_r
|
|
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 );
|
|
}
|
|
}
|
|
|