From: Hugo Landau Date: Wed, 9 Aug 2023 16:46:33 +0000 (+0100) Subject: BIO_s_dgram_pair: Correct implementation of BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE X-Git-Tag: openssl-3.2.0-alpha1~82 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c20b78d59960c523c4de02e7bd62fcd4c0a5a4f7;p=thirdparty%2Fopenssl.git BIO_s_dgram_pair: Correct implementation of BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/21715) --- diff --git a/crypto/bio/bss_dgram_pair.c b/crypto/bio/bss_dgram_pair.c index 393af7dab44..a93b14154ca 100644 --- a/crypto/bio/bss_dgram_pair.c +++ b/crypto/bio/bss_dgram_pair.c @@ -695,7 +695,7 @@ static long dgram_mem_ctrl(BIO *bio, int cmd, long num, void *ptr) /* BIO_dgram_get_local_addr_enable */ case BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE: /* Non-threadsafe */ - ret = (long)dgram_pair_ctrl_get_local_addr_enable(bio); + *(int *)ptr = (long)dgram_pair_ctrl_get_local_addr_enable(bio); break; /* BIO_dgram_set_local_addr_enable */