From: barbieri Date: Thu, 9 Dec 2010 10:14:11 +0000 (+0000) Subject: Use EINA_PATH_MAX where it makes sense. X-Git-Tag: 2.0_alpha~70^2~252 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72f564214e51d693a9843cbee5d2c1e1beb48ba7;p=framework%2Fuifw%2Feina.git Use EINA_PATH_MAX where it makes sense. All the access to Eina_File_Direct_Info::path should be using the actual size (EINA_PATH_MAX) and not another constant (PATH_MAX). git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@55403 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/eina_file.c b/src/lib/eina_file.c index c62527b..08a8dd5 100644 --- a/src/lib/eina_file.c +++ b/src/lib/eina_file.c @@ -202,7 +202,7 @@ _eina_file_direct_ls_iterator_next(Eina_File_Direct_Iterator *it, void **data) #else length = strlen(dp->d_name); #endif - if (it->info.name_start + length + 1 >= PATH_MAX) + if (it->info.name_start + length + 1 >= EINA_PATH_MAX) continue; } while ((dp->d_name[0] == '.') && @@ -571,7 +571,7 @@ eina_file_direct_ls(const char *dir) if (length < 1) return NULL; - if (length + NAME_MAX + 2 >= PATH_MAX) + if (length + NAME_MAX + 2 >= EINA_PATH_MAX) return NULL; it = calloc(1, sizeof(Eina_File_Direct_Iterator) + length); @@ -648,7 +648,7 @@ eina_file_stat_ls(const char *dir) if (length < 1) return NULL; - if (length + NAME_MAX + 2 >= PATH_MAX) + if (length + NAME_MAX + 2 >= EINA_PATH_MAX) return NULL; it = calloc(1, sizeof(Eina_File_Direct_Iterator) + length);