Commit 5eeeb4ab authored by Michael Niedermayer's avatar Michael Niedermayer

rpl: Dont fill the index with entries that failed to be parsed

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fd10a199a3c_6204_landing.rpl
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f9b997c3
......@@ -254,8 +254,10 @@ static int rpl_read_header(AVFormatContext *s)
int64_t offset, video_size, audio_size;
error |= read_line(pb, line, sizeof(line));
if (3 != sscanf(line, "%"SCNd64" , %"SCNd64" ; %"SCNd64,
&offset, &video_size, &audio_size))
&offset, &video_size, &audio_size)) {
error = -1;
continue;
}
av_add_index_entry(vst, offset, i * rpl->frames_per_chunk,
video_size, rpl->frames_per_chunk, 0);
if (ast)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment