fix segv from missing null check

SVN revision: 62320
This commit is contained in:
Mike Blumenkrantz 2011-08-10 22:42:27 +00:00
parent 0603a5cf50
commit c2d2867a2b
1 changed files with 2 additions and 0 deletions

View File

@ -895,6 +895,8 @@ eina_file_map_new(Eina_File *file, Eina_File_Populate rule,
Eina_File_Map *map;
unsigned long int key[2];
EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
if (offset > file->length)
return NULL;
if (offset + length > file->length)