ports/57586: [patch] Make security/sfs compile on -current

Edwin Groothuis edwin at mavetju.org
Sun Oct 5 01:20:17 UTC 2003


>Number:         57586
>Category:       ports
>Synopsis:       [patch] Make security/sfs compile on -current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 04 18:20:15 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Edwin Groothuis
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju 4.8-RELEASE FreeBSD 4.8-RELEASE #0: Sun Aug 17 16:04:25 EST 2003 edwin at k7.mavetju:/usr/src/sys/compile/k7 i386

>Description:

	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)

>How-To-Repeat:

	-

>Fix:

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

--- 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;
   }
 }


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)
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list