diff --git a/src/userprog/process.c b/src/userprog/process.c index 6c8ef2d..7dced36 100644 --- a/src/userprog/process.c +++ b/src/userprog/process.c @@ -81,12 +81,12 @@ start_process (void *file_name_) char *saveptr; char *arg = strtok_r (file_name_, " ", &saveptr); - char file_name[15]; - strlcpy (file_name, arg, 15); + char file_name[FNAME_MAX_LEN + 1]; + strlcpy (file_name, arg, FNAME_MAX_LEN + 1); /* TODO: Move naming of thread to process_execute, so start tokenizing there. */ - strlcpy (thread_current ()->name, file_name, 15); + strlcpy (thread_current ()->name, file_name, FNAME_MAX_LEN + 1); /* Initialize interrupt frame and load executable. */ memset (&if_, 0, sizeof if_);