Hi,

On Tue, Nov 24, 2026 at 01:48:40AM +0300, Ahmed Khider wrote:
> @@ -202,7 +202,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
>        {
>       char *end = NULL;
>       mode_t mode = strtoul (arg, &end, 8);
> -     if (end == NULL || end == arg)
> +     errno = 0; 
> +     if (errno != 0 || *end !='\0' || arg[0] > 7 || arg[0] < 0)
>         {

This won't work, I think. Why clearing errno before checking it?
Checking *end before knowing end != null? arg[0] compared to integers
instead of characters (i.e. '7' and '0')

Cheers,
Diego

Reply via email to