]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
crypto/mem.c: tfix in CRYPTO_aligned_alloc
authorEugene Syromiatnikov <esyr@openssl.org>
Fri, 25 Jul 2025 01:46:36 +0000 (03:46 +0200)
committerNeil Horman <nhorman@openssl.org>
Fri, 8 Aug 2025 16:22:10 +0000 (12:22 -0400)
* crypto/mem.c [OPENSSL_SMALL_FOOTPRINT] (CRYPTO_aligned_alloc): Change
freeptr to *freeptr to properly update the variable passed by pointer.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28059)

crypto/mem.c

index 48da037af31857b3c654a252a01aba7b174fde3a..c0dffbfdad6bf79424869b6196c146c83d9452b3 100644 (file)
@@ -236,7 +236,7 @@ void *CRYPTO_aligned_alloc(size_t num, size_t alignment, void **freeptr,
     *freeptr = NULL;
 
 #if defined(OPENSSL_SMALL_FOOTPRINT)
-    ret = freeptr = NULL;
+    ret = *freeptr = NULL;
     return ret;
 #endif