Rather then sending the whole buffer size.
If there is an error writing the last option, it may not be
NUL terminated correctly causing an assert.
Even so, we should not write the failed option to the environment
either as it would be a false positive for an empty option.
#ifdef PRIVSEP
if (ctx->options & DHCPCD_PRIVSEP) {
if (ps_root_script(ctx,
- ctx->script_buf, ctx->script_buflen) == -1)
+ ctx->script_buf, (size_t)buflen) == -1)
logerr(__func__);
goto send_listeners;
}