]> git.ipfire.org Git - thirdparty/openssl.git/commit
ossl_rio_poll_builder_add_fd(): Fixup pfds after reallocation
authorsashan <anedvedicky@gmail.com>
Wed, 11 Jun 2025 06:23:38 +0000 (08:23 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 13 Jun 2025 10:37:50 +0000 (12:37 +0200)
commit5ee8248d083c00583d52350ed9464bfb58d2f60c
tree3bf0ff51c25feb9c07b340402750e4a3dc3de755
parentde1e4989d564ea9a6d2960204806a1f3537419ad
ossl_rio_poll_builder_add_fd(): Fixup pfds after reallocation

Local variable `pfds` used in `ossl_rio_poll_builder_add_fd()` must be consistent
with `rpb->pfd_heap`. The function maintains array of SSL objects for SSL_poll(3ossl).
It works with no issues until we need to reallocate `rbp->pfd_heap` in `rpb_ensure_alloc()`.
After `rpb_ensure_alloc()` returns we must update local variable `pfds` with `rpb->pfd_heap`
not doing so makes function to write to dead buffer.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27804)
ssl/rio/poll_builder.c