1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avutil/hmac: Check av_hmac_alloc() return code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-03-30 23:07:19 +02:00
parent 1a10134e20
commit 21ee6da70c

View File

@ -245,6 +245,8 @@ int main(void)
/* SHA-2 */ /* SHA-2 */
while (i <= AV_HMAC_SHA512) { while (i <= AV_HMAC_SHA512) {
hmac = av_hmac_alloc(i); hmac = av_hmac_alloc(i);
if (!hmac)
return 1;
// RFC 4231 test vectors // RFC 4231 test vectors
test(hmac, key1, sizeof(key1), data1, sizeof(data1)); test(hmac, key1, sizeof(key1), data1, sizeof(data1));
test(hmac, key2, sizeof(key2), data2, sizeof(data2)); test(hmac, key2, sizeof(key2), data2, sizeof(data2));