diff options
author | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-12-19 19:38:28 +0000 |
---|---|---|
committer | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-12-19 19:38:28 +0000 |
commit | c0e54fd248d11f41ac44756b34b47d2054d82465 (patch) | |
tree | 83ea5587981cda6ab1654d6272807d8c6e82c06f /libmpcodecs/ad_ffmpeg.c | |
parent | 335f35f2bf4d6fbc7caa9a27e8f8d21f4c937477 (diff) | |
download | mpv-c0e54fd248d11f41ac44756b34b47d2054d82465.tar.bz2 mpv-c0e54fd248d11f41ac44756b34b47d2054d82465.tar.xz |
malloc padding to avoid access beyond allocated memory
Credits to Mikulas Patocka (mikulas at artax karlin mff cuni cz)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17227 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/ad_ffmpeg.c')
-rw-r--r-- | libmpcodecs/ad_ffmpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index d1132d43f1..0f8d667c26 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -73,7 +73,7 @@ static int init(sh_audio_t *sh_audio) /* alloc extra data */ if (sh_audio->wf && sh_audio->wf->cbSize > 0) { - lavc_context->extradata = av_malloc(sh_audio->wf->cbSize); + lavc_context->extradata = av_mallocz(sh_audio->wf->cbSize + FF_INPUT_BUFFER_PADDING_SIZE); lavc_context->extradata_size = sh_audio->wf->cbSize; memcpy(lavc_context->extradata, (char *)sh_audio->wf + sizeof(WAVEFORMATEX), lavc_context->extradata_size); |