[FFmpeg-devel] [PATCH 3/5] avformat/nistspheredec: Clear buffer

Michael Niedermayer michael at niedermayer.cc
Sun Nov 3 22:12:14 EET 2024


Fixes: use-of-uninitialized-value
Fixes: 42537627/clusterfuzz-testcase-minimized-fuzzer_protocol_memory-6515855798632448-cut

Found-by: ossfuzz
Reported-by: Kacper Michajlow
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/nistspheredec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.c
index 1e6c567e011..e6240361490 100644
--- a/libavformat/nistspheredec.c
+++ b/libavformat/nistspheredec.c
@@ -35,7 +35,7 @@ static int nist_probe(const AVProbeData *p)
 
 static int nist_read_header(AVFormatContext *s)
 {
-    char buffer[256], coding[32] = "pcm", format[32] = "01";
+    char buffer[256]= {0}, coding[32] = "pcm", format[32] = "01";
     int bps = 0, be = 0;
     int32_t header_size = -1;
     AVStream *st;
-- 
2.47.0



More information about the ffmpeg-devel mailing list