diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-06-18 13:13:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-18 13:13:53 -0400 |
commit | 4a8eaad7efd4e24e89f969f79d9bde1874f366d1 (patch) | |
tree | e37fe56541b62991950d0a0ae20db44be8b06e94 /src/common/util.c | |
parent | b8d1e8e3755e6d12bd6a12cc8e91353b55a64186 (diff) | |
download | tor-4a8eaad7efd4e24e89f969f79d9bde1874f366d1.tar.gz tor-4a8eaad7efd4e24e89f969f79d9bde1874f366d1.zip |
Clear a couple more fields in rend_service_load_auth_keys
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 28ecff3983..cb9a65d361 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -655,6 +655,16 @@ fast_memcmpstart(const void *mem, size_t memlen, return fast_memcmp(mem, prefix, plen); } +/** Given a nul-terminated string s, set every character before the nul + * to zero. */ +void +tor_strclear(char *s) +{ + while (*s) { + *s++ = '\0'; + } +} + /** Return a pointer to the first char of s that is not whitespace and * not a comment, or to the terminating NUL if no such character exists. */ |