avcodec/av1dec: Check tiles sizes, fix assert, don't read bytes bitwise
Tiles have a size field with a length from one to four bytes. As such it is not possible to read it all at once with a call to get_bits() as this only allows to read up to 25 bits; this is guarded by an av_assert2. Yet this is done by the AV1 decoder in get_tiles_info(). It has been done despite said size fields being byte-aligned. This commit fixes this by using the bytestream2 API instead. Furthermore, it is now explicitly checked whether the data is consistent, i.e. whether the data that is supposed to be there extends beyond the end of the data actually present. Reviewed-by: Wang, Fei W <fei.w.wang@intel.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Showing
Please register or sign in to comment