Don't overflow the internal buffer in clnt_sperror()

This commit is contained in:
Kris Kennaway 2000-08-04 10:34:59 +00:00
parent 8f6d480067
commit f1c418cfd4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64237

View file

@ -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) {