summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-01-19 08:30:39 -0500
committerNick Mathewson <nickm@torproject.org>2016-01-19 08:30:39 -0500
commit534a0ba59b4d772b0e3e6a1dfc5050d534fdb9fc (patch)
tree243d56040ad464f7a64ba11bccb3b3c0c6dfb31b /src
parent8335b1f9a91076f100e7d3ba6b45f3ed9fc2986a (diff)
parente2efa9e321972709933b6b9a68da035e1a91aa08 (diff)
downloadtor-534a0ba59b4d772b0e3e6a1dfc5050d534fdb9fc.tar.gz
tor-534a0ba59b4d772b0e3e6a1dfc5050d534fdb9fc.zip
Merge branch 'maint-0.2.6' into maint-0.2.7
Diffstat (limited to 'src')
-rw-r--r--src/common/crypto.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index c50a303c1d..57981f9a00 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -2574,9 +2574,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);