dvdsubdec: validate offset2 similar to offset1

If it is negative, it causes segmentation faults in decode_rle.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit f621749d11)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
Andreas Cadhalpun 2015-11-10 22:14:39 +01:00
parent 372ded7f69
commit aa464dc041
1 changed files with 1 additions and 1 deletions

View File

@ -343,7 +343,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
}
}
the_end:
if (offset1 >= 0) {
if (offset1 >= 0 && offset2 >= 0) {
int w, h;
uint8_t *bitmap;