From q@coyote.dnsalias.net  Tue Oct 29 07:43:24 2002
Return-Path: <q@coyote.dnsalias.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id EC4A437B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Oct 2002 07:43:24 -0800 (PST)
Received: from coyote.dnsalias.net (gb-007.galgenberg.net [132.187.222.7])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5500843E88
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Oct 2002 07:43:21 -0800 (PST)
	(envelope-from q@coyote.dnsalias.net)
Received: from coyote.dnsalias.net (localhost [127.0.0.1])
	by coyote.dnsalias.net (8.12.6/8.12.6) with ESMTP id g9TFhBeq059651
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Oct 2002 16:43:11 +0100 (CET)
	(envelope-from q@coyote.dnsalias.net)
Received: (from q@localhost)
	by coyote.dnsalias.net (8.12.6/8.12.6/Submit) id g9TFhApR059650;
	Tue, 29 Oct 2002 16:43:10 +0100 (CET)
Message-Id: <200210291543.g9TFhApR059650@coyote.dnsalias.net>
Date: Tue, 29 Oct 2002 16:43:10 +0100 (CET)
From: Ulrich Spoerlein <q@uni.de>
To: FreeBSD-gnats-submit@freebsd.org
Subject: PATCH: Fix "billenium" bug with math/concorde
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         44592
>Category:       ports
>Synopsis:       PATCH: Fix "billenium" bug with math/concorde
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 29 07:50:00 PST 2002
>Closed-Date:    Tue Nov 12 08:22:28 PST 2002
>Last-Modified:  Tue Nov 12 08:22:28 PST 2002
>Originator:     Ulrich Spoerlein
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:


	
>Description:
On their page they state that concorde has a bug and needs a new urandom.c
http://www.math.princeton.edu/tsp/concorde/download.html
	
>How-To-Repeat:
	
>Fix:
this patch is just a diff between the old and the new urandom.c.
just put it in math/concorde/files

	

--- patch-aa begins here ---
--- UTIL/urandom.c.orig	Thu Dec 16 19:39:06 1999
+++ UTIL/urandom.c	Tue Sep 18 21:08:37 2001
@@ -22,7 +22,7 @@
 /*                                                                          */
 /*  Written by:  DIMACS  (modified for TSP)                                 */
 /*  Date: February 7, 1995  (cofeb16)                                       */
-/*                                                                          */
+/*        September 18, 2001  (billenium fix)                               */
 /*                                                                          */
 /*    EXPORTED FUNCTIONS:                                                   */
 /*                                                                          */
@@ -66,6 +66,9 @@
     int i, ii;
     int last, next;
     int *arr = r->arr;
+
+    seed %= CC_PRANDMAX;
+    if (seed < 0) seed += CC_PRANDMAX;
 
     arr[0] = last = seed;
     next = 1;
--- patch-aa ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: naddy 
State-Changed-When: Tue Nov 12 08:21:54 PST 2002 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44592 
>Unformatted:
