From e1b04482055788c9ef0ba1cd8f16ec01d2e0959a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 24 Jul 2017 23:17:55 +0200 Subject: [PATCH] Test crypto_secretbox_open_detached() with a NULL message pointer --- test/default/secretbox_easy2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/default/secretbox_easy2.c b/test/default/secretbox_easy2.c index e8fb6baf..0ccc0f8f 100644 --- a/test/default/secretbox_easy2.c +++ b/test/default/secretbox_easy2.c @@ -40,6 +40,10 @@ main(void) } } crypto_secretbox_detached(c, mac, m, (unsigned long long) mlen, nonce, k); + if (crypto_secretbox_open_detached(NULL, c, mac, (unsigned long long) mlen, + nonce, k) != 0) { + printf("crypto_secretbox_open_detached() with a NULL message pointer failed\n"); + } if (crypto_secretbox_open_detached(m2, c, mac, (unsigned long long) mlen, nonce, k) != 0) { printf("crypto_secretbox_open_detached() failed\n");