summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libcrypto/aeswrap/aes_wrap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/regress/lib/libcrypto/aeswrap/aes_wrap.c b/src/regress/lib/libcrypto/aeswrap/aes_wrap.c
index c0c56327f1..292ce5e895 100644
--- a/src/regress/lib/libcrypto/aeswrap/aes_wrap.c
+++ b/src/regress/lib/libcrypto/aeswrap/aes_wrap.c
@@ -68,10 +68,11 @@ AES_wrap_unwrap_test(const unsigned char *kek, int keybits,
68 unsigned char *otmp = NULL, *ptmp = NULL; 68 unsigned char *otmp = NULL, *ptmp = NULL;
69 int r, ret = 0; 69 int r, ret = 0;
70 AES_KEY wctx; 70 AES_KEY wctx;
71
71 otmp = malloc(keylen + 8); 72 otmp = malloc(keylen + 8);
72 ptmp = malloc(keylen); 73 ptmp = malloc(keylen);
73 if (!otmp || !ptmp) 74 if (otmp == NULL || ptmp == NULL)
74 return 0; 75 goto err;
75 if (AES_set_encrypt_key(kek, keybits, &wctx)) 76 if (AES_set_encrypt_key(kek, keybits, &wctx))
76 goto err; 77 goto err;
77 r = AES_wrap_key(&wctx, iv, otmp, key, keylen); 78 r = AES_wrap_key(&wctx, iv, otmp, key, keylen);