Add missing buffer (re)allocation to reds_sasl_handle_auth_steplen()

We need to make sure we have a buffer big enough to accomodate the data
sent by the coming SASL step.
This commit is contained in:
Christophe Fergeau 2014-03-17 14:10:10 +01:00
parent 27f968afd2
commit 91a6feb9f4

View File

@ -760,6 +760,7 @@ RedsSaslError reds_sasl_handle_auth_steplen(RedsStream *stream, AsyncReadDone re
* treatment */
return REDS_SASL_ERROR_OK;
} else {
sasl->data = spice_realloc(sasl->data, sasl->len);
reds_stream_async_read(stream, (uint8_t *)sasl->data, sasl->len,
read_cb, opaque);
return REDS_SASL_ERROR_OK;