Fixes a segfault with fuzzed sample sample_varPAR_s11622_r001-02.avi.
CC: [email protected]
---
libavcodec/h264.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7e9b4e6..9b0ebef 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2679,6 +2679,11 @@ static int decode_slice_header(H264Context *h,
H264Context *h0)
s->picture_structure = last_pic_structure;
s->dropable = last_pic_dropable;
return AVERROR_INVALIDDATA;
+ } else if (!s->current_picture_ptr) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "unset current_picture_ptr on %d. slice\n",
+ h0->current_slice + 1);
+ return AVERROR_INVALIDDATA;
}
} else {
/* Shorten frame num gaps so we don't have to allocate reference
--
1.7.12.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel