projects
/
m6w6
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
09b4ff9
)
Fix SASL.
author
Brian Aker
<brian@tangent.org>
Sat, 28 Apr 2012 03:16:05 +0000
(20:16 -0700)
committer
Brian Aker
<brian@tangent.org>
Sat, 28 Apr 2012 03:16:05 +0000
(20:16 -0700)
libmemcached/response.cc
patch
|
blob
|
history
diff --git
a/libmemcached/response.cc
b/libmemcached/response.cc
index 4ba856489f81e9a16aa121a81843dbcc537e4bf9..809d5b6fb7606793b71d06c9c60e21e47d515958 100644
(file)
--- 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