PR #22935 opened by Zhao Zhili (quink) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22935 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22935.patch
Signed-off-by: Zhao Zhili <[email protected]> >From b730182f269e4a927ee3335052fdfa603f192eca Mon Sep 17 00:00:00 2001 From: Zhao Zhili <[email protected]> Date: Mon, 27 Apr 2026 16:19:41 +0800 Subject: [PATCH] avformat/wavdec: fix unchecked avio_read in w64_read_header Signed-off-by: Zhao Zhili <[email protected]> --- libavformat/wavdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 8ff80abc01..f56f9d5c59 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -885,7 +885,9 @@ static int w64_read_header(AVFormatContext *s) if (avio_rl64(pb) < 16 + 8 + 16 + 8 + 16 + 8) return AVERROR_INVALIDDATA; - avio_read(pb, guid, 16); + ret = ffio_read_size(pb, guid, 16); + if (ret < 0) + return ret; if (memcmp(guid, ff_w64_guid_wave, 16)) { av_log(s, AV_LOG_ERROR, "could not find wave guid\n"); return AVERROR_INVALIDDATA; -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
