mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-27 21:40:34 +00:00
avformat/flac_picture: clear padding area
aviod use of uninitialized memory Fixes: asan_heap-oob_1487fa4_4706_cov_364534849_cover_art.flac Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
fff2953163
commit
13aa82bbbb
@ -110,6 +110,7 @@ int ff_flac_parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size)
|
||||
if (!(data = av_buffer_alloc(len + FF_INPUT_BUFFER_PADDING_SIZE))) {
|
||||
RETURN_ERROR(AVERROR(ENOMEM));
|
||||
}
|
||||
memset(data->data + len, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (avio_read(pb, data->data, len) != len) {
|
||||
av_log(s, AV_LOG_ERROR, "Error reading attached picture data.\n");
|
||||
if (s->error_recognition & AV_EF_EXPLODE)
|
||||
|
Loading…
Reference in New Issue
Block a user