From 6a3cf67d33497826128e40729c5054747ffa038b Mon Sep 17 00:00:00 2001 From: sBubshait Date: Thu, 7 Nov 2024 11:55:26 +0000 Subject: [PATCH] Fix Bug in process.c initialising a char to NULL --- src/userprog/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/userprog/process.c b/src/userprog/process.c index 0e9fc75..01f30d5 100644 --- a/src/userprog/process.c +++ b/src/userprog/process.c @@ -147,7 +147,7 @@ start_process (void *file_name_) /* Push a null pointer sentinel inside argv. */ if_.esp -= sizeof (char *); - *(char *) if_.esp = NULL; + *(char *) if_.esp = 0; /* Push pointer to the process file name to the stack. */ char **argv; @@ -173,7 +173,7 @@ start_process (void *file_name_) /* Push fake return address (null pointer). */ if_.esp -= sizeof (char *); - *(char *) if_.esp = NULL; + *(char *) if_.esp = 0; /* If load failed, quit. */ palloc_free_page (file_name_);