Bug 57586 - [patch] Make security/sfs compile on -current
Summary: [patch] Make security/sfs compile on -current
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-05 02:20 UTC by edwin
Modified: 2003-10-15 23:05 UTC (History)
1 user (show)

See Also:


Attachments

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

       (http://bento.freebsd.org/errorlogs/i386-5-latest/sfs-0.7.2.log)

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;
   }
 }
How-To-Repeat: 
	-
Comment 1 Oliver Lehmann freebsd_committer freebsd_triage 2003-10-07 21:04:12 UTC
A follow up can be found at
	ports/57599
Comment 2 Matthew N. Dodd freebsd_committer freebsd_triage 2003-10-15 23:04:57 UTC
State Changed
From-To: open->closed

Committed, thanks.