From 647dc88f2180ef6cbae549e8d4364b7ec03cc75b Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 11 Aug 2008 18:33:59 +0000 Subject: [PATCH] (libT) safer environmental variable handling (muks) --- libtransmission/platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libtransmission/platform.c b/libtransmission/platform.c index d8de8e53c..515f1e96e 100644 --- a/libtransmission/platform.c +++ b/libtransmission/platform.c @@ -469,7 +469,7 @@ tr_getDefaultConfigDir( void ) if(( s = getenv( "TRANSMISSION_HOME" ))) { - tr_snprintf( path, sizeof( path ), s ); + tr_strlcpy( path, s, sizeof( path ) ); } else { @@ -523,11 +523,11 @@ tr_getClutchDir( const tr_session * session UNUSED ) if(( s = getenv( "CLUTCH_HOME" ))) { - tr_snprintf( path, sizeof( path ), s ); + tr_strlcpy( path, s, sizeof( path ) ); } else if(( s = getenv( "TRANSMISSION_WEB_HOME" ))) { - tr_snprintf( path, sizeof( path ), s ); + tr_strlcpy( path, s, sizeof( path ) ); } else {