From 964fef3f3ced60e67831549df223bc177e1537c9 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 25 May 2015 22:30:10 +0200 Subject: [PATCH] h264: Make sure reinit failures mark the context as not initialized Bug-Id: CVE-2015-3417 CC: libav-stable@libav.org (cherry picked from commit 3b69f245dbe6e2016659a45c4bfe284f6c5ac57e) Signed-off-by: Reinhard Tartler Conflicts: libavcodec/h264_slice.c --- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 857a949e98..c32711343b 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3489,6 +3489,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) (h->width != h->avctx->coded_width || h->height != h->avctx->coded_height || needs_reinit)) { + h->context_initialized = 0; if (h != h0) { av_log(h->avctx, AV_LOG_ERROR, "changing width/height on " "slice %d\n", h0->current_slice + 1);