summaryrefslogtreecommitdiff
path: root/src/launchpad.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/launchpad.c')
-rwxr-xr-xsrc/launchpad.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/launchpad.c b/src/launchpad.c
index 7c6540e..57a92e4 100755
--- a/src/launchpad.c
+++ b/src/launchpad.c
@@ -520,10 +520,14 @@ static int __prepare_exec(const char *appid, const char *app_path,
if (app_path == NULL)
return PAD_ERR_INVALID_ARGUMENT;
- file_name = strrchr(app_path, '/') + 1;
+ file_name = strrchr(app_path, '/');
if (file_name == NULL)
return PAD_ERR_INVALID_PATH;
+ file_name++;
+ if (*file_name == '\0')
+ return PAD_ERR_INVALID_PATH;
+
_prepare_listen_sock();
memset(process_name, '\0', AUL_PR_NAME);