h264: Make sure reinit failures mark the context as not initialized
authorLuca Barbato <lu_zero@gentoo.org>
Mon, 25 May 2015 20:30:10 +0000 (22:30 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 30 May 2015 14:28:32 +0000 (16:28 +0200)
Bug-Id: CVE-2015-3417
CC: libav-stable@libav.org
libavcodec/h264_slice.c

index 1cee634..a63f45a 100644 (file)
@@ -1171,6 +1171,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
     }
 
     if (h->context_initialized && needs_reinit) {
+        h->context_initialized = 0;
         if (sl != h->slice_ctx) {
             av_log(h->avctx, AV_LOG_ERROR,
                    "changing width %d -> %d / height %d -> %d on "