Mercurial > libavformat.hg
diff oggparsespeex.c @ 5005:53092c7684a2 libavformat
Ensure that the extradata buffer is padded appripriately in the ogg demuxer.
Spotted by valgrind.
author | conrad |
---|---|
date | Fri, 05 Jun 2009 23:39:11 +0000 |
parents | 09e81ac02d25 |
children | ab5ed34ed707 |
line wrap: on
line diff
--- a/oggparsespeex.c Thu Jun 04 06:25:53 2009 +0000 +++ b/oggparsespeex.c Fri Jun 05 23:39:11 2009 +0000 @@ -47,7 +47,8 @@ st->codec->channels = AV_RL32(p + 48); st->codec->frame_size = AV_RL32(p + 56); st->codec->extradata_size = os->psize; - st->codec->extradata = av_malloc(st->codec->extradata_size); + st->codec->extradata = av_malloc(st->codec->extradata_size + + FF_INPUT_BUFFER_PADDING_SIZE); memcpy(st->codec->extradata, p, st->codec->extradata_size); st->time_base.num = 1;