diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-04-14 15:10:31 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-04-29 14:23:41 +0200 |
commit | 036d049fb1f2a23938501fc00bcc9e4d0f010b96 (patch) | |
tree | 7d10ba312376dbb03a52ef6449ebf85f2dcdd917 | |
parent | 6a60de92b22c160a024957c3e65f607f2e5ab3d7 (diff) | |
download | ffmpeg-036d049fb1f2a23938501fc00bcc9e4d0f010b96.tar.gz |
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 8e26bdd59bf559d00c7e60c53fff292de10139ff)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/bmp_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/bmp_parser.c b/libavcodec/bmp_parser.c index c9493dc32d..7ab32a0b00 100644 --- a/libavcodec/bmp_parser.c +++ b/libavcodec/bmp_parser.c @@ -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; |