]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/bitstream: assert that no integer overflow happened when writing codes in...
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 23 Jan 2014 00:32:49 +0000 (01:32 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 23 Jan 2014 00:43:00 +0000 (01:43 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/bitstream.c

index 99119cdcfad9887552f0d7435c6316fd8da85ca4..e90732287149ada892608f29e865b2c8a39d2454 100644 (file)
@@ -232,6 +232,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
             /* note: realloc has been done, so reload tables */
             table = &vlc->table[table_index];
             table[j][0] = index; //code
+            av_assert0(table[j][0] == index);
             i = k-1;
         }
     }