Add a nulterm byte to the returned sysctl string.
PR: 195668
This commit is contained in:
parent
cb2eadc65f
commit
e497716fbd
@ -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…
Reference in New Issue
Block a user