-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
It does it in some parts:
cpython/Modules/_blake2/blake2module.c
Lines 88 to 90 in 81eba76
if (PyModule_AddType(m, st->blake2b_type) < 0) { return -1; } cpython/Modules/_blake2/blake2module.c
Lines 66 to 75 in 81eba76
#define ADD_INT(d, name, value) do { \ PyObject *x = PyLong_FromLong(value); \ if (!x) \ return -1; \ if (PyDict_SetItemString(d, name, x) < 0) { \ Py_DECREF(x); \ return -1; \ } \ Py_DECREF(x); \ } while(0)
But, not in others:
cpython/Modules/_blake2/blake2module.c
Lines 98 to 101 in 81eba76
PyModule_AddIntConstant(m, "BLAKE2B_SALT_SIZE", BLAKE2B_SALTBYTES); PyModule_AddIntConstant(m, "BLAKE2B_PERSON_SIZE", BLAKE2B_PERSONALBYTES); PyModule_AddIntConstant(m, "BLAKE2B_MAX_KEY_SIZE", BLAKE2B_KEYBYTES); PyModule_AddIntConstant(m, "BLAKE2B_MAX_DIGEST_SIZE", BLAKE2B_OUTBYTES); cpython/Modules/_blake2/blake2module.c
Lines 120 to 123 in 81eba76
PyModule_AddIntConstant(m, "BLAKE2S_SALT_SIZE", BLAKE2S_SALTBYTES); PyModule_AddIntConstant(m, "BLAKE2S_PERSON_SIZE", BLAKE2S_PERSONALBYTES); PyModule_AddIntConstant(m, "BLAKE2S_MAX_KEY_SIZE", BLAKE2S_KEYBYTES); PyModule_AddIntConstant(m, "BLAKE2S_MAX_DIGEST_SIZE", BLAKE2S_OUTBYTES);
This is similar to:
_selectmodule.c
does not handle errors when creating a module #111233_ssl.c
does not handle errors on module creation #111230
Linked PRs
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error