[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Update of "deal" in sarge (Re: #383625: "deal": segfault at execution)



Hi,

"deal" is segfaulting on amd64 and probably on all other 64 bit
architectures (#383625). The bug was fixed in 3.0.8-4 in unstable.
Below is the diff for -2sarge1 I'd like to upload to stable - is that
ok?

(Please Cc me on replies.)

Re: Vassilis Pandis 2006-08-18 <20060818122916.45771.qmail@web25007.mail.ukl.yahoo.com>
> "Each time i launch deal i get a segmentation fault but sometimes it generate one or two hands
> before crashing.(im using Dapper/amd64)"

Here's the singled out diff for the fix - I intend to upload it to
sarge:

diff -u deal-3.0.8/debian/changelog deal-3.0.8/debian/changelog
--- deal-3.0.8/debian/changelog
+++ deal-3.0.8/debian/changelog
@@ -1,3 +1,10 @@
+deal (3.0.8-2sarge1) stable; urgency=low
+
+  * Fix segfault on amd64, (int)random() sometimes returned negative numbers
+    (Closes: #383625).
+
+ -- Christoph Berg <myon@debian.org>  Wed, 30 Aug 2006 01:37:28 +0200
+
 deal (3.0.8-2) unstable; urgency=low
 
   * Two input/ files were still using relative source paths.
only in patch2:
unchanged:
--- deal-3.0.8.orig/deal.c
+++ deal-3.0.8/deal.c
@@ -190,7 +190,7 @@
 #if USE_RAND48
   return dealt+(int) (drand48() *(double)(52-dealt));
 #else
-  return dealt+(int) (fast_mod(random() , (52-dealt)));
+  return dealt+(int) (fast_mod((unsigned) random() , (52-dealt)));
 #endif
 }
 

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/

Attachment: signature.asc
Description: Digital signature


Reply to: