mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/rangecoder: Do not increase the pointer beyond the buffer
Fixes: undefined behavior Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f4544163b2
commit
c359c51947
2 changed files with 7 additions and 2 deletions
|
|
@ -58,6 +58,7 @@ av_cold void ff_init_range_decoder(RangeCoder *c, const uint8_t *buf,
|
|||
|
||||
c->low = AV_RB16(c->bytestream);
|
||||
c->bytestream += 2;
|
||||
c->overread = 0;
|
||||
if (c->low >= 0xFF00) {
|
||||
c->low = 0xFF00;
|
||||
c->bytestream_end = c->bytestream;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue