Include the nulterm byte in the sysctl string.

PR:		195668
This commit is contained in:
Ian Lepore 2015-03-15 00:36:08 +00:00
parent dcdeb95f09
commit 657282e062
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=280015

View File

@ -292,7 +292,8 @@ sysctl_kern_console(SYSCTL_HANDLER_ARGS)
int delete, error;
struct sbuf *sb;
sb = sbuf_new(NULL, NULL, CNDEVPATHMAX * 2, SBUF_AUTOEXTEND);
sb = sbuf_new(NULL, NULL, CNDEVPATHMAX * 2, SBUF_AUTOEXTEND |
SBUF_INCLUDENUL);
if (sb == NULL)
return (ENOMEM);
sbuf_clear(sb);