forked from enlightenment/efl
parent
bec24bf71f
commit
4b221c3936
|
@ -824,6 +824,7 @@ efreet_desktop_string_list_join(Eina_List *list)
|
||||||
{
|
{
|
||||||
size = len + pos + 1024;
|
size = len + pos + 1024;
|
||||||
string = realloc(string, size);
|
string = realloc(string, size);
|
||||||
|
if (!string) return NULL;
|
||||||
}
|
}
|
||||||
strcpy(string + pos, tmp);
|
strcpy(string + pos, tmp);
|
||||||
pos += len;
|
pos += len;
|
||||||
|
|
|
@ -378,6 +378,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
|
||||||
{
|
{
|
||||||
size = len + 1024;
|
size = len + 1024;
|
||||||
exec = realloc(exec, size);
|
exec = realloc(exec, size);
|
||||||
|
if (!exec) goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX handle fields inside quotes? */
|
/* XXX handle fields inside quotes? */
|
||||||
|
@ -458,6 +459,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
|
||||||
{
|
{
|
||||||
size = len + 1024;
|
size = len + 1024;
|
||||||
exec = realloc(exec, size);
|
exec = realloc(exec, size);
|
||||||
|
if (!exec) goto error;
|
||||||
}
|
}
|
||||||
exec[len++] = ' ';
|
exec[len++] = ' ';
|
||||||
exec = efreet_desktop_command_append_multiple(exec, &size,
|
exec = efreet_desktop_command_append_multiple(exec, &size,
|
||||||
|
@ -476,6 +478,13 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
|
||||||
while ((l = eina_list_next(l)) != NULL);
|
while ((l = eina_list_next(l)) != NULL);
|
||||||
|
|
||||||
return execs;
|
return execs;
|
||||||
|
error:
|
||||||
|
if (execs)
|
||||||
|
{
|
||||||
|
EINA_LIST_FREE(execs, exec)
|
||||||
|
free(exec);
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -836,6 +845,7 @@ efreet_string_append(char *dest, int *size, int *len, const char *src)
|
||||||
*len = *size - 1;
|
*len = *size - 1;
|
||||||
*size += 1024;
|
*size += 1024;
|
||||||
dest = realloc(dest, *size);
|
dest = realloc(dest, *size);
|
||||||
|
if (!dest) return NULL;
|
||||||
*(dest + *len) = '\0';
|
*(dest + *len) = '\0';
|
||||||
|
|
||||||
l = eina_strlcpy(dest + *len, src + off, *size - *len);
|
l = eina_strlcpy(dest + *len, src + off, *size - *len);
|
||||||
|
@ -852,6 +862,7 @@ efreet_string_append_char(char *dest, int *size, int *len, char c)
|
||||||
{
|
{
|
||||||
*size += 1024;
|
*size += 1024;
|
||||||
dest = realloc(dest, *size);
|
dest = realloc(dest, *size);
|
||||||
|
if (!dest) return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dest[(*len)++] = c;
|
dest[(*len)++] = c;
|
||||||
|
|
Loading…
Reference in New Issue