Merge pull request #1026 from kedixa/dev

fix redis parse response bug
This commit is contained in:
xiehan
2022-08-25 19:27:02 +08:00
committed by GitHub
+2 -1
View File
@@ -14,6 +14,7 @@
limitations under the License.
Authors: Wu Jiaxu (wujiaxu@sogou-inc.com)
Liu Kai (liukaidx@sogou-inc.com)
*/
#include <stdlib.h>
@@ -449,7 +450,7 @@ int redis_parser_append_message(const void *buf, size_t *size,
memcpy((char *)parser->msgbuf + parser->msgsize, buf, *size);
parser->msgsize += *size;
if (parser->msgsize && *(const char *)parser->msgbuf != '*')
if (parser->msgsize && isalpha(*(const char *)parser->msgbuf))
{
while (parser->msgidx < parser->msgsize &&
*((const char *)parser->msgbuf + parser->msgidx) != '\n')