Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/eet

Dir     : e17/libs/eet/src/lib


Modified Files:
        eet_lib.c 


Log Message:


safe reading of mmap! corupt eet/edje files would segv e!

===================================================================
RCS file: /cvs/e/e17/libs/eet/src/lib/eet_lib.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- eet_lib.c   16 Sep 2006 05:57:36 -0000      1.71
+++ eet_lib.c   16 Oct 2006 15:02:11 -0000      1.72
@@ -1267,7 +1267,10 @@
 read_data_from_disk(Eet_File *ef, Eet_File_Node *efn, void *buf, int len)
 {
    if (ef->data)
-     memcpy (buf, ef->data + efn->offset, len);
+     {
+       if ((efn->offset + len) > ef->data_size) return 0;
+       memcpy(buf, ef->data + efn->offset, len);
+     }
    else
      {
        /* seek to data location */



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to