Fix DoS due to lack of eof check
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 4m33s
Build system / Build (pull_request) Successful in 41m8s

This commit is contained in:
2025-12-11 20:52:05 +08:00
parent 7b0867a6cf
commit f6e9c0eed5

View File

@@ -267,8 +267,12 @@ static int cine_read_header(AVFormatContext *avctx)
/* parse image offsets */
avio_seek(pb, offImageOffsets, SEEK_SET);
for (i = 0; i < st->duration; i++)
for (i = 0; i < st->duration; i++) {
if (avio_feof(pb))
return AVERROR_INVALIDDATA;
av_add_index_entry(st, avio_rl64(pb), i, 0, 0, AVINDEX_KEYFRAME);
}
return 0;
}