summaryrefslogtreecommitdiffstats
path: root/libmpdemux/mf.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/mf.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/mf.c')
-rw-r--r--libmpdemux/mf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmpdemux/mf.c b/libmpdemux/mf.c
index f138710b28..2c05ea0e35 100644
--- a/libmpdemux/mf.c
+++ b/libmpdemux/mf.c
@@ -106,7 +106,7 @@ mf_t* open_mf(char * filename){
{ free( mf ); free( fname ); return NULL; }
mf->nr_of_files=gg.gl_pathc;
- mf->names=malloc( gg.gl_pathc * sizeof( char* ) );
+ mf->names=calloc( gg.gl_pathc, sizeof( char* ) );
mp_msg( MSGT_STREAM,MSGL_INFO,"[mf] number of files: %d (%d)\n",mf->nr_of_files, gg.gl_pathc * sizeof( char* ) );