Commit aa74810f authored by Piotr Bandurski's avatar Piotr Bandurski Committed by Michael Niedermayer

bitstream: fix a crash in case of oom

fixes ticket #2766
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 19378221
......@@ -299,6 +299,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);
av_assert0(symbols_size <= 2 || !symbols);
j = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment