From: Brian Aker Date: Sat, 28 Apr 2012 03:16:05 +0000 (-0700) Subject: Fix SASL. X-Git-Tag: 1.0.7~4^2^2^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=6852ee197af0a3887c458a6d1bac58764b1d691b;p=awesomized%2Flibmemcached Fix SASL. --- diff --git a/libmemcached/response.cc b/libmemcached/response.cc index 4ba85648..809d5b6f 100644 --- a/libmemcached/response.cc +++ b/libmemcached/response.cc @@ -584,6 +584,21 @@ static memcached_return_t binary_read_one_response(memcached_server_write_instan break; case PROTOCOL_BINARY_CMD_SASL_LIST_MECHS: + { + if (header.response.keylen != 0 || bodylen + 1 > buffer_length) + { + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + else + { + if ((rc= memcached_safe_read(instance, buffer, bodylen)) != MEMCACHED_SUCCESS) + { + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + } + } + break; + case PROTOCOL_BINARY_CMD_VERSION: { char version_buffer[32]; // @todo document this number