]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix GCC compilation -Waggressive-loop-optimizations
authorAdrien Zinger <zinger.ad@gmail.com>
Wed, 20 Mar 2024 08:39:16 +0000 (09:39 +0100)
committerTomas Mraz <tomas@openssl.org>
Fri, 3 Jan 2025 15:00:57 +0000 (16:00 +0100)
commit6c93b03e9a7e78736dd5e8b7f44b2f7bca788f2e
tree3c7a2b9111777bcacf99e94376fd116a7dbdfced
parentb618bebca7a74f92fe6e07767e76d0029d1ed3cf
Fix GCC compilation -Waggressive-loop-optimizations

GCC 13.1.0 were reporting a compilation warning with -O2/3 and
-Waggressive-loop-optimizations. GCC is raising an undefined behavior in the
while loop. Replace the while loop with a memset call at the top of the
function.

Fixes #21088

CLA: trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23898)

(cherry picked from commit c45ca0656f8d1fe43b8cf444c88d295a063341ca)
crypto/bn/rsaz_exp_x2.c