Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2a05fa0d
Commit
2a05fa0d
authored
Jun 08, 2020
by
hwware
Browse files
fix server crash in STRALGO command
parent
48b2915c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_string.c
View file @
2a05fa0d
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment