Browse Source

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>
tags/n2.8.7
Michael Niedermayer 9 years ago
parent
commit
4e174d95f5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/bmp_parser.c

+ 1
- 1
libavcodec/bmp_parser.c View File

@@ -63,7 +63,7 @@ restart:
continue; continue;
} }
bpc->pc.frame_start_found++; 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) { if (bpc->pc.index + i > 17) {
next = i - 17; next = i - 17;


Loading…
Cancel
Save