diff options
author | Matt Caswell <matt@openssl.org> | 2022-08-09 11:59:22 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-08-17 12:58:43 +0200 |
commit | b89f113149b7bd5173f4100884aab354ad6da74d (patch) | |
tree | 3e1e0c58c49745a2b1c21d90d440f249c0dc8765 /crypto/mem.c | |
parent | 5a07d91dc9e787e5e4a2ff5b41bc0ebdcb4efd0a (diff) |
CRYPTO_mem_debug_push() and CRYPTO_mem_debug_pop() should return 0
Those 2 functions historically only ever returned 0 or 1. In OpenSSL 3.0
they were made no-ops and the documentation says they always return 0. In
fact they were returning -1. If any application was actually using these
functions then it may appear that they were actually successful (e.g. -1
could be interpreted as "true").
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18967)
(cherry picked from commit f868454257560c78570549f6a34d5918f03898a0)
Diffstat (limited to 'crypto/mem.c')
-rw-r--r-- | crypto/mem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/mem.c b/crypto/mem.c index 2cf240061a..f6cdcf5a42 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -285,12 +285,12 @@ int CRYPTO_set_mem_debug(int flag) int CRYPTO_mem_debug_push(const char *info, const char *file, int line) { (void)info; (void)file; (void)line; - return -1; + return 0; } int CRYPTO_mem_debug_pop(void) { - return -1; + return 0; } void CRYPTO_mem_debug_malloc(void *addr, size_t num, int flag, |