aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2001-03-15 11:31:37 +0000
committerBodo Möller <bodo@openssl.org>2001-03-15 11:31:37 +0000
commit63c43dcc5953a98c14fef2e381bb159ede883a5c (patch)
tree5a34351d9ee447cffeb76d228cb88ad1632a2a5b
parent85628011377732dbc88a00c7ef7fb6e53aff921d (diff)
downloadopenssl-63c43dcc5953a98c14fef2e381bb159ede883a5c.tar.gz
avoid infinite loop
-rw-r--r--crypto/ec/ectest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/ec/ectest.c b/crypto/ec/ectest.c
index fd294bb2a8..e221a322c0 100644
--- a/crypto/ec/ectest.c
+++ b/crypto/ec/ectest.c
@@ -148,6 +148,7 @@ int main(int argc, char *argv[])
BIGNUM *x, *y, *z;
unsigned char buf[100];
size_t i, len;
+ int k;
/* enable memory leak checking unless explicitly disabled */
if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off"))))
@@ -230,8 +231,11 @@ int main(int argc, char *argv[])
}
fprintf(stdout, "A cyclic subgroup:\n");
+ k = 100;
do
{
+ if (k-- == 0) ABORT;
+
if (EC_POINT_is_at_infinity(group, P))
fprintf(stdout, " point at infinity\n");
else