Test sodium_pad() with a NULL pointer

This commit is contained in:
Frank Denis 2017-08-25 15:24:46 +02:00
parent f61a121b81
commit fd4478288e

View File

@ -294,6 +294,8 @@ main(void)
assert(sodium_pad(&bin_padded_len, bin_padded, bin_len, assert(sodium_pad(&bin_padded_len, bin_padded, bin_len,
blocksize, bin_padded_maxlen - 1U) == -1); blocksize, bin_padded_maxlen - 1U) == -1);
assert(sodium_pad(NULL, bin_padded, bin_len,
blocksize, bin_padded_maxlen + 1U) == 0);
assert(sodium_pad(&bin_padded_len, bin_padded, bin_len, assert(sodium_pad(&bin_padded_len, bin_padded, bin_len,
blocksize, bin_padded_maxlen + 1U) == 0); blocksize, bin_padded_maxlen + 1U) == 0);
assert(sodium_pad(&bin_padded_len, bin_padded, bin_len, assert(sodium_pad(&bin_padded_len, bin_padded, bin_len,