mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 12:56:40 +00:00
avformat/wtvdec: Check pointer before use
Fixes out of array read
Fixes: 049fdf78565f1ce5665df236d90f8657/asan_heap-oob_10a5a97_1026_42f9d4855547329560f385768de2f3fb.wtv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cc5e5548df
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
fe7366ee93
commit
2858f77fd4
@ -1033,7 +1033,7 @@ static int read_header(AVFormatContext *s)
|
||||
while (1) {
|
||||
uint64_t frame_nb = avio_rl64(pb);
|
||||
uint64_t position = avio_rl64(pb);
|
||||
while (frame_nb > e->size && e <= e_end) {
|
||||
while (e <= e_end && frame_nb > e->size) {
|
||||
e->pos = last_position;
|
||||
e++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user