about summary refs log tree commit diff
path: root/sunrpc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-11-03 08:07:39 +0000
committerUlrich Drepper <drepper@redhat.com>2008-11-03 08:07:39 +0000
commit486bdb886330a250af76cbb12af55d2c67ec0981 (patch)
treef511a942b90bf2216c123f4de8e1d5b4afbe1a65 /sunrpc
parentefac1fce6212f0e471ce7fa2519b1d3a4a084ddc (diff)
downloadglibc-486bdb886330a250af76cbb12af55d2c67ec0981.tar.gz
glibc-486bdb886330a250af76cbb12af55d2c67ec0981.tar.xz
glibc-486bdb886330a250af76cbb12af55d2c67ec0981.zip
* malloc/malloc.c (public_rEALLOc): When new arena is used, copy
	really all bytes.  Patch by Denys Vlasenko <dvlasenk@redhat.com>.
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/rpc_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c
index bda432d3cd..a3d227e524 100644
--- a/sunrpc/rpc_main.c
+++ b/sunrpc/rpc_main.c
@@ -995,7 +995,11 @@ mkfile_output (struct commandline *cmd)
 	abort ();
       temp = rindex (cmd->infile, '.');
       cp = stpcpy (mkfilename, "Makefile.");
-      strncpy (cp, cmd->infile, (temp - cmd->infile));
+      if (temp != NULL)
+	*((char *) stpncpy (cp, cmd->infile, temp - cmd->infile)) = '\0';
+      else
+	stpcpy (cp, cmd->infile);
+
     }
   else
     mkfilename = (char *) cmd->outfile;