summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_bitst.c
diff options
context:
space:
mode:
authortb <>2019-04-22 17:10:01 +0000
committertb <>2019-04-22 17:10:01 +0000
commita2339aa009b2ac9b2d96975d578bb9f9fc757cea (patch)
tree268a5bb33a01011111228f72e3d2be40eeae915b /src/lib/libcrypto/x509v3/v3_bitst.c
parente9d90e49492029ba1aa3e87e920475ddc0aeb803 (diff)
downloadopenbsd-a2339aa009b2ac9b2d96975d578bb9f9fc757cea.tar.gz
openbsd-a2339aa009b2ac9b2d96975d578bb9f9fc757cea.tar.bz2
openbsd-a2339aa009b2ac9b2d96975d578bb9f9fc757cea.zip
Avoid potential double frees in i2v_AUTHORITY_KEYID(), i2v_GENERAL_NAME()
and i2v_GENERAL_NAMES() by taking ownership of the extlist only if we were passed NULL. Otherwise it remains the caller's responsibility to free it. To do so, we allocate the extlist explicitly instead of using X509V3_add_value()'s implicit allocation feature. Preserve behavior in i2v_AUTHORITY_KEYID() by adding an explicit check that something was pushed onto the stack. The other i2v_* functions will receive a similar treatment in upcoming commits. ok jsing
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_bitst.c')
0 files changed, 0 insertions, 0 deletions