Commit 2a05fa0d authored by hwware's avatar hwware
Browse files

fix server crash in STRALGO command

parent 48b2915c
...@@ -534,6 +534,13 @@ void stralgoLCS(client *c) { ...@@ -534,6 +534,13 @@ void stralgoLCS(client *c) {
} }
obja = lookupKeyRead(c->db,c->argv[j+1]); obja = lookupKeyRead(c->db,c->argv[j+1]);
objb = lookupKeyRead(c->db,c->argv[j+2]); 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); obja = obja ? getDecodedObject(obja) : createStringObject("",0);
objb = objb ? getDecodedObject(objb) : createStringObject("",0); objb = objb ? getDecodedObject(objb) : createStringObject("",0);
a = obja->ptr; a = obja->ptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment