/* It is safe to use 'alloca' with 32K size, since the stack is at
least 2MB, and we set it to 8MB in the link command line. */
var = alloca (name_len + 2);
- strncpy (var, name, name_len);
+ memcpy (var, name, name_len);
var[name_len++] = '=';
var[name_len] = '\0';
return _putenv (var);
lname_size = strlen (resolved) + 1;
if (lname_size <= buf_size)
size_to_copy = lname_size;
- strncpy (buf, resolved, size_to_copy);
+ memcpy (buf, resolved, size_to_copy);
/* Success! */
retval = size_to_copy;
}