mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-27 16:52:20 +01:00
The function _fp_exptmod_nct() is using WOLFSSL_NO_MALLOC to guard using stack allocation vs malloc. It's twin function _fp_exptmod_ct() is using WOLFSSL_SMALL_STACK for this. This is causing inappropriate use of malloc() in a small stack environment. The no-malloc case will also be kept so static memory and no-malloc fix still works. 1. Change the guards for `#ifndef WOLFSSL_NO_MALLOC` in the function `_fp_exptmod_nct()` to `#if defined(WOLFSSL_SMALL_STACK) && !defined(WOLFSSL_NO_MALLOC)`.