Buffer overflow from OpenBSD:
Rev 1.3 millert: Fix potential buf oflow wrt strerror and sprintf. Obtained from: OpenBSD
This commit is contained in:
parent
36f749426f
commit
4ef01e269d
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user