Enlightenment CVS committal

Author  : englebass
Project : e17
Module  : libs/efreet

Dir     : e17/libs/efreet/src/lib


Modified Files:
        efreet_mime.c 


Log Message:
Check for data size. Should be done throught the whole function!

===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_mime.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- efreet_mime.c       6 Sep 2007 16:15:10 -0000       1.32
+++ efreet_mime.c       15 Sep 2007 09:51:19 -0000      1.33
@@ -885,7 +885,7 @@
     ptr = data;
 
     /* make sure we're a magic file */
-    if (!ptr || strncmp(ptr, "MIME-Magic\0\n", 12))
+    if (!ptr || (size < 12) || strncmp(ptr, "MIME-Magic\0\n", 12))
         return;
 
     ptr += 12;



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to