diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/m_prompt.c | 2 | ||||
-rw-r--r-- | src/s_init.c | 1 | ||||
-rw-r--r-- | src/s_struct.h | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/m_prompt.c b/src/m_prompt.c index 584a98d..5278c42 100644 --- a/src/m_prompt.c +++ b/src/m_prompt.c @@ -99,7 +99,7 @@ static void return ; } m_subst_prompt_rice(var, msh); - ft_strlcpy(msh->ps[x - 1], var, ft_strlen(var) + 1); + ft_strlcpy(msh->ps[x - 1], var, 255); } void diff --git a/src/s_init.c b/src/s_init.c index b229cda..58f0cca 100644 --- a/src/s_init.c +++ b/src/s_init.c @@ -176,6 +176,7 @@ t_msh msh->pipes = NULL; msh->vars = NULL; msh->alias = NULL; + msh->prev_hist = NULL; set_cwd(cwd, msh); if ((msh->cwd = ft_strdup(cwd)) == NULL) return (NULL); diff --git a/src/s_struct.h b/src/s_struct.h index 31313bf..b9668de 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -82,7 +82,7 @@ typedef struct s_msh struct s_lalias *alias; char **envp; char **prev_hist; - char ps[4][1024]; + char ps[4][255]; char env_fork_tmp[128][4096]; char sqb_ref[FT_ID_SQB_COUNT][4]; char *shname; |