mirror of
https://github.com/openssl/openssl.git
synced 2026-01-18 17:11:31 +01:00
BIO_send/recvmmsg(): Pass msgs_processed to the return callback
This avoids crash if a legacy BIO callback is set and BIO_sendmmsg() or BIO_recvmmsg() is used. Reported by Stanislav Fort (Aisle Research) Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Norbert Pocs <norbertp@openssl.org> (Merged from https://github.com/openssl/openssl/pull/29395)
This commit is contained in:
@@ -429,7 +429,7 @@ int BIO_sendmmsg(BIO *b, BIO_MSG *msg,
|
||||
|
||||
if (HAS_CALLBACK(b))
|
||||
ret = (size_t)bio_call_callback(b, BIO_CB_SENDMMSG | BIO_CB_RETURN,
|
||||
(void *)&args, ret, 0, 0, (long)ret, NULL);
|
||||
(void *)&args, ret, 0, 0, (long)ret, msgs_processed);
|
||||
|
||||
return ret > 0;
|
||||
}
|
||||
@@ -476,7 +476,7 @@ int BIO_recvmmsg(BIO *b, BIO_MSG *msg,
|
||||
|
||||
if (HAS_CALLBACK(b))
|
||||
ret = (size_t)bio_call_callback(b, BIO_CB_RECVMMSG | BIO_CB_RETURN,
|
||||
(void *)&args, ret, 0, 0, (long)ret, NULL);
|
||||
(void *)&args, ret, 0, 0, (long)ret, msgs_processed);
|
||||
|
||||
return ret > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user