From ef5c356153d3a99edca63188e58fef28f20c6fef Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Thu, 9 Dec 2010 10:14:11 +0000 Subject: [PATCH] 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). SVN revision: 55403 --- legacy/eina/src/lib/eina_file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/legacy/eina/src/lib/eina_file.c b/legacy/eina/src/lib/eina_file.c index c62527b427..08a8dd5f41 100644 --- a/legacy/eina/src/lib/eina_file.c +++ b/legacy/eina/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);