提交 2a05fa0d 编写于 作者: H hwware

fix server crash in STRALGO command

上级 48b2915c
......@@ -534,6 +534,13 @@ void stralgoLCS(client *c) {
}
obja = lookupKeyRead(c->db,c->argv[j+1]);
objb = lookupKeyRead(c->db,c->argv[j+2]);
if ( !(obja->type == OBJ_STRING) || !(objb->type == OBJ_STRING) ) {
addReplyError(c,"Object associate with KEYS option should only be string type");
return;
}
obja = obja ? getDecodedObject(obja) : createStringObject("",0);
objb = objb ? getDecodedObject(objb) : createStringObject("",0);
a = obja->ptr;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册