diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-10-15 14:34:55 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2013-10-15 18:01:12 +0200 |
commit | 29c455ce3daf7fb369ba20cf77c74bd8e3b43b55 (patch) | |
tree | e17eb2766941a040a04952af4ad601b7fae0c81c | |
parent | 3b4fa54866f58bf3d8a8dcc460c73ef6564c0ad8 (diff) | |
download | ffmpeg-29c455ce3daf7fb369ba20cf77c74bd8e3b43b55.tar.gz |
bitstream: Check the result of av_malloc()
-rw-r--r-- | libavcodec/bitstream.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 197e07f411..e7c476ba4b 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -283,6 +283,8 @@ int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, av_dlog(NULL, "build table nb_codes=%d\n", nb_codes); buf = av_malloc((nb_codes + 1) * sizeof(VLCcode)); + if (!buf) + return AVERROR(ENOMEM); assert(symbols_size <= 2 || !symbols); j = 0; |