Make CBB_finish() fail if *out_data is not NULL
authortb <tb@openbsd.org>
Thu, 7 Jul 2022 17:12:15 +0000 (17:12 +0000)
committertb <tb@openbsd.org>
Thu, 7 Jul 2022 17:12:15 +0000 (17:12 +0000)
commit8ba2322e11460255d79bea6b69b7eea2f6857efc
tree375edd188c539ecb18569609ec042ed42263e2e6
parent5d39295890f764d647502f824b89a2ac64b5915a
Make CBB_finish() fail if *out_data is not NULL

Contrary to CBS_stow(), CBB_finish() will leak, so ensure we fail if
*out_data is populated.

Discussed with & ok jsing
lib/libssl/bs_cbb.c