diff options
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 5eec99ed9e..fecf6be2bd 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; } |