Skip to content

Commit cbe2be4

Browse files
authored
Merge pull request #1026 from kedixa/dev
fix redis parse response bug
2 parents c8c5da7 + 1c8c37a commit cbe2be4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/protocol/redis_parser.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
limitations under the License.
1515
1616
Authors: Wu Jiaxu (wujiaxu@sogou-inc.com)
17+
Liu Kai (liukaidx@sogou-inc.com)
1718
*/
1819

1920
#include <stdlib.h>
@@ -449,7 +450,7 @@ int redis_parser_append_message(const void *buf, size_t *size,
449450
memcpy((char *)parser->msgbuf + parser->msgsize, buf, *size);
450451
parser->msgsize += *size;
451452

452-
if (parser->msgsize && *(const char *)parser->msgbuf != '*')
453+
if (parser->msgsize && isalpha(*(const char *)parser->msgbuf))
453454
{
454455
while (parser->msgidx < parser->msgsize &&
455456
*((const char *)parser->msgbuf + parser->msgidx) != '\n')

0 commit comments

Comments
 (0)