SIGN IN SIGN UP

THRIFT-5931: c_glib: avoid fixed-size buffers in thrift_ssl_socket_get_ssl_error()

thrift_ssl_socket_get_ssl_error() still builds SSL error messages in a fixed stack buffer while tracking remaining space with a signed counter that is updated by subtracting snprintf() return values.

If the formatted error text is long enough, that counter can underflow and the later writes can walk past the intended buffer boundaries.

Build the error message with GString instead so the helper no longer depends on hand-rolled remaining-space arithmetic.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
P
Pengpeng Hou committed
0de53c48a7d101382d17490d265ac2d023938d3a
Parent: ee26195
Committed by Jens Geyer <Jens-G@users.noreply.github.com> on 3/22/2026, 1:29:07 PM