You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
0 commit comments