Skip to content

Commit

Permalink
Fix the AES test on error path
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Jul 13, 2017
1 parent c350bdd commit ff615b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/default/aead_aes256gcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3145,8 +3145,8 @@ tv(void)
memcmp(mac, expected_ciphertext + message_len,
crypto_aead_aes256gcm_ABYTES) != 0) {
printf("Detached encryption of test vector #%u failed\n", (unsigned int) i);
hex = (char *) sodium_malloc((size_t) found_ciphertext_len * 2 + 1);
sodium_bin2hex(hex, (size_t) found_ciphertext_len * 2 + 1,
hex = (char *) sodium_malloc((size_t) ciphertext_len * 2 + 1);
sodium_bin2hex(hex, (size_t) ciphertext_len * 2 + 1,
ciphertext, ciphertext_len);
printf("Computed: [%s]\n", hex);
sodium_free(hex);
Expand Down

0 comments on commit ff615b2

Please sign in to comment.