#define MAX_PENDING_CONNECTIONS 10
#define MAX_LOCAL_BUFSZ 128
#define AUL_SOCK_MAXBUFF 131071
+#define LOADER_ARG_LEN 1024
#define PAD_CMD_LAUNCH 0
#define PAD_CMD_VISIBILITY 10
int pid;
char type_str[2] = {0, };
char loader_id_str[10] = {0, };
- char *argv[] = {NULL, NULL, NULL, NULL, NULL};
+ char argbuf[LOADER_ARG_LEN];
+ char *argv[] = {NULL, NULL, NULL, NULL, NULL, NULL};
candidate_process_context_t* cpt = __find_slot(type, loader_id);
if (cpt == NULL)
return -1;
+ memset(argbuf, ' ', LOADER_ARG_LEN);
+ argbuf[LOADER_ARG_LEN-1] = '\0';
+ argv[4] = argbuf;
+
cpt->last_exec_time = time(NULL);
pid = fork();
if (pid == 0) { /* child */
if (out_app_path != NULL && out_argc != NULL && out_argv != NULL) {
memset(out_app_path, '\0', strlen(out_app_path));
- sprintf(out_app_path, "%s", app_path);
+ snprintf(out_app_path, LOADER_ARG_LEN, "%s", app_path);
*out_argv = tmp_argv;
*out_argc = tmp_argc;