summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_clnt.c
diff options
context:
space:
mode:
authorschwarze <>2021-11-19 07:49:27 +0000
committerschwarze <>2021-11-19 07:49:27 +0000
commit7a71c1d5fbaca1cbb4bc3ec6847ef0af205686a9 (patch)
tree0cd45211abbe4b0ded785aa363bb23d83b34b6c9 /src/lib/libssl/ssl_clnt.c
parentaa22eb4dd7d07ed6bdabb58d501bda79f369421d (diff)
downloadopenbsd-7a71c1d5fbaca1cbb4bc3ec6847ef0af205686a9.tar.gz
openbsd-7a71c1d5fbaca1cbb4bc3ec6847ef0af205686a9.tar.bz2
openbsd-7a71c1d5fbaca1cbb4bc3ec6847ef0af205686a9.zip
As long as X509_OBJECT_free_contents(3) is a public API function,
make sure it fully re-initializes the object rather than leaving behind a stale pointer and a stale type in the object. The old behaviour was dangerous because X509_OBJECT_get_type(3) would then return the stale type to the user and one of X509_OBJECT_get0_X509(3) or X509_OBJECT_get0_X509_CRL(3) would then return the stale pointer to the user, provoking a use-after-free bug in the application program. Having these functions return X509_LU_NONE and NULL is better because those are the documented return values for these functions when the object is empty. OK tb@
Diffstat (limited to 'src/lib/libssl/ssl_clnt.c')
0 files changed, 0 insertions, 0 deletions