elementary: improve stability/safety of quicklaunch.

SVN revision: 80308
This commit is contained in:
Cedric BAIL 2012-12-06 08:15:08 +00:00
parent 53bec88358
commit 8830f43b7d
4 changed files with 24 additions and 11 deletions

View File

@ -767,3 +767,7 @@
* Fix naviframe to not send hide signals even before item doens't created
yet.
2012-12-06 Cedric Bail
* Fix possible segv in elm_quicklaunch infrastructure.

View File

@ -76,6 +76,7 @@ Fixes:
* Fix possible divide by zero in els_scroller animator.
* Fix uninitialized data path in elm_flip, elm_gesture_layer, elm_interface_scrollable,
els_scroller.
* Fix possible segv in elm_quicklaunch infrastructure.
Removals:

View File

@ -114,19 +114,23 @@ handle_run(int fd, unsigned long bytes)
argc = ((unsigned long *)(buf))[0];
envnum = ((unsigned long *)(buf))[1];
if (argc <= 0)
{
CRITICAL("no executable specified");
close(fd);
return;
}
if (argc > 0) argv = alloca(argc * sizeof(char *));
argv = alloca(argc * sizeof(char *));
if (envnum > 0) envir = alloca(envnum * sizeof(char *));
off = ((unsigned long *)(buf))[2 + argc + envnum] - sizeof(unsigned long);
cwd = (char *)(buf + off);
if (argv)
for (i = 0; i < argc; i++)
{
for (i = 0; i < argc; i++)
{
off = ((unsigned long *)(buf))[2 + i] - sizeof(unsigned long);
argv[i] = (char *)(buf + off);
}
off = ((unsigned long *)(buf))[2 + i] - sizeof(unsigned long);
argv[i] = (char *)(buf + off);
}
#ifdef HAVE_ENVIRON

View File

@ -692,11 +692,15 @@ static int (*qr_main)(int argc,
char **argv) = NULL;
EAPI Eina_Bool
elm_quicklaunch_prepare(int argc __UNUSED__,
char **argv)
elm_quicklaunch_prepare(int argc,
char **argv)
{
#ifdef HAVE_FORK
char *exe = elm_quicklaunch_exe_path_get(argv[0]);
char *exe;
if (argc <= 0 || argv == NULL) return EINA_FALSE;
exe = elm_quicklaunch_exe_path_get(argv[0]);
if (!exe)
{
ERR("requested quicklaunch binary '%s' does not exist\n", argv[0]);