mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-29 12:44:53 +01:00
ntb_tool: ubuf is too small to hold a human readable 64 bit value
ubuf buffer is too small. It should be 18 if a NULL is not needed, or 19 to hold the NULL terminator for the full 64-BIT value plus the 0x prefix. Submitted by: bret_ketchum@dell.com Reviewed by: markj mav MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26893
This commit is contained in:
parent
8a27a63745
commit
c59370f055
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366914
@ -384,7 +384,7 @@ get_ubuf(struct sysctl_req *req, char *ubuf)
|
||||
static int
|
||||
read_out(struct sysctl_req *req, uint64_t val)
|
||||
{
|
||||
char ubuf[16];
|
||||
char ubuf[19];
|
||||
|
||||
memset((void *)ubuf, 0, sizeof(ubuf));
|
||||
snprintf(ubuf, sizeof(ubuf), "0x%jx", val);
|
||||
|
Loading…
Reference in New Issue
Block a user