Skip to content

blake2module.c does not handle errors on module creation #111251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sobolevn opened this issue Oct 24, 2023 · 1 comment
Closed

blake2module.c does not handle errors on module creation #111251

sobolevn opened this issue Oct 24, 2023 · 1 comment
Assignees
Labels
extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Oct 24, 2023

Bug report

It does it in some parts:

But, not in others:

  • 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);
  • 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:

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error extension-modules C modules in the Modules dir labels Oct 24, 2023
@sobolevn sobolevn self-assigned this Oct 24, 2023
sobolevn added a commit to sobolevn/cpython that referenced this issue Oct 24, 2023
erlend-aasland pushed a commit that referenced this issue Oct 25, 2023
Introduce ADD_INT_CONST macro wrapper for PyModule_AddIntConstant()
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 25, 2023
…111252)

Introduce ADD_INT_CONST macro wrapper for PyModule_AddIntConstant()
(cherry picked from commit 86887a2)

Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 25, 2023
…111252)

Introduce ADD_INT_CONST macro wrapper for PyModule_AddIntConstant()
(cherry picked from commit 86887a2)

Co-authored-by: Nikita Sobolev <[email protected]>
hugovk added a commit that referenced this issue Nov 10, 2023
hugovk pushed a commit that referenced this issue Nov 10, 2023
@hugovk
Copy link
Member

hugovk commented Nov 10, 2023

Backport PRs now merged, thanks!

@hugovk hugovk closed this as completed Nov 10, 2023
aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
…1252)

Introduce ADD_INT_CONST macro wrapper for PyModule_AddIntConstant()
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
…1252)

Introduce ADD_INT_CONST macro wrapper for PyModule_AddIntConstant()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants