summaryrefslogtreecommitdiffstats
path: root/libmpdemux/muxer.c
diff options
context:
space:
mode:
authorrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-04 22:41:27 +0000
committerrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-04 22:41:27 +0000
commit9da93175794398fefeb45c6c53abdcdeda325101 (patch)
tree1dad782a7785b845d9bfc950631e91c01369154b /libmpdemux/muxer.c
parentb4ddc383ef4e4d537417999e390ab90631e7b6aa (diff)
downloadmpv-9da93175794398fefeb45c6c53abdcdeda325101.tar.bz2
mpv-9da93175794398fefeb45c6c53abdcdeda325101.tar.xz
Fix potential integer overflows in memory allocation.
Patch by Rich and me git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18559 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/muxer.c')
-rw-r--r--libmpdemux/muxer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmpdemux/muxer.c b/libmpdemux/muxer.c
index 066443fefd..3e7537307a 100644
--- a/libmpdemux/muxer.c
+++ b/libmpdemux/muxer.c
@@ -68,7 +68,7 @@ void muxer_write_chunk(muxer_stream_t *s, size_t len, unsigned int flags, double
int num = s->muxer->muxbuf_num++;
muxbuf_t *buf, *tmp;
- tmp = realloc(s->muxer->muxbuf, (num+1) * sizeof(muxbuf_t));
+ tmp = realloc_struct(s->muxer->muxbuf, (num+1), sizeof(muxbuf_t));
if(!tmp) {
mp_msg(MSGT_MUXER, MSGL_FATAL, MSGTR_MuxbufReallocErr);
return;