]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - tools/rpcgen/rpc_cout.c
Fix off-by-one error in rpcgen
[nfs-utils.git] / tools / rpcgen / rpc_cout.c
index 377ba0b405a3f37d305205811915afb2ceab9ee0..a9d14562b1af5c3564089d10732ad826d4f1e71a 100644 (file)
@@ -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);