From 393a86c0dbffdf741e44b84e6a88eb1c2138073d Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Tue, 15 Aug 2017 14:57:37 +0300 Subject: Check that pSettings is initialized Fixes: 2872/clusterfuzz-testcminimized-4529959869612032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg --- libSBRdec/src/sbrdecoder.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libSBRdec/src') diff --git a/libSBRdec/src/sbrdecoder.cpp b/libSBRdec/src/sbrdecoder.cpp index 766d7e9..7d9468c 100644 --- a/libSBRdec/src/sbrdecoder.cpp +++ b/libSBRdec/src/sbrdecoder.cpp @@ -1446,6 +1446,10 @@ sbrDecoder_DecodeElement ( if (channelMapping[0] == 255 || channelMapping[1] == 255) return SBRDEC_UNSUPPORTED_CONFIG; + if (!pSbrChannel[0]->SbrDec.LppTrans.pSettings) + return SBRDEC_UNSUPPORTED_CONFIG; + if (stereo && !pSbrChannel[1]->SbrDec.LppTrans.pSettings) + return SBRDEC_UNSUPPORTED_CONFIG; /* Set strides for reading and writing */ if (interleaved) { -- cgit v1.2.3