* [FFmpeg-devel] [PR] avformat/wtvdec: Check that language is fully read (PR #22254)
@ 2026-02-22 16:05 michaelni via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: michaelni via ffmpeg-devel @ 2026-02-22 16:05 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: michaelni
PR #22254 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22254
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22254.patch
Fixes: use-of-uninitialized-value
Fixes: 483856523/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5221422609006592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
>From ad28d78639c4cbbb7f4975977e777206896e4e9e Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michael@niedermayer.cc>
Date: Sun, 22 Feb 2026 13:47:23 +0100
Subject: [PATCH] avformat/wtvdec: Check that language is fully read
Fixes: use-of-uninitialized-value
Fixes: 483856523/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5221422609006592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavformat/wtvdec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 1f299510c9..50d019a03f 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -881,7 +881,8 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
AVStream *st = s->streams[stream_index];
uint8_t language[4];
avio_skip(pb, 12);
- avio_read(pb, language, 3);
+ if (avio_read(pb, language, 3) != 3)
+ return AVERROR_INVALIDDATA;
if (language[0]) {
language[3] = 0;
av_dict_set(&st->metadata, "language", language, 0);
--
2.52.0
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-02-22 18:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-22 16:05 [FFmpeg-devel] [PR] avformat/wtvdec: Check that language is fully read (PR #22254) michaelni via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git