diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-10-27 06:48:16 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-10-27 06:48:16 +0000 |
commit | 6980929e647b7a73e0634d9f699f18d462b8beca (patch) | |
tree | 26b722a9ed0981558ccf0a2c6cc45543ca91ffbf /src/common | |
parent | 44d4516155309e15b3463a543aef6239d485a04e (diff) | |
download | tor-6980929e647b7a73e0634d9f699f18d462b8beca.tar tor-6980929e647b7a73e0634d9f699f18d462b8beca.tar.gz |
Use strlcpy, not strcpy.
svn:r2610
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/util.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/util.c b/src/common/util.c index 09a86ebdb..e50d20313 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1847,13 +1847,12 @@ get_uname(void) #ifdef HAVE_UNAME if (uname(&u) != -1) { /* (linux says 0 is success, solaris says 1 is success) */ - tor_snprintf(uname_result, 255, "%s %s %s", + tor_snprintf(uname_result, sizeof(uname_result), "%s %s %s", u.sysname, u.nodename, u.machine); - uname_result[255] = '\0'; } else #endif { - strcpy(uname_result, "Unknown platform"); + strlcpy(uname_result, "Unknown platform", sizeof(uname_result)); } uname_result_is_set = 1; } |