aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/magicyuv.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-29 17:25:16 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-18 01:32:46 +0200
commitbd076cacc313b19e5af895df6d332aa48c33cf2a (patch)
tree0fe8acf5e4abd1ad8fcebbd971fa2c4a032bcf14 /libavcodec/magicyuv.c
parent191b48e315a6759b283de7bb36b2f868000ae970 (diff)
downloadffmpeg-bd076cacc313b19e5af895df6d332aa48c33cf2a.tar.gz
avcodec/smacker: Improve header table error checks
The extradata for Smacker video contains Huffman trees as well as a field containing the size (in bytes) of said Huffman tree when stored as a table. Due to three special values the decoder allocates more than the size field indicates; yet when it parses the table it only errors out if the number of elements exceeds the number of allocated elements and not the number of elements as indicated by the size field. As a consequence, there might be less than three elements available at the end, so that another check for this is necessary. This commit changes this: It is always made sure that the three elements reserved to (potentially) use them to store the special values are not used to store ordinary tree entries. This allows to remove the extra check at the end. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/magicyuv.c')
0 files changed, 0 insertions, 0 deletions