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
Signed-off-by: Christian Heimes <christian@python.org>
| @@ -1403,6 +1403,12 @@ _hashlib_hmac_new_impl(PyObject *module, Py_buffer *key, PyObject *msg_obj, | |||
| HMACobject *self = NULL; | |||
| int r; | |||
|
|
|||
| if (key->len > INT_MAX) { | |||
| PyErr_SetString(PyExc_OverflowError, | |||
| "key is too long."); | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
"2 GB key should be enough for everyone" :-D
|
Thanks @tiran for the PR |
|
GH-20245 is a backport of this pull request to the 3.9 branch. |
Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
Signed-off-by: Christian Heimes christian@python.org
https://bugs.python.org/issue40645
Automerge-Triggered-By: @tiran