about summary refs log tree commit diff
path: root/sunrpc/rpc_cout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc/rpc_cout.c')
-rw-r--r--sunrpc/rpc_cout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sunrpc/rpc_cout.c b/sunrpc/rpc_cout.c
index 44027ea39e..a6471ab335 100644
--- a/sunrpc/rpc_cout.c
+++ b/sunrpc/rpc_cout.c
@@ -801,7 +801,7 @@ static char *
 upcase (const char *str)
 {
   char *ptr, *hptr;
-  ptr = malloc (strlen (str));
+  ptr = malloc (strlen (str) + 1);
   if (ptr == NULL)
     {
       f_print (stderr, "malloc failed\n");