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
26174123
Unverified
Commit
26174123
authored
Jul 01, 2023
by
Binbin
Committed by
GitHub
Jul 01, 2023
Browse files
Avoid DEBUG POPULATE crash at dictExpand OOM (#12363)
Change to use dictTryExpand, return error on OOM.
parent
6bf9b144
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/debug.c
View file @
26174123
...
...
@@ -713,7 +713,10 @@ NULL
if
(
getPositiveLongFromObjectOrReply
(
c
,
c
->
argv
[
2
],
&
keys
,
NULL
)
!=
C_OK
)
return
;
dictExpand
(
c
->
db
->
dict
,
keys
);
if
(
dictTryExpand
(
c
->
db
->
dict
,
keys
)
!=
DICT_OK
)
{
addReplyError
(
c
,
"OOM in dictTryExpand"
);
return
;
}
long
valsize
=
0
;
if
(
c
->
argc
==
5
&&
getPositiveLongFromObjectOrReply
(
c
,
c
->
argv
[
4
],
&
valsize
,
NULL
)
!=
C_OK
)
return
;
...
...
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