Bug 57586 - [patch] Make security/sfs compile on -current
[patch] Make security/sfs compile on -current
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Any Any
: Normal Affects Only Me
Assigned To: FreeBSD ports mailing list
Depends on:
  Show dependency treegraph
Reported: 2003-10-05 02:20 UTC by edwin
Modified: 2003-10-15 23:05 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description edwin 2003-10-05 02:20:15 UTC
	security/sfs doesn't build on -current due to problems with:

	random_prime.C: In member function `bigint& prime_finder::next_strong(unsigned int)':
       random_prime.C:339: warning: comparison is always false due to limited range of data type


Fix: The function fermat2_test() does return true when (some calculated
value) equals 2. It looks like a leftover from a historical change.

Maintainer (cc:d), please approve this patch.
In the mean time, I'm going to find out whats wrong with it to get
ports/57251 fixed. (http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/57251)--Ncul5l7wKP0cSJ7ge1icXNc96Vwsez5Vf013pDeVqmfxgC4u
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- crypt/random_prime.C.orig   Sat Oct  4 18:14:40 2003
+++ crypt/random_prime.C        Sat Oct  4 18:14:54 2003
@@ -336,7 +336,7 @@
   bigint t1, t2;
   for (;;) {
     next_weak ();
-    if (!tmp || (fermat2_test (tmp, &t1, &t2) == 2 && tmp.probab_prime (iter)))
+    if (!tmp || (fermat2_test (tmp, &t1, &t2) && tmp.probab_prime (iter)))
       return tmp;
Comment 1 Oliver Lehmann freebsd_committer 2003-10-07 21:04:12 UTC
A follow up can be found at
Comment 2 mdodd freebsd_committer 2003-10-15 23:04:57 UTC
State Changed
From-To: open->closed

Committed, thanks.