diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-15 16:01:55 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-15 16:01:55 +0000 |
commit | 986f9c4fee2d91d4472d4e91d8d07c78e0065112 (patch) | |
tree | 12cfe6ea9d9c016f229946b0ae440e2cb41fbdf4 | |
parent | c8a1bdf61be88cb2fca7ced88274eb9a91442e48 (diff) | |
download | gcc-986f9c4fee2d91d4472d4e91d8d07c78e0065112.tar.gz |
* xcoffout.c (xcoffout_declare_function): Change strncpy to memcpy.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92202 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/xcoffout.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0acb9a4b421..7c981a64ecf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-12-15 David Edelsohn <edelsohn@gnu.org> + + * xcoffout.c (xcoffout_declare_function): Change strncpy to memcpy. + 2004-12-15 Ian Lance Taylor <ian@wasabisystems.com> * config/arm/arm.c (arm_xscale_rtx_costs): Increase cost of diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c index a2d8a33ba5f..f2b8a3fbe77 100644 --- a/gcc/xcoffout.c +++ b/gcc/xcoffout.c @@ -413,7 +413,7 @@ xcoffout_declare_function (FILE *file, tree decl, const char *name) if (name[len - 1] == ']') { char *n = alloca (len - 3); - strncpy (n, name, len - 4); + memcpy (n, name, len - 4); n[len - 4] = '\0'; name = n; } |