diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-01-19 08:30:48 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-01-19 08:30:48 -0500 |
commit | f557a7f327d6574018f836e6d7ba767a6082c491 (patch) | |
tree | 693ed2fae78965723ccd150a36792877498a1e3f /src | |
parent | 7b6d7aae09ae2fe1b809c57d228c4de0bf72aa67 (diff) | |
parent | 534a0ba59b4d772b0e3e6a1dfc5050d534fdb9fc (diff) | |
download | tor-f557a7f327d6574018f836e6d7ba767a6082c491.tar.gz tor-f557a7f327d6574018f836e6d7ba767a6082c491.zip |
Merge branch 'maint-0.2.7'
Diffstat (limited to 'src')
-rw-r--r-- | src/common/crypto.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c index de4f9db94f..a42c461b14 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -2957,9 +2957,11 @@ smartlist_shuffle(smartlist_t *sl) void memwipe(void *mem, uint8_t byte, size_t sz) { - if (mem == NULL || sz == 0) { + if (sz == 0) { return; } + /* If sz is nonzero, then mem must not be NULL. */ + tor_assert(mem != NULL); /* Data this large is likely to be an underflow. */ tor_assert(sz < SIZE_T_CEILING); |