We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc3c57d commit 5433299Copy full SHA for 5433299
extension/maxminddb.c
@@ -526,6 +526,11 @@ static PyObject *from_map(MMDB_entry_data_list_s **entry_data_list) {
526
PyObject *key = PyUnicode_FromStringAndSize(
527
(char *)(*entry_data_list)->entry_data.utf8_string,
528
(*entry_data_list)->entry_data.data_size);
529
+ if (!key) {
530
+ // PyUnicode_FromStringAndSize will set an appropriate exception
531
+ // in this case.
532
+ return NULL;
533
+ }
534
535
*entry_data_list = (*entry_data_list)->next;
536
0 commit comments