Skip to content

Commit e226431

Browse files
committed
context allocators can only set an ERR_R_MALLOC_FAILURE error
1 parent 43739c5 commit e226431

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Modules/_hashopenssl.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,8 @@ py_wrapper_EVP_MD_CTX_new(void)
589589
{
590590
EVP_MD_CTX *ctx = EVP_MD_CTX_new();
591591
if (ctx == NULL) {
592-
notify_smart_ssl_error_occurred_in(Py_STRINGIFY(EVP_MD_CTX_new));
592+
PyErr_NoMemory();
593+
return NULL;
593594
}
594595
return ctx;
595596
}
@@ -1646,7 +1647,8 @@ py_openssl_wrapper_HMAC_CTX_new(void)
16461647
{
16471648
HMAC_CTX *ctx = HMAC_CTX_new();
16481649
if (ctx == NULL) {
1649-
notify_smart_ssl_error_occurred_in(Py_STRINGIFY(HMAC_CTX_new));
1650+
PyErr_NoMemory();
1651+
return NULL;
16501652
}
16511653
return ctx;
16521654
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy