From 3f1752b9dcb1ed8519089d1d6b7cba908d58b57d Mon Sep 17 00:00:00 2001 From: kris Date: Fri, 4 Aug 2000 10:34:59 +0000 Subject: Don't overflow the internal buffer in clnt_sperror() --- lib/libc/rpc/clnt_perror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/rpc/clnt_perror.c') diff --git a/lib/libc/rpc/clnt_perror.c b/lib/libc/rpc/clnt_perror.c index 53c2c88..331f52b 100644 --- a/lib/libc/rpc/clnt_perror.c +++ b/lib/libc/rpc/clnt_perror.c @@ -78,7 +78,7 @@ clnt_sperror(rpch, s) return (0); CLNT_GETERR(rpch, &e); - (void) sprintf(str, "%s: %s", s, clnt_sperrno(e.re_status)); + (void) snprintf(str, CLNT_PERROR_BUFLEN, "%s: %s", s, clnt_sperrno(e.re_status)); str += strlen(str); switch (e.re_status) { -- cgit v1.1