Skip to content
Commit 4bad4747 authored by Neil Horman's avatar Neil Horman Committed by Tomas Mraz
Browse files

embed bio_dgram_data inside bio_dgram_sctp_data



the sctp BIO implementation uses the generic BIO dgram implementation
under the covers for some operations.  However, the private data for
each bio is incongruous, leading to segfaults when doing things like
passing a dgram_sctp_ctrl operation to the underlying dgram_ctrl method.

Fix this by removing the common fields between the two strcutres and
embedding a bio_dgram_data as the first member of the
bio_dgram_sctp_data struct.  This allows implicit casting when that call
path is taken, avoiding any memory mis-use

Fixes #20643

Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
Reviewed-by: default avatarPaul Dale <pauli@openssl.org>
Reviewed-by: default avatarTomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22278)
parent 31fc8a83
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment