Fix bug where size of file name buffer was less than maximum file name size
This commit is contained in:
@@ -43,7 +43,7 @@ struct process_start_data
|
||||
char *cmd_saveptr; /* Value pointed to by 'saveptr' argument used by
|
||||
successive calls to strtok_r to split 'cmd' into
|
||||
tokens while maintaining state. */
|
||||
char file_name[FNAME_MAX_LEN]; /* Name of the file of the process to
|
||||
char file_name[FNAME_MAX_LEN + 1]; /* Name of the file of the process to
|
||||
be started. */
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ process_execute (const char *cmd)
|
||||
it running the function 'start_process' with the appropriate
|
||||
arguments. For details of arguments, see 'start_process'. */
|
||||
data->cmd = cmd_copy;
|
||||
strlcpy (data->file_name, file_name, FNAME_MAX_LEN);
|
||||
strlcpy (data->file_name, file_name, FNAME_MAX_LEN + 1);
|
||||
|
||||
tid = thread_create (file_name, PRI_DEFAULT, start_process, data);
|
||||
if (tid == TID_ERROR)
|
||||
|
||||
Reference in New Issue
Block a user