On Wed, Apr 13, 2011 at 7:40 PM, Vincent Torri <vto...@univ-evry.fr> wrote:
> On Wed, 13 Apr 2011, Enlightenment SVN wrote:
>> +EAPI void
>> +eina_file_map_free(Eina_File *file, void *map)
>> +{
>> +   if (file->global_map == map)
>> +     {
>> +        file->global_refcount--;
>> +
>> +        if (file->global_refcount > 0) return ;
>> +
>> +        munmap(file->global_map, file->length);
>
> shouldn't you check if file->global_map is MAP_FAILED or not ?

Well, I could, didn't take the time to exclude map from being an
invalid pointer. I think I should add more input checking anyway.
-- 
Cedric BAIL

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to