3lsy / minishell

Simple shell in C
2 stars 0 forks source link

echo $envar #35

Closed AndreIglesias closed 11 months ago

AndreIglesias commented 11 months ago

if envar doesn't exists:

==13056== Invalid read of size 1
==13056==    at 0x10B926: expand_line (in /home//42/minishell/minishell)
==13056==    by 0x10A861: ft_lexer (in /home//42/minishell/minishell)
==13056==    by 0x10A7CA: ft_analyzer (in /home//42/minishell/minishell)
==13056==    by 0x10A429: main (in /home//42/minishell/minishell)
==13056==  Address 0x10d48ff6 is 0 bytes after a block of size 6 alloc'd
==13056==    at 0x8961899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==13056==    by 0x110341: ft_strjoin (in /home//42/minishell/minishell)
==13056==    by 0x10B87E: expand_env_var (in /home//42/minishell/minishell)
==13056==    by 0x10BA31: expand_line (in /home//42/minishell/minishell)
==13056==    by 0x10A861: ft_lexer (in /home//42/minishell/minishell)
==13056==    by 0x10A7CA: ft_analyzer (in /home//42/minishell/minishell)
==13056==    by 0x10A429: main (in /home//42/minishell/minishell)