From b6697fbdca1c6c5293bfc7132b7dc2de98d3bf4e Mon Sep 17 00:00:00 2001 From: ASTRA Date: Thu, 23 Apr 2026 22:26:30 +0200 Subject: [PATCH] avformat/wavdec: Fix use-of-uninitialized-value in find_guid() Signed-off-by: Michael Niedermayer (cherry picked from commit 163ba704b7f579350d7765951c87882a8a20c54c) Signed-off-by: Michael Niedermayer --- libavformat/wavdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 37a214b27e..e5374675cd 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -680,7 +680,8 @@ static int64_t find_guid(AVIOContext *pb, const uint8_t guid1[16]) int64_t size; while (!avio_feof(pb)) { - avio_read(pb, guid, 16); + if (avio_read(pb, guid, 16) != 16) + break; size = avio_rl64(pb); if (size <= 24 || size > INT64_MAX - 8) return AVERROR_INVALIDDATA;