diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 8762e5f4b2..590b490527 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -226,6 +226,10 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes, /* note: realloc has been done, so reload tables */ table = (volatile VLC_TYPE (*)[2])&vlc->table[table_index]; table[j][0] = index; //code + if (table[j][0] != index) { + avpriv_request_sample(NULL, "strange codes"); + return AVERROR_PATCHWELCOME; + } i = k-1; } }