[FFmpeg-cvslog] avcodec/apedec: use av_fast_padded_malloc()
Michael Niedermayer
git at videolan.org
Mon Dec 23 18:30:19 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 23 18:09:58 2013 +0100| [99978320c0dcf16c34bdba19ff8f0cd61628cc41] | committer: Michael Niedermayer
avcodec/apedec: use av_fast_padded_malloc()
Fixes use of uninitialized memory
Fixes part of msan_uninit-mem_7fa0d8c8bd58_8417_sh3.ape
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99978320c0dcf16c34bdba19ff8f0cd61628cc41
---
libavcodec/apedec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 07aff92..58072d4 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -1438,7 +1438,7 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
}
if (s->fileversion < 3950) // previous versions overread two bytes
buf_size += 2;
- av_fast_malloc(&s->data, &s->data_size, buf_size);
+ av_fast_padded_malloc(&s->data, &s->data_size, buf_size);
if (!s->data)
return AVERROR(ENOMEM);
s->dsp.bswap_buf((uint32_t*)s->data, (const uint32_t*)buf, buf_size >> 2);
More information about the ffmpeg-cvslog
mailing list