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

Skip to content

Commit 26532f7

Browse files
committed
Check return value of PyType_Ready(&EncodingMapType)
CID 486654
1 parent 09ca794 commit 26532f7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Objects/unicodeobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14164,7 +14164,8 @@ int _PyUnicode_Init(void)
1416414164
PyUnicode_2BYTE_KIND, linebreak,
1416514165
Py_ARRAY_LENGTH(linebreak));
1416614166

14167-
PyType_Ready(&EncodingMapType);
14167+
if (PyType_Ready(&EncodingMapType) < 0)
14168+
Py_FatalError("Can't initialize encoding map type");
1416814169

1416914170
if (PyType_Ready(&PyFieldNameIter_Type) < 0)
1417014171
Py_FatalError("Can't initialize field name iterator type");

0 commit comments

Comments
 (0)