fix usage of PATH_MAX when not working with files
SVN revision: 75518
This commit is contained in:
parent
b565b6ca04
commit
a8beb0950c
|
@ -14,10 +14,6 @@
|
|||
#include <xcb/xcb.h>
|
||||
#include <xcb/shape.h>
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 4096
|
||||
#endif
|
||||
|
||||
#define WINDOW_WIDTH 320
|
||||
#define WINDOW_HEIGHT 240
|
||||
|
||||
|
@ -451,7 +447,7 @@ static void
|
|||
_e_alert_draw_text(void)
|
||||
{
|
||||
xcb_void_cookie_t cookie;
|
||||
char warn[1024], msg[PATH_MAX], line[1024];
|
||||
char warn[1024], msg[4096], line[1024];
|
||||
unsigned int i = 0, j = 0, k = 0;
|
||||
|
||||
snprintf(msg, sizeof(msg),
|
||||
|
|
|
@ -447,7 +447,7 @@ EAPI void
|
|||
e_bg_handler_set(Evas_Object *obj __UNUSED__, const char *path, void *data __UNUSED__)
|
||||
{
|
||||
E_Container *con;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
int copy = 1;
|
||||
E_Zone *zone;
|
||||
E_Desk *desk;
|
||||
|
|
|
@ -1148,7 +1148,7 @@ _e_border_frame_replace(E_Border *bd, Eina_Bool argb)
|
|||
{
|
||||
Ecore_X_Window win;
|
||||
Ecore_Evas *bg_ecore_evas;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
bd->argb = argb;
|
||||
|
||||
|
@ -7554,7 +7554,7 @@ _e_border_eval0(E_Border *bd)
|
|||
if ((!bd->client.border.name) || (strcmp(bd->client.border.name, bordername)))
|
||||
{
|
||||
Evas_Object *o;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
int ok;
|
||||
|
||||
bd->changes.border = 1;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
EINTERN int
|
||||
e_deskenv_init(void)
|
||||
{
|
||||
char buf[PATH_MAX], buf2[PATH_MAX];
|
||||
char buf[PATH_MAX], buf2[4096];
|
||||
|
||||
// run xdrb -load .Xdefaults & .Xresources
|
||||
// NOTE: one day we should replace this with an e based config + service
|
||||
|
|
|
@ -54,8 +54,8 @@ struct _E_Desklock_Auth
|
|||
pam_handle_t *handle;
|
||||
} pam;
|
||||
|
||||
char user[PATH_MAX];
|
||||
char passwd[PATH_MAX];
|
||||
char user[4096];
|
||||
char passwd[4096];
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#define e_error_message_show(args...) do \
|
||||
{ \
|
||||
char __tmpbuf[PATH_MAX]; \
|
||||
char __tmpbuf[4096]; \
|
||||
\
|
||||
snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
|
||||
e_error_message_show_internal(__tmpbuf); \
|
||||
|
|
|
@ -161,7 +161,7 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
|
|||
Eina_List *l, *lnew;
|
||||
Ecore_Exe *exe = NULL;
|
||||
char *penv_display;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
launch = data;
|
||||
inst = E_NEW(E_Exec_Instance, 1);
|
||||
|
@ -427,7 +427,7 @@ _e_exec_cb_exit(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|||
"E", "_e_exec_run_error_dialog");
|
||||
if (dia)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
e_dialog_title_set(dia, _("Application run error"));
|
||||
snprintf(buf, sizeof(buf),
|
||||
|
@ -539,7 +539,7 @@ _e_exec_error_dialog(Efreet_Desktop *desktop, const char *exec, Ecore_Exe_Event_
|
|||
static void
|
||||
_fill_data(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
if (!cfdata->label)
|
||||
{
|
||||
|
@ -693,7 +693,7 @@ _dialog_scrolltext_create(Evas *evas, char *title, Ecore_Exe_Event_Data_Line *li
|
|||
static Evas_Object *
|
||||
_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
int error_length = 0;
|
||||
Evas_Object *o, *ob, *os;
|
||||
|
||||
|
@ -736,7 +736,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
|
|||
static Evas_Object *
|
||||
_advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
int read_length = 0;
|
||||
int error_length = 0;
|
||||
Evas_Object *o, *of, *ob, *ot;
|
||||
|
|
|
@ -973,7 +973,7 @@ _e_icon_cache_find(Evas_Object *obj, const char *file)
|
|||
{
|
||||
E_Smart_Data *sd;
|
||||
Cache_Item *ci;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
const char *id;
|
||||
Eina_List *l;
|
||||
|
||||
|
@ -982,7 +982,7 @@ _e_icon_cache_find(Evas_Object *obj, const char *file)
|
|||
if (!(sd = evas_object_smart_data_get(obj)))
|
||||
return EINA_FALSE;
|
||||
|
||||
snprintf(buf, PATH_MAX, "%d:%s", sd->size, file);
|
||||
snprintf(buf, sizeof(buf), "%d:%s", sd->size, file);
|
||||
|
||||
if ((ci = eina_hash_find(_cache->hash, buf)))
|
||||
{
|
||||
|
|
|
@ -421,7 +421,7 @@ _fill_styles(E_Config_Dialog_Data *cfdata, Evas_Object *obj)
|
|||
EINA_LIST_FOREACH(styles, l, style)
|
||||
{
|
||||
Evas_Object *thumb, *ow;
|
||||
char buff[PATH_MAX];
|
||||
char buff[4096];
|
||||
|
||||
thumb = e_livethumb_add(evas);
|
||||
e_livethumb_vsize_set(thumb, 120, 40);
|
||||
|
|
|
@ -195,7 +195,7 @@ _xdg_data_dirs_augment(void)
|
|||
{
|
||||
const char *s = getenv("XDG_DATA_DIRS");
|
||||
const char *p = e_prefix_get();
|
||||
char newpath[PATH_MAX], buf[PATH_MAX];
|
||||
char newpath[4096], buf[4096];
|
||||
|
||||
if (!p) return;
|
||||
|
||||
|
@ -1296,7 +1296,7 @@ _e_main_parse_arguments(int argc, char **argv)
|
|||
s = getenv("DISPLAY");
|
||||
if (s)
|
||||
{
|
||||
char *p, buff[PATH_MAX];
|
||||
char *p, buff[4096];
|
||||
|
||||
if (!(p = strrchr(s, ':')))
|
||||
{
|
||||
|
|
|
@ -112,7 +112,7 @@ e_module_new(const char *name)
|
|||
{
|
||||
E_Module *m;
|
||||
char buf[PATH_MAX];
|
||||
char body[PATH_MAX], title[1024];
|
||||
char body[4096], title[1024];
|
||||
const char *modpath;
|
||||
char *s;
|
||||
Eina_List *l;
|
||||
|
@ -502,7 +502,7 @@ static void
|
|||
_e_module_dialog_disable_show(const char *title, const char *body, E_Module *m)
|
||||
{
|
||||
E_Dialog *dia;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
printf("MODULE ERR:\n%s\n", body);
|
||||
dia = e_dialog_new(e_container_current_get(e_manager_current_get()),
|
||||
|
|
|
@ -585,7 +585,7 @@ e_shelf_unsave(E_Shelf *es)
|
|||
EAPI void
|
||||
e_shelf_orient(E_Shelf *es, E_Gadcon_Orient orient)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
E_OBJECT_CHECK(es);
|
||||
E_OBJECT_IF_NOT_TYPE(es, E_SHELF_DUMMY_TYPE)
|
||||
|
@ -1235,7 +1235,7 @@ _e_shelf_gadcon_frame_request(void *data, E_Gadcon_Client *gcc, const char *styl
|
|||
{
|
||||
E_Shelf *es;
|
||||
Evas_Object *o;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
es = data;
|
||||
o = edje_object_add(gcc->gadcon->evas);
|
||||
|
|
|
@ -45,7 +45,7 @@ static void
|
|||
_e_startup(void)
|
||||
{
|
||||
Efreet_Desktop *desktop;
|
||||
char buf[PATH_MAX];
|
||||
char buf[8192];
|
||||
|
||||
if (!startup_apps)
|
||||
{
|
||||
|
|
|
@ -312,7 +312,7 @@ _e_sys_cb_logout_abort(void *data __UNUSED__, E_Dialog *dia)
|
|||
static void
|
||||
_e_sys_logout_confirm_dialog_update(int remaining)
|
||||
{
|
||||
char txt[PATH_MAX];
|
||||
char txt[4096];
|
||||
|
||||
if (!_e_sys_logout_confirm_dialog)
|
||||
{
|
||||
|
|
|
@ -152,7 +152,7 @@ static void
|
|||
_update_machid_get(void)
|
||||
{
|
||||
FILE *f;
|
||||
char buf[PATH_MAX], *c;
|
||||
char buf[4096], *c;
|
||||
size_t len;
|
||||
|
||||
f = fopen("/etc/machine-id", "r");
|
||||
|
|
|
@ -160,7 +160,7 @@ e_util_head_exec(int head, const char *cmd)
|
|||
{
|
||||
char *penv_display;
|
||||
char *p1, *p2;
|
||||
char buf[PATH_MAX], buf2[32];
|
||||
char buf[4096], buf2[32];
|
||||
int ok = 0;
|
||||
Ecore_Exe *exe;
|
||||
|
||||
|
@ -359,7 +359,7 @@ EAPI int
|
|||
e_util_edje_icon_check(const char *name)
|
||||
{
|
||||
const char *file;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
if ((!name) || (!name[0])) return 0;
|
||||
snprintf(buf, sizeof(buf), "e/icons/%s", name);
|
||||
|
@ -375,7 +375,7 @@ EAPI int
|
|||
e_util_edje_icon_set(Evas_Object *obj, const char *name)
|
||||
{
|
||||
const char *file;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
if ((!name) || (!name[0])) return 0;
|
||||
snprintf(buf, sizeof(buf), "e/icons/%s", name);
|
||||
|
@ -392,7 +392,7 @@ static int
|
|||
_e_util_icon_theme_set(Evas_Object *obj, const char *icon, Eina_Bool fallback)
|
||||
{
|
||||
const char *file;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
if ((!icon) || (!icon[0])) return 0;
|
||||
snprintf(buf, sizeof(buf), "e/icons/%s", icon);
|
||||
|
@ -455,7 +455,7 @@ int
|
|||
_e_util_menu_item_edje_icon_set(E_Menu_Item *mi, const char *name, Eina_Bool fallback)
|
||||
{
|
||||
const char *file;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
|
||||
if ((!name) || (!name[0])) return 0;
|
||||
|
||||
|
@ -1246,7 +1246,7 @@ static Eina_Bool
|
|||
_e_util_conf_timer_old(void *data)
|
||||
{
|
||||
char *module_name = data;
|
||||
char buf[PATH_MAX];
|
||||
char buf[4096];
|
||||
char *msg =
|
||||
_("Configuration data needed "
|
||||
"upgrading. Your old configuration<br> has been"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#define e_util_dialog_show(title, args...) \
|
||||
{ \
|
||||
char __tmpbuf[PATH_MAX]; \
|
||||
char __tmpbuf[4096]; \
|
||||
\
|
||||
snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
|
||||
e_util_dialog_internal(title, __tmpbuf); \
|
||||
|
|
Loading…
Reference in New Issue