diff libmpdemux/demux_fli.c @ 18558:4928dd61f136

Fix potential integer overflows in memory allocation. Patch by Rich and me
author rtogni
date Sun, 04 Jun 2006 22:41:27 +0000
parents 1a2aaf037d48
children 83c3afeab35d
line wrap: on
line diff
--- a/libmpdemux/demux_fli.c	Fri Jun 02 11:31:42 2006 +0000
+++ b/libmpdemux/demux_fli.c	Sun Jun 04 22:41:27 2006 +0000
@@ -103,6 +103,7 @@
   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));