db032688df
Convert multimedia/mythtv-frontend to a slave port of multimedia/mythtv which should make future updates much easier. Upstream security patches have been added to address known vulnerabilities in the bundled ffmpeg 3.2. PR: 225652 (initial patches to update to 29.0) [1] Submitted by: <lucylangthorne55@gmail.com> [1] Differential Revision: https://reviews.freebsd.org/D14563
47 lines
1.9 KiB
Text
47 lines
1.9 KiB
Text
From 869e8b1d0f549e926ecb246f916c9066f881db4a Mon Sep 17 00:00:00 2001
|
|
From: Michael Niedermayer <michael@niedermayer.cc>
|
|
Date: Wed, 10 May 2017 18:37:49 +0200
|
|
Subject: [PATCH] avcodec/webp: Always set pix_fmt
|
|
|
|
Fixes: out of array access
|
|
Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632
|
|
Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760
|
|
|
|
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
|
|
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
|
|
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
|
|
(cherry picked from commit 6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef)
|
|
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
|
|
---
|
|
libavcodec/vp8.c | 2 ++
|
|
libavcodec/webp.c | 3 +--
|
|
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git libavcodec/vp8.c libavcodec/vp8.c
|
|
index 068223920e4..63e78492848 100644
|
|
--- external/FFmpeg/libavcodec/vp8.c
|
|
+++ external/FFmpeg/libavcodec/vp8.c
|
|
@@ -2548,6 +2548,8 @@ int vp78_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|
enum AVDiscard skip_thresh;
|
|
VP8Frame *av_uninit(curframe), *prev_frame;
|
|
|
|
+ av_assert0(avctx->pix_fmt == AV_PIX_FMT_YUVA420P || avctx->pix_fmt == AV_PIX_FMT_YUV420P);
|
|
+
|
|
if (is_vp7)
|
|
ret = vp7_decode_frame_header(s, avpkt->data, avpkt->size);
|
|
else
|
|
diff --git libavcodec/webp.c libavcodec/webp.c
|
|
index 7d23cc74356..b2ae5bcbba9 100644
|
|
--- external/FFmpeg/libavcodec/webp.c
|
|
+++ external/FFmpeg/libavcodec/webp.c
|
|
@@ -1327,9 +1327,8 @@ static int vp8_lossy_decode_frame(AVCodecContext *avctx, AVFrame *p,
|
|
if (!s->initialized) {
|
|
ff_vp8_decode_init(avctx);
|
|
s->initialized = 1;
|
|
- if (s->has_alpha)
|
|
- avctx->pix_fmt = AV_PIX_FMT_YUVA420P;
|
|
}
|
|
+ avctx->pix_fmt = s->has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P;
|
|
s->lossless = 0;
|
|
|
|
if (data_size > INT_MAX) {
|