[email protected] wrote:
> No functional or user-visible changes here.
> On that note, where did the "1024" (1023-char) come from? Is there
> anyone who has environment variables whose name goes near 1023 chars?

Probably not, but there's not much benefit to be artifically limiting here.

> @@ -95,7 +97,7 @@ createenv(struct rule *rule)
>                       if ((eq = strchr(e, '=')) == NULL || eq == e)
>                               continue;
>                       len = eq - e;
> -                     if (len > sizeof(name) - 1)
> +                     if (len > VARNAME_MAX)
>                               continue;
>                       memcpy(name, e, len);
>                       name[len] = '\0';

I don't like changes like this because if the size ever changes again, it's
possible for the check to become decoupled.

Reply via email to