[Ecm-commits] r2427 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Wed Feb 20 20:33:16 CET 2013


Author: morain
Date: 2013-02-20 20:33:15 +0100 (Wed, 20 Feb 2013)
New Revision: 2427

Log:
Bug fix.


Modified:
   trunk/manyecm.c
Modified: trunk/manyecm.c
===================================================================
--- trunk/manyecm.c	2013-02-20 18:21:58 UTC (rev 2426)
+++ trunk/manyecm.c	2013-02-20 19:33:15 UTC (rev 2427)
@@ -20,7 +20,7 @@
 
 #define DEBUG_MANY_EC 0
 
-#define NCURVE_MAX 1000
+#define NCURVE_MAX 2000
 
 /* fall back on traditional ECM.
    TODO: use chkfile also.
@@ -1191,6 +1191,10 @@
 	fprintf (stderr, "You must provide ncurves != 0 with -torsion.\n");
 	exit (EXIT_FAILURE);
     }
+    if(ncurves > NCURVE_MAX){
+      fprintf(stderr, "Too many curves: %d\n", ncurves);
+      exit (EXIT_FAILURE);
+    }
     
     if(torsion != NULL)
 	printf("GMP-ECM [torsion=%s:%d-%d]\n", torsion, smin, smax);




More information about the Ecm-commits mailing list