diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2010-02-25 10:31:36 +0100 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2010-02-27 02:13:22 +0100 |
commit | b67657bd952919d0b738a1ffd6c48cc369604873 (patch) | |
tree | 648c9c34cfcbae1dbedad46ce56c3bb6b0ae34a9 /src/or/or.h | |
parent | 86828e2004058d01fba09215a44d51d53f82e5c3 (diff) | |
download | tor-b67657bd952919d0b738a1ffd6c48cc369604873.tar.gz tor-b67657bd952919d0b738a1ffd6c48cc369604873.zip |
Properly handle non-terminated strings
Treat strings returned from signed_descriptor_get_body_impl() as not
NUL-terminated. Since the length of the strings is available, this is
not a big problem.
Discovered by rieo.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h index ae65127e36..460a6b6d96 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -4566,7 +4566,7 @@ typedef struct tor_version_t { int svn_revision; } tor_version_t; -int router_get_router_hash(const char *s, char *digest); +int router_get_router_hash(const char *s, size_t s_len, char *digest); int router_get_dir_hash(const char *s, char *digest); int router_get_runningrouters_hash(const char *s, char *digest); int router_get_networkstatus_v2_hash(const char *s, char *digest); |