From f379ab87661d117273492dda146aedbd4d78ac5d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 23 Mar 2015 21:47:44 +0100 Subject: [PATCH] Add a test for sodium_allocarray(0, x) --- test/default/sodium_utils2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/default/sodium_utils2.c b/test/default/sodium_utils2.c index 502e322e..cb8363c1 100644 --- a/test/default/sodium_utils2.c +++ b/test/default/sodium_utils2.c @@ -39,6 +39,10 @@ int main(void) if (sodium_allocarray(SIZE_MAX / 2U + 1U, SIZE_MAX / 2U) != NULL) { return 1; } + sodium_free(sodium_allocarray(0U, 0U)); + sodium_free(sodium_allocarray(0U, 1U)); + sodium_free(sodium_allocarray(1U, 0U)); + buf = sodium_allocarray(1000U, 50U); memset(buf, 0, 50000U); sodium_free(buf);