From 6b3d2ba5e098fb24dde8ac3c467e93f00e5a13d5 Mon Sep 17 00:00:00 2001 From: Sergio Date: Wed, 11 Feb 2026 08:36:05 +0100 Subject: [PATCH] fix: fixed segfault caused by invalid read NULL value caused the error logger to crash --- src/parser/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/parser.c b/src/parser/parser.c index 6a5dbf2..73f9279 100644 --- a/src/parser/parser.c +++ b/src/parser/parser.c @@ -148,7 +148,7 @@ t_redirection *redirection_new( if (*tokens == NULL) { free(redirection); - return (syntax_error_unexpected_token(NULL), NULL); + return (syntax_error_unexpected_token(token), NULL); } token = (t_token *)(*tokens)->content; if (token->type != TOKEN_WORD)