[FFmpeg-cvslog] avutil/hmac: Check av_hmac_alloc() return code
Michael Niedermayer
git at videolan.org
Mon Mar 30 23:49:47 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Mar 30 23:07:19 2015 +0200| [21ee6da70c4e5a56ea74aec0f8d21465a873b874] | committer: Michael Niedermayer
avutil/hmac: Check av_hmac_alloc() return code
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=21ee6da70c4e5a56ea74aec0f8d21465a873b874
---
libavutil/hmac.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavutil/hmac.c b/libavutil/hmac.c
index 300436c..b63d1b2 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));
More information about the ffmpeg-cvslog
mailing list