Buffer overflow from OpenBSD:

Rev 1.3 millert:
	Fix potential buf oflow wrt strerror and sprintf.
Obtained from: OpenBSD
This commit is contained in:
imp 1997-02-09 05:09:05 +00:00
parent 36f749426f
commit 4ef01e269d

View File

@ -244,6 +244,6 @@ error(num)
{
DEBUG2("rmtd: E %d (%s)\n", num, strerror(num));
(void)sprintf(resp, "E%d\n%s\n", num, strerror(num));
(void)snprintf(resp, sizeof(resp), "E%d\n%s\n", num, strerror(num));
(void)write(1, resp, strlen(resp));
}