Fix assertion on client SSL read

When SSL is enabled, the protocol seems to get zero byte reads which
result in a null GWBUF being passed to gwbuf_length.
This commit is contained in:
Markus Mäkelä 2019-05-20 15:43:40 +03:00
parent e5a49a2f7b
commit 76399200f4
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -524,7 +524,13 @@ int gw_read_client_event(DCB* dcb)
{
dcb_close(dcb);
}
if (0 == (nbytes_read = gwbuf_length(read_buffer)))
if (read_buffer)
{
nbytes_read = gwbuf_length(read_buffer);
}
if (nbytes_read == 0)
{
return return_code;
}