summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_fli.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/demux_fli.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/demux_fli.c')
-rw-r--r--libmpdemux/demux_fli.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libmpdemux/demux_fli.c b/libmpdemux/demux_fli.c
index aab725b33b..3797e2b0ba 100644
--- a/libmpdemux/demux_fli.c
+++ b/libmpdemux/demux_fli.c
@@ -103,6 +103,7 @@ static demuxer_t* demux_open_fli(demuxer_t* demuxer){
frames->current_frame = 0;
// allocate enough entries for the indices
+ // audit: num_frames is 16bit so it is safe against overflow
frames->filepos = (off_t *)malloc(frames->num_frames * sizeof(off_t));
frames->frame_size = (int *)malloc(frames->num_frames * sizeof(int));