summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <[email protected]>2015-11-10 22:14:39 +0100
committerAndreas Cadhalpun <[email protected]>2015-11-11 00:39:47 +0100
commitf621749d1181987b3f815c6766ea66d6c5d55198 (patch)
treeb424fd5c00f9f17ff01db150ea4356cc92670191
parent91053990602de8da4df911692710f0e8362daac9 (diff)
dvdsubdec: validate offset2 similar to offset1
If it is negative, it causes segmentation faults in decode_rle. Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
-rw-r--r--libavcodec/dvdsubdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index ee06d55117..014b0a3a83 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -353,7 +353,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;