On Tue, Aug 30, 2016 at 05:52:58PM -0700, [email protected] wrote:
> 
> # HG changeset patch
> # User David Champion <[email protected]>
> # Date 1472604759 25200
> #      Tue Aug 30 17:52:39 2016 -0700
> # Node ID be92ca7a461efd7815d5f6b170292798b7c79b3c
> # Parent  788059e7b1182f283c6d21139beaf9dd0d587035
> setenv/unsetenv for altering process environment (to affect children)

Hi David,

This is just a brief perusal - I didn't have a chance to apply and test
the code yet.

First comment is to run check_sec.sh.  At least the FREE probably needs
a comment to quiet that script.

Second, you may want to use safe_realloc instead of realloc().

Lastly, I'd recommend using strfcpy instead of strncpy below, just to
avoid the theoretical possibility where tmp->data is 1024 or bigger.

> diff --git a/init.c b/init.c
> +    /* Format var=value string */
> +    strncpy(work, tmp->data, sizeof(work));
> +    len = strlen(work);
> +     work[len++] = '=';
> +    mutt_extract_token (tmp, s, 0);
> +    strncpy(&work[len], tmp->data, sizeof(work)-len);

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to