mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-05-11 06:58:47 +02:00
「✨」 feat: Added some security to the parsing
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/30 12:52:22 by adjoly #+# #+# */
|
||||
/* Updated: 2024/06/30 17:26:09 by adjoly ### ########.fr */
|
||||
/* Updated: 2024/07/03 16:17:02 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -34,8 +34,7 @@ bool check_pipe(char *readline)
|
||||
{
|
||||
if (*tmp == '|' && is_inquote(readline, tmp - readline) == FALSE)
|
||||
{
|
||||
tmp++;
|
||||
tmp += strlen_till_end_char(tmp, ' ');
|
||||
tmp += strlen_till_end_char(tmp + 1, ' ') + 1;
|
||||
if (!*tmp)
|
||||
return (send_error_parsing("No command after pipe"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user