summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_kex.c
diff options
context:
space:
mode:
authorschwarze <>2021-11-27 13:10:33 +0000
committerschwarze <>2021-11-27 13:10:33 +0000
commitfd819321187744b0f78822ff913c5b0709334cdc (patch)
treef06a4ef6cb4d8f2ab19d76c189b8cd4bb2d5fa22 /src/lib/libssl/ssl_kex.c
parent45c1baa52a14c4284033d4893d9da6b524852b8b (diff)
downloadopenbsd-fd819321187744b0f78822ff913c5b0709334cdc.tar.gz
openbsd-fd819321187744b0f78822ff913c5b0709334cdc.tar.bz2
openbsd-fd819321187744b0f78822ff913c5b0709334cdc.zip
Fix incomplete initialization bug: BIO_new(BIO_f_asn1()) neglected
initializing five of the fields in BIO_ASN1_BUF_CTX (prefix, prefix_free, suffix, suffix_free, ex_arg), inviting a segfault in a subsequent call from the application program to BIO_write(3) because subroutines of that function assume that the function pointers are either NULL or valid. Fix this by using the less error-prone calloc(3) idiom. While here, inline asn1_bio_init() at the only call site in asn1_bio_new() to simplify the code and make it easier to read. Bug found and initial patch by me, this version (with inlining) by and OK tb@.
Diffstat (limited to 'src/lib/libssl/ssl_kex.c')
0 files changed, 0 insertions, 0 deletions