found a very old bug on redis <= 3.2.6, Protocol error: too big bulk count string #3726

Open
qianger opened this Issue Jan 4, 2017 · 0 comments

Projects

None yet

1 participant

@qianger
qianger commented Jan 4, 2017 edited

start from networking.cpp:1169

while(c->multibulklen) {
/* Read bulk length if unknown */
if (c->bulklen == -1) {
newline = strchr(c->querybuf+pos,'\r');
if (newline == NULL) {
if (sdslen(c->querybuf) > PROTO_INLINE_MAX_SIZE) {
-------------------------->>>>>the above line will cause large but normal hmset request failed
if (sdslen(c->querybuf)-pos > PROTO_INLINE_MAX_SIZE) {
addReplyError(c,
"Protocol error: too big bulk count string");
setProtocolError(c,0);
return C_ERR;
}
break;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment