]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
privsep: Send only what we have put in the buffer to script env
authorRoy Marples <roy@marples.name>
Wed, 19 Jul 2023 11:42:49 +0000 (12:42 +0100)
committerRoy Marples <roy@marples.name>
Wed, 19 Jul 2023 11:42:49 +0000 (12:42 +0100)
commit13cce2c82e41c28d989d5ce150e0fe837d7254f4
treeba98c5408371567f5441f809a5da21cb76d7cf96
parentb1c6074e4389377753ec42d35e2b315faf569cd9
privsep: Send only what we have put in the buffer to script env

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.
src/script.c