NUL terminate sysctl kern.disks

This commit is contained in:
phk 2002-10-17 19:27:02 +00:00
parent 68349b6d1c
commit e81bc2ce55

View File

@ -298,7 +298,7 @@ sysctl_disks(SYSCTL_HANDLER_ARGS)
do {
tsleep(sb, PZERO, "kern.disks", hz);
} while(!sbuf_done(sb));
error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb));
error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1);
sbuf_delete(sb);
return error;
}