This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 47ed4708e2f2902d335e1514726f3cba370bbd53
Author:     StressTestor <[email protected]>
AuthorDate: Sun Oct 11 22:26:31 2026 -0600
Commit:     Peter Ross <[email protected]>
CommitDate: Wed Oct 21 09:27:17 2026 +0000

    avformat/wtvdec: fail on a short read of a legacy attribute GUID
    
    get_tag() reads a 16-byte GUID attribute into a stack buffer with
    avio_read() and ignores the return value. On a legacy_attrib entry
    that is cut inside the GUID, the 16 bytes are never written and the
    uninitialised stack contents are formatted with PRI_PRETTY_GUID and
    published as a metadata string; ffprobe prints them as e.g.
    "TAG:encoder=aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaaaaaa" on a build with
    -ftrivial-auto-var-init=pattern.
    
    Use ff_get_guid(), which reads with ffio_read_size() and fails on a
    short read, and return without adding the tag, as get_tag() already
    does when a string attribute is empty.
    
    Same class as c2394a0ff3 (binka), 29f513af78 (fsb), 4b47405e1c (genh).
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Signed-off-by: StressTestor 
<[email protected]>
---
 libavformat/wtvdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index adea4d9d39..e11b00937d 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -496,7 +496,8 @@ static void get_tag(AVFormatContext *s, AVIOContext *pb, 
const char *key, int ty
         snprintf(buf, sizeof(buf), "%u", avio_rl16(pb));
     } else if (type == 6 && length == 16) {
         ff_asf_guid guid;
-        avio_read(pb, guid, 16);
+        if (ff_get_guid(pb, &guid) < 0)
+            return;
         snprintf(buf, sizeof(buf), PRI_PRETTY_GUID, ARG_PRETTY_GUID(guid));
     } else if (type == 2 && !strcmp(key, "WM/Picture")) {
         get_attachment(s, pb, length);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to