[3.9] bpo-40645: restrict HMAC key len to INT_MAX (GH-20238) by miss-islington · Pull Request #20245 · python/cpython
if (key->len > INT_MAX) { PyErr_SetString(PyExc_OverflowError, "key is too long."); return NULL; }
if ((digestmod == NULL) || !strlen(digestmod)) { PyErr_SetString( PyExc_TypeError, "Missing required parameter 'digestmod'.");