diff --git a/wolfcrypt/src/integer.c b/wolfcrypt/src/integer.c index 00685acfc..3fb8054fe 100644 --- a/wolfcrypt/src/integer.c +++ b/wolfcrypt/src/integer.c @@ -955,7 +955,7 @@ top: /* if not zero goto step 4 */ if (mp_iszero (&u) == 0) { - if (++loop_check > 1024) { + if (++loop_check > 4096) { res = MP_VAL; goto LBL_ERR; } diff --git a/wolfcrypt/src/tfm.c b/wolfcrypt/src/tfm.c index 3391693ae..5c089edde 100755 --- a/wolfcrypt/src/tfm.c +++ b/wolfcrypt/src/tfm.c @@ -932,7 +932,7 @@ top: /* if not zero goto step 4 */ if (fp_iszero (&u) == FP_NO) { - if (++loop_check > 1024) /* bad input */ + if (++loop_check > 4096) /* bad input */ return FP_VAL; goto top; }