diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-27 05:53:07 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-27 05:53:07 +0000 |
commit | bc62f8e983e913c8a37f3412466b8bc9d360b614 (patch) | |
tree | 250a926a93cfb511368c69c3c152bb8744097d98 /src/or/test.c | |
parent | 7d4854301c719e71bd94be5eaec732a9b1e74c0d (diff) | |
download | tor-bc62f8e983e913c8a37f3412466b8bc9d360b614.tar tor-bc62f8e983e913c8a37f3412466b8bc9d360b614.tar.gz |
Replace sprintf with snprintf
svn:r2602
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/test.c b/src/or/test.c index 5eec99ed9..fecf6be2b 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -50,7 +50,7 @@ setup_directory() int r; if (is_setup) return; - sprintf(temp_dir, "/tmp/tor_test_%d", (int) getpid()); + snprintf(temp_dir, sizeof(temp_dir), "/tmp/tor_test_%d", (int) getpid()); #ifdef MS_WINDOWS r = mkdir(temp_dir); #else @@ -69,7 +69,7 @@ get_fname(const char *name) { static char buf[1024]; setup_directory(); - sprintf(buf,"%s/%s",temp_dir,name); + snprintf(buf,sizeof(buf),"%s/%s",temp_dir,name); return buf; } |