Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2019-07-15 22:02:00 +0300
committerKen Brown <kbrown@cornell.edu>2019-07-16 20:19:05 +0300
commitb66dddb56d14a4032969fe8bb92d64baa6e0362e (patch)
tree1f01dea29e7e119b943945ec296bb8eb378d0fad /winsup/cygwin/environ.cc
parentf0cf44dc7d98d751483a91869949d58f55531e6f (diff)
Cygwin: avoid GCC 8.3 errors with -Werror=stringop-truncation
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r--winsup/cygwin/environ.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index a47ed72e7..124842734 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -644,7 +644,7 @@ _addenv (const char *name, const char *value, int overwrite)
return -1; /* Oops. No more memory. */
/* Put name '=' value into current slot. */
- strncpy (envhere, name, namelen);
+ memcpy (envhere, name, namelen);
envhere[namelen] = '=';
strcpy (envhere + namelen + 1, value);
}