[FFmpeg-devel] avcodec/dxv: Initialize text_funct to NULL

Submitted by Michael Niedermayer on June 3, 2019, 9:41 a.m.

Details

Message ID 20190603094153.10474-1-michael@niedermayer.cc
State Accepted
Commit e96b7a8ba62c5e010328b80b647b64dd9cdbdc01
Headers show

Commit Message

Michael Niedermayer June 3, 2019, 9:41 a.m.
Fixes: Various anomalies
Fixes: 14493/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-5071018000908288
Fixes: 14630/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-5714888963391488

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

Patch hide | download patch | download mbox

diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c
index 6fe5516505..2abfe6a017 100644
--- a/libavcodec/dxv.c
+++ b/libavcodec/dxv.c
@@ -1054,6 +1054,10 @@  static int dxv_decode(AVCodecContext *avctx, void *data,
     avctx->pix_fmt = AV_PIX_FMT_RGBA;
     avctx->colorspace = AVCOL_SPC_RGB;
 
+    ctx->tex_funct = NULL;
+    ctx->tex_funct_planar[0] = NULL;
+    ctx->tex_funct_planar[1] = NULL;
+
     tag = bytestream2_get_le32(gbc);
     switch (tag) {
     case MKBETAG('D', 'X', 'T', '1'):