avformat/mlvdec: avoid uninitialized read in read_string()

Fixes: read of uninitialized memory
Fixes: 488256339/clusterfuzz-testcase-minimized-ffmpeg_dem_MLV_fuzzer-6347338118660096

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6023ad715c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2026-03-04 01:26:02 +01:00
parent fcae8974c0
commit 7453c35298
+1 -1
View File
@@ -90,7 +90,7 @@ static void read_string(AVFormatContext *avctx, AVIOContext *pb, const char *tag
}
ret = avio_read(pb, value, size);
if (ret != size || !value[0]) {
if (ret != size || !size || !value[0]) {
av_free(value);
return;
}