PR #22904 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22904
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22904.patch

Signed-off-by: Michael Niedermayer <[email protected]>


>From 8db90cdf90c8a8517a43441f4666d35a8afac39d Mon Sep 17 00:00:00 2001
From: ASTRA <[email protected]>
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 <[email protected]>
---
 libavformat/wavdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 7d701c517a..8ff80abc01 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -694,7 +694,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;
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to