avcodec/cbs_av1: Make overread check more robust
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 18 Sep 2019 03:26:01 +0000 (05:26 +0200)
committerMark Thompson <sw@jkqxz.net>
Sun, 29 Sep 2019 16:48:40 +0000 (17:48 +0100)
commit1929dd4eff93e81bab8637f298754294448e624e
tree9f7f1d22e7ef398c20ec290c5483196f303ae1b2
parentf3333c3c67e8825a4468120bb8aa0943c72c03f3
avcodec/cbs_av1: Make overread check more robust

When performing a comparison of a signed int and an unsigned int, the
signed int is first converted to an unsigned int, so that negative
values are being treated as big, positive values. This can become a
problem in an overread check, namely when an overread already happened.
So change the type of the variable containing the amount of bits that
need to be left to signed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/cbs_av1.c