mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
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
87751a8467
commit
c50189d7ba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=22464
@ -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