mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
Avoid DEBUG POPULATE crash at dictExpand OOM (#12363)
Change to use dictTryExpand, return error on OOM.
This commit is contained in:
parent
6bf9b144ef
commit
26174123ee
@ -713,7 +713,10 @@ NULL
|
|||||||
if (getPositiveLongFromObjectOrReply(c, c->argv[2], &keys, NULL) != C_OK)
|
if (getPositiveLongFromObjectOrReply(c, c->argv[2], &keys, NULL) != C_OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
dictExpand(c->db->dict,keys);
|
if (dictTryExpand(c->db->dict, keys) != DICT_OK) {
|
||||||
|
addReplyError(c, "OOM in dictTryExpand");
|
||||||
|
return;
|
||||||
|
}
|
||||||
long valsize = 0;
|
long valsize = 0;
|
||||||
if ( c->argc == 5 && getPositiveLongFromObjectOrReply(c, c->argv[4], &valsize, NULL) != C_OK )
|
if ( c->argc == 5 && getPositiveLongFromObjectOrReply(c, c->argv[4], &valsize, NULL) != C_OK )
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user