aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/oggparsetheora.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2009-06-05 23:39:11 +0000
committerDavid Conrad <lessen42@gmail.com>2009-06-05 23:39:11 +0000
commit12d7c0793be4348751ba1303d8cbbb0750f1f33b (patch)
treebfb017cf649f7e5ecf8dcc23cf2915706292f39d /libavformat/oggparsetheora.c
parent8dbd0a95eea3b30dcef8ab4d0424b624f982313a (diff)
downloadffmpeg-12d7c0793be4348751ba1303d8cbbb0750f1f33b.tar.gz
Ensure that the extradata buffer is padded appripriately in the ogg demuxer.
Spotted by valgrind. Originally committed as revision 19119 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggparsetheora.c')
-rw-r--r--libavformat/oggparsetheora.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 96c432f993..e62f288a7d 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -106,7 +106,8 @@ theora_header (AVFormatContext * s, int idx)
vorbis_comment (s, os->buf + os->pstart + 7, os->psize - 8);
}
- st->codec->extradata = av_realloc (st->codec->extradata, cds);
+ st->codec->extradata = av_realloc (st->codec->extradata,
+ cds + FF_INPUT_BUFFER_PADDING_SIZE);
cdp = st->codec->extradata + st->codec->extradata_size;
*cdp++ = os->psize >> 8;
*cdp++ = os->psize & 0xff;