mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/bmp_parser: Ensure remaining_size is not too small in startcode packet crossing corner case
Fixes Ticket 5438
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8e26bdd59b
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
6a60de92b2
commit
036d049fb1
@ -63,7 +63,7 @@ restart:
|
||||
continue;
|
||||
}
|
||||
bpc->pc.frame_start_found++;
|
||||
bpc->remaining_size = bpc->fsize + i - 17;
|
||||
bpc->remaining_size = bpc->fsize + FFMAX(i - 17, 0);
|
||||
|
||||
if (bpc->pc.index + i > 17) {
|
||||
next = i - 17;
|
||||
|
Loading…
Reference in New Issue
Block a user