Date: Wed, 21 Oct 2020 17:11:58 +0000 (UTC) From: Eric van Gyzen <vangyzen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366914 - head/sys/dev/ntb/test Message-ID: <202010211711.09LHBwiu023420@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vangyzen Date: Wed Oct 21 17:11:57 2020 New Revision: 366914 URL: https://svnweb.freebsd.org/changeset/base/366914 Log: 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 Modified: head/sys/dev/ntb/test/ntb_tool.c Modified: head/sys/dev/ntb/test/ntb_tool.c ============================================================================== --- head/sys/dev/ntb/test/ntb_tool.c Wed Oct 21 16:30:34 2020 (r366913) +++ head/sys/dev/ntb/test/ntb_tool.c Wed Oct 21 17:11:57 2020 (r366914) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010211711.09LHBwiu023420>