diff options
author | Roger Dingledine <arma@torproject.org> | 2004-07-21 22:33:26 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-07-21 22:33:26 +0000 |
commit | 6e571c8c4cff76dd6305b708fd421be5387ae878 (patch) | |
tree | b56e00c8b45ba4793ba6c1ae0e6c0887b4956ce8 /src | |
parent | cdb98cf04ab85ce31b6284ba9cc0068bbbb9bb20 (diff) | |
download | tor-6e571c8c4cff76dd6305b708fd421be5387ae878.tar tor-6e571c8c4cff76dd6305b708fd421be5387ae878.tar.gz |
make base16_encode() fail more obviously when it fails
svn:r2087
Diffstat (limited to 'src')
-rw-r--r-- | src/common/crypto.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index b8882cf21..1c068f18d 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -1438,8 +1438,7 @@ int base16_encode(char *dest, int destlen, const char *src, int srclen) const char *end; char *cp; - if (destlen < srclen*2+1) - return -1; + tor_assert(destlen >= srclen*2+1) cp = dest; end = src+srclen; |