From 6e571c8c4cff76dd6305b708fd421be5387ae878 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 21 Jul 2004 22:33:26 +0000 Subject: make base16_encode() fail more obviously when it fails svn:r2087 --- src/common/crypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/common/crypto.c b/src/common/crypto.c index b8882cf21f..1c068f18de 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; -- cgit v1.2.3-54-g00ecf