Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d87f61

Browse files
committed
Handle DKIX_ERROR
1 parent 5131071 commit 4d87f61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Objects/dictobject.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,6 +1768,10 @@ PyDict_GetItemRef(PyObject *op, PyObject *key, PyObject **pvalue)
17681768

17691769
ix = _Py_dict_lookup(mp, key, hash, &value);
17701770
assert(ix >= 0 || value == NULL);
1771+
if (ix == DKIX_ERROR) {
1772+
*pvalue = NULL;
1773+
return -1;
1774+
}
17711775
*pvalue = Py_XNewRef(value);
17721776
return 0;
17731777
}

0 commit comments

Comments
 (0)