summaryrefslogtreecommitdiff
path: root/libavutil/hmac.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-30 23:07:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-03-30 23:24:33 +0200
commit21ee6da70c4e5a56ea74aec0f8d21465a873b874 (patch)
treeda1cb792475e8a2e6d0c6ec3ed821eaf717e9ea4 /libavutil/hmac.c
parent1a10134e20efcda2666fb6f3488b2cda8c7756dc (diff)
avutil/hmac: Check av_hmac_alloc() return code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/hmac.c')
-rw-r--r--libavutil/hmac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/hmac.c b/libavutil/hmac.c
index 300436cb07..b63d1b250e 100644
--- a/libavutil/hmac.c
+++ b/libavutil/hmac.c
@@ -245,6 +245,8 @@ int main(void)
/* SHA-2 */
while (i <= AV_HMAC_SHA512) {
hmac = av_hmac_alloc(i);
+ if (!hmac)
+ return 1;
// RFC 4231 test vectors
test(hmac, key1, sizeof(key1), data1, sizeof(data1));
test(hmac, key2, sizeof(key2), data2, sizeof(data2));