I noticed this code that seems a bit sketchy:
serenity/Userland/Libraries/LibTLS/Socket.cpp
Lines 82 to 90 in b01fccc
as well as in the other overload of the same function:
serenity/Userland/Libraries/LibTLS/Socket.cpp
Lines 102 to 111 in b01fccc
Notice that we return tls_socket
, which has tls_socket->on_connected
and tls_socket->on_tls_error
callback functions set that are capturing a reference to the local variable loop
, which becomes invalid after the return
statement. This of course assumes that there is any chance that either of these callbacks might be called after the function returns. I do not know if this is the case, but this should probably be fixed.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too