mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
redirection parsing: check for null in arguments
This commit is contained in:
parent
d9dfac106d
commit
47ac767f2a
2 changed files with 13 additions and 4 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/07 12:30:04 by khais #+# #+# */
|
||||
/* Updated: 2025/03/11 14:57:56 by khais ### ########.fr */
|
||||
/* Updated: 2025/03/11 14:58:11 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -71,6 +71,8 @@ struct s_simple_cmd *parse_redirections(struct s_simple_cmd *cmd)
|
|||
t_redir_type type;
|
||||
size_t i;
|
||||
|
||||
if (cmd == NULL)
|
||||
return (NULL);
|
||||
i = 0;
|
||||
while (wordlist_get(cmd->words, i) != NULL)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue