[Pkg-e-commits] [SCM] Enlightenment DR17 file chunk reading/writing library branch, upstream-vcs, updated. 724ff1721ded78eea468a35945bd2796b5219fbc

raster raster at alioth.debian.org
Sat Jun 7 17:45:15 UTC 2008


The following commit has been merged in the upstream-vcs branch:
commit e2ad6ede166d01a6d62966880666a5875394d6bf
Author: raster <raster>
Date:   Thu May 29 02:00:04 2008 +0000

    * add efreet garbage data check
    * remove printfs that clutter output
    * add efreet file type check - only parse regular files
    * chekc mmap returns correctly for MAP_FAILED results
    * edje has some stubs for adding script-only objecvts - but nothing useful
    right now

diff --git a/src/lib/eet_lib.c b/src/lib/eet_lib.c
index ec41bde..c102091 100644
--- a/src/lib/eet_lib.c
+++ b/src/lib/eet_lib.c
@@ -1252,7 +1252,11 @@ eet_open(const char *file, Eet_File_Mode mode)
 	ef->data_size = file_stat.st_size;
 	ef->data = mmap(NULL, ef->data_size, PROT_READ,
 			MAP_SHARED, fileno(ef->fp), 0);
-
+	if (ef->data == MAP_FAILED)
+	  {
+	     ef->data = NULL;
+	     return NULL;
+	  }
 	ef = eet_internal_read(ef);
 	if (!ef)
 	  return NULL;

-- 
Enlightenment DR17 file chunk reading/writing library



More information about the Pkg-e-commits mailing list