summaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-03-09 13:36:57 -0400
committerNick Mathewson <nickm@torproject.org>2015-03-09 13:36:57 -0400
commitb0fff2a9c52c92de1b4a304b2ed8ef175642c22c (patch)
tree510ecdd55787ef8558c810380647487ab77302da /src/common/util.c
parent4b54ad017d3fadf3598dd4d5047188107718d92f (diff)
parent64bfc2930ac0be3af669636c16f6f0bba715056f (diff)
downloadtor-b0fff2a9c52c92de1b4a304b2ed8ef175642c22c.tar.gz
tor-b0fff2a9c52c92de1b4a304b2ed8ef175642c22c.zip
Merge remote-tracking branch 'origin/maint-0.2.5' into release-0.2.5
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 2d7893b38a..04cc6b12c6 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1129,6 +1129,9 @@ base16_decode(char *dest, size_t destlen, const char *src, size_t srclen)
return -1;
if (destlen < srclen/2 || destlen > SIZE_T_CEILING)
return -1;
+
+ memset(dest, 0, destlen);
+
end = src+srclen;
while (src<end) {
v1 = hex_decode_digit_(*src);