diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-19 22:22:38 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-19 22:24:10 +0400 |
commit | 5eeeb4abf9705891f4dd1a4499588428319dec24 (patch) | |
tree | cf0f7a8ac74603a0bedea091dad278bd84e1cce2 /libavformat/rpl.c | |
parent | f9b997c337873dad99f7fd505588b260febaf32b (diff) |
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rpl.c')
-rw-r--r-- | libavformat/rpl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rpl.c b/libavformat/rpl.c index 85b573ea1f..fb60379d3f 100644 --- a/libavformat/rpl.c +++ b/libavformat/rpl.c @@ -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) |