summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-07-20 11:41:08 +1000
committerNeil Brown <neilb@suse.de>2006-07-20 11:41:08 +1000
commit39c22863ac568d257ef197dbc31bef45c596e8ca (patch)
treef47913ec43e6403cc88fe49c201f437d9b68d86e /tools
parent6fccc04c2569e54c16f9b0992aa1f5a3fbd907b4 (diff)
downloadnfs-utils-39c22863ac568d257ef197dbc31bef45c596e8ca.tar.gz
nfs-utils-39c22863ac568d257ef197dbc31bef45c596e8ca.tar.xz
nfs-utils-39c22863ac568d257ef197dbc31bef45c596e8ca.zip
Fix off-by-one error in rpcgen
We obviously need to allocate space for the terminating nul too.
Diffstat (limited to 'tools')
-rw-r--r--tools/rpcgen/rpc_cout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/rpcgen/rpc_cout.c b/tools/rpcgen/rpc_cout.c
index 377ba0b..a9d1456 100644
--- a/tools/rpcgen/rpc_cout.c
+++ b/tools/rpcgen/rpc_cout.c
@@ -692,7 +692,7 @@ upcase(char *str)
char *ptr, *hptr;
- ptr = (char *) malloc(strlen(str));
+ ptr = (char *) malloc(strlen(str)+1);
if (ptr == (char *) NULL) {
f_print(stderr, "malloc failed \n");
exit(1);