Nullterminate strings returned via sysctl.
PR: 195668
This commit is contained in:
parent
498046a190
commit
f3b9fcf251
@ -263,6 +263,7 @@ sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS)
|
||||
}
|
||||
}
|
||||
}
|
||||
sbuf_putc(&sbuf, 0); /* nullterm */
|
||||
error = sbuf_finish(&sbuf);
|
||||
sbuf_delete(&sbuf);
|
||||
return (error);
|
||||
@ -292,6 +293,7 @@ sysctl_vm_phys_segs(SYSCTL_HANDLER_ARGS)
|
||||
sbuf_printf(&sbuf, "domain: %d\n", seg->domain);
|
||||
sbuf_printf(&sbuf, "free list: %p\n", seg->free_queues);
|
||||
}
|
||||
sbuf_putc(&sbuf, 0); /* nullterm */
|
||||
error = sbuf_finish(&sbuf);
|
||||
sbuf_delete(&sbuf);
|
||||
return (error);
|
||||
|
@ -261,6 +261,7 @@ sysctl_vm_reserv_partpopq(SYSCTL_HANDLER_ARGS)
|
||||
sbuf_printf(&sbuf, "%5d: %6dK, %6d\n", level,
|
||||
unused_pages * ((int)PAGE_SIZE / 1024), counter);
|
||||
}
|
||||
sbuf_putc(&sbuf, 0); /* nullterm */
|
||||
error = sbuf_finish(&sbuf);
|
||||
sbuf_delete(&sbuf);
|
||||
return (error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user