From 99fe9eb67f85dbf5655ac2e274a7d0ea2aaf5898 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 3 Dec 2017 16:39:05 +0100 Subject: [PATCH] More misuse tests --- test/default/misuse.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/test/default/misuse.c b/test/default/misuse.c index 24cee622..26820fff 100644 --- a/test/default/misuse.c +++ b/test/default/misuse.c @@ -6,12 +6,34 @@ # include static void -sigabrt_handler_13(int sig) +sigabrt_handler_15(int sig) { (void) sig; exit(0); } +static void +sigabrt_handler_14(int sig) +{ + (void) sig; + signal(SIGABRT, sigabrt_handler_15); + assert(crypto_box_curve25519xchacha20poly1305_easy + (NULL, NULL, crypto_stream_xchacha20_MESSAGEBYTES_MAX - 1, + NULL, NULL, NULL) == -1); + exit(1); +} + +static void +sigabrt_handler_13(int sig) +{ + (void) sig; + signal(SIGABRT, sigabrt_handler_14); + assert(crypto_box_curve25519xchacha20poly1305_easy_afternm + (NULL, NULL, crypto_stream_xchacha20_MESSAGEBYTES_MAX - 1, + NULL, NULL) == -1); + exit(1); +} + static void sigabrt_handler_12(int sig) {