[FFmpeg-devel,3/3] avcodec/vqavideo: Limit resolution

Submitted by Michael Niedermayer on Aug. 22, 2019, 6:09 p.m.

Details

Message ID 20190822180925.12233-3-michael@niedermayer.cc
State Accepted
Commit 8a1a9588fb44dd35bc42f39212b2ebef8208e945
Headers show

Commit Message

Michael Niedermayer Aug. 22, 2019, 6:09 p.m.
Fixes: Timeout (288sec -> 1ms)
Fixes: 16353/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-5633402606190592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/vqavideo.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Michael Niedermayer Sept. 5, 2019, 5:25 p.m.
On Thu, Aug 22, 2019 at 08:09:25PM +0200, Michael Niedermayer wrote:
> Fixes: Timeout (288sec -> 1ms)
> Fixes: 16353/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-5633402606190592
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/vqavideo.c | 6 ++++++
>  1 file changed, 6 insertions(+)

will apply

[...]

Patch hide | download patch | download mbox

diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index b9743abda9..f45390cfe5 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -637,6 +637,11 @@  static av_cold int vqa_decode_end(AVCodecContext *avctx)
     return 0;
 }
 
+static const AVCodecDefault vqa_defaults[] = {
+    { "max_pixels", "320*240" },
+    { NULL },
+};
+
 AVCodec ff_vqa_decoder = {
     .name           = "vqavideo",
     .long_name      = NULL_IF_CONFIG_SMALL("Westwood Studios VQA (Vector Quantized Animation) video"),
@@ -647,4 +652,5 @@  AVCodec ff_vqa_decoder = {
     .close          = vqa_decode_end,
     .decode         = vqa_decode_frame,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .defaults       = vqa_defaults,
 };