Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] firstprimes tool -- is 2 prime? #59

Closed
SnarkBoojum opened this issue Jul 15, 2022 · 3 comments
Closed

[PATCH] firstprimes tool -- is 2 prime? #59

SnarkBoojum opened this issue Jul 15, 2022 · 3 comments

Comments

@SnarkBoojum
Copy link

In firstprime.c, the minimum can't be lower than 1, which means 2 is out of scope, since its index is 0.

The fix is as simple as:

--- coqprime.orig/gencertif/firstprimes.c
+++ coqprime/gencertif/firstprimes.c
@@ -11204,7 +11204,7 @@
     max = atoi(argv[2]);
   } else exit (1);
 
-  if (min < 1) min = 1;
+  if (min < 0) min = 0;
   if (max > MAXSIZE) max = MAXSIZE;
 
   out = fopen(filename,"w+");
@thery
Copy link
Owner

thery commented Jul 18, 2022

don't hesitate to do a PR!

@thery
Copy link
Owner

thery commented Jul 18, 2022

I had a quick look, it seems the certificate was invalid for min = 0. I've tried to fix that in the last commit.

Thanks!

@thery
Copy link
Owner

thery commented Sep 28, 2022

This is fixed
@SnarkBoojum I will close the issue

@thery thery closed this as completed Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants