Skip to content

Commit 36c1d20

Browse files
committed
If malloc is disabled make sure it is also disabled in SP math
1 parent 3e9bdb7 commit 36c1d20

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

wolfssl/wolfcrypt/settings.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2871,6 +2871,12 @@ extern void uITRON4_free(void *p) ;
28712871
#error Small stack cannot be used with no malloc (WOLFSSL_NO_MALLOC)
28722872
#endif
28732873

2874+
/* If malloc is disabled make sure it is also disabled in SP math */
2875+
#if defined(WOLFSSL_NO_MALLOC) && !defined(WOLFSSL_SP_NO_MALLOC) && \
2876+
(defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_SP_MATH_ALL))
2877+
#define WOLFSSL_SP_NO_MALLOC
2878+
#endif
2879+
28742880
/* Enable DH Extra for QT, openssl all, openssh and static ephemeral */
28752881
/* Allows export/import of DH key and params as DER */
28762882
#if !defined(NO_DH) && !defined(WOLFSSL_DH_EXTRA) && \

0 commit comments

Comments
 (0)