HomeFreeBSD

The minimum sbuf buffer size is 2 bytes (a byte plus a nulterm), assert that.

Description

The minimum sbuf buffer size is 2 bytes (a byte plus a nulterm), assert that.

Values smaller than two lead to strange asserts that have nothing to do
with the actual problem (in the case of size=0), or to writing beyond the
end of the allocated buffer in sbuf_finish() (in the case of size=1).

Details

Provenance
ianAuthored on
Parents
rS280192: In sbuf_new_for_sysctl(), default the buffer size to 64 bytes if the
Branches
Unknown
Tags
Unknown

Event Timeline