Commit f621749d authored by Andreas Cadhalpun's avatar Andreas Cadhalpun

dvdsubdec: validate offset2 similar to offset1

If it is negative, it causes segmentation faults in decode_rle.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent 91053990
...@@ -353,7 +353,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, ...@@ -353,7 +353,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
} }
} }
the_end: the_end:
if (offset1 >= 0) { if (offset1 >= 0 && offset2 >= 0) {
int w, h; int w, h;
uint8_t *bitmap; uint8_t *bitmap;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment