Browse Source

avutil/hmac: Check av_hmac_alloc() return code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Michael Niedermayer 10 years ago
parent
commit
21ee6da70c
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavutil/hmac.c

+ 2
- 0
libavutil/hmac.c View File

@@ -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));


Loading…
Cancel
Save