diff --git a/test/default/aead_aes256gcm.c b/test/default/aead_aes256gcm.c index ce9b4729..8165d531 100644 --- a/test/default/aead_aes256gcm.c +++ b/test/default/aead_aes256gcm.c @@ -3283,7 +3283,7 @@ tv2(void) NULL, 0, nonce, key) != 0) { printf("Decryption of random ciphertext failed"); } - assert(memcmp(message, message2, message_len) == 0); + assert(message_len == 0 || memcmp(message, message2, message_len) == 0); sodium_free(key); sodium_free(nonce); sodium_free(ciphertext);