Commit 93739f4bbb for ffmpeg
commit 93739f4bbbad0991b238f2f82f511c3a1c3f247d
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Sat Oct 10 06:20:44 2026 +0200
avformat/wtvdec: append depth-2 allocation table blocks at the current sector count
Found during triage/review of OSS-Fuzz issue 472529274
Fixes: VqowcCmeBsvg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 71d93936c3..adea4d9d39 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -199,7 +199,7 @@ static AVIOContext * wtvfile_open_sector(unsigned first_sector, uint64_t length,
for (i = 0; i < nb_sectors1; i++) {
if (seek_by_sector(s->pb, sectors1[i], 0) < 0)
break;
- wf->nb_sectors += read_ints(s->pb, wf->sectors + i * WTV_SECTOR_SIZE / 4, WTV_SECTOR_SIZE / 4);
+ wf->nb_sectors += read_ints(s->pb, wf->sectors + wf->nb_sectors, WTV_SECTOR_SIZE / 4);
}
} else {
av_log(s, AV_LOG_ERROR, "unsupported file allocation table depth (0x%x)\n", depth);