From f1c418cfd499501e381a986460cca8ff2f6d29f5 Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Fri, 4 Aug 2000 10:34:59 +0000 Subject: [PATCH] Don't overflow the internal buffer in clnt_sperror() --- lib/libc/rpc/clnt_perror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/rpc/clnt_perror.c b/lib/libc/rpc/clnt_perror.c index 53c2c88d8176..331f52b04496 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) {