[FFmpeg-cvslog] r21926 - trunk/libavformat/mov.c

michael subversion
Sat Feb 20 23:57:24 CET 2010


Author: michael
Date: Sat Feb 20 23:57:23 2010
New Revision: 21926

Log:
Make sure we dont write more bytes into filename than the array is long.
just a precaution in case the size of the source array is increased or
made dynamically allocateable.

Modified:
   trunk/libavformat/mov.c

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	Sat Feb 20 23:48:09 2010	(r21925)
+++ trunk/libavformat/mov.c	Sat Feb 20 23:57:23 2010	(r21926)
@@ -1580,7 +1580,7 @@ static int mov_open_dref(ByteIOContext *
             }
 
         /* compose filename if next level down to target was found */
-        if (i == ref->nlvl_to - 1) {
+        if (i == ref->nlvl_to - 1 && src_path - src  < sizeof(filename)) {
             memcpy(filename, src, src_path - src);
             filename[src_path - src] = 0;
 



More information about the ffmpeg-cvslog mailing list