1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-28 22:21:15 -07:00

box_seal test: don't check empty messages

Fixes 
This commit is contained in:
Frank Denis 2020-06-22 18:31:46 +02:00
parent 290197ba3e
commit d8f512bfaa

View File

@ -65,7 +65,7 @@ void tv2(void)
printf("crypto_box_seal_open() failure\n");
return;
}
assert(memcmp(cm, m2, m_len) != 0);
assert(m_len == 0 || memcmp(cm, m2, m_len) != 0);
sodium_free(cm);
sodium_free(m2);
}
@ -135,7 +135,7 @@ void tv4(void)
printf("crypto_box_curve25519xchacha20poly1305_seal_open() failure\n");
return;
}
assert(memcmp(cm, m2, m_len) != 0);
assert(m_len == 0 || memcmp(cm, m2, m_len) != 0);
sodium_free(cm);
sodium_free(m2);
}