Add a nulterm byte to the returned sysctl string.
PR: 195668
This commit is contained in:
parent
657282e062
commit
e5197e3a08
@ -1009,7 +1009,7 @@ sysctl_kern_msgbuf(SYSCTL_HANDLER_ARGS)
|
||||
len = msgbuf_peekbytes(msgbufp, buf, sizeof(buf), &seq);
|
||||
mtx_unlock(&msgbuf_lock);
|
||||
if (len == 0)
|
||||
return (0);
|
||||
return (SYSCTL_OUT(req, "", 1)); /* add nulterm */
|
||||
|
||||
error = sysctl_handle_opaque(oidp, buf, len, req);
|
||||
if (error)
|
||||
|
Loading…
x
Reference in New Issue
Block a user