Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Le builtin cd crash si PWD n'est pas set. #1

Closed
FranckRJ opened this issue Mar 15, 2019 · 1 comment
Closed

Le builtin cd crash si PWD n'est pas set. #1

FranckRJ opened this issue Mar 15, 2019 · 1 comment

Comments

@FranckRJ
Copy link
Collaborator

FranckRJ commented Mar 15, 2019

42sh/srcs/builtins/cd.c

Lines 81 to 82 in 79ad785

tmp = find_elem_env(lst_env, "PWD");
ft_memdel((void **)&(tmp->value));

Il crash sur la ligne du ft_memdel car tmp vaut NULL (PWD pas set donc find_elem_env retourne NULL).

Il faudrait checker si ça ne peut pas arriver dans d'autres cas.

@tcollard

@jocohen
Copy link
Collaborator

jocohen commented Mar 19, 2019

Update de t_var *var en t_var **var

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants