Debian Bug report logs - #249896
freesweep: enters infinite loop when creating too many mines

version graph

Package: freesweep; Maintainer for freesweep is Debian Games Team <pkg-games-devel@lists.alioth.debian.org>; Source for freesweep is src:freesweep (PTS, buildd, popcon).

Reported by: Seneca <seneca-cunningham@rogers.com>

Date: Wed, 19 May 2004 18:18:01 UTC

Severity: normal

Tags: patch

Found in version 0.88-4.1

Fixed in version freesweep/0.90-1

Done: Ansgar Burchardt <ansgar@43-1.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Edward Betts <edward@debian.org>:
Bug#249896; Package freesweep. (full text, mbox, link).


Acknowledgement sent to Seneca <seneca-cunningham@rogers.com>:
New Bug report received and forwarded. Copy sent to Edward Betts <edward@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Seneca <seneca-cunningham@rogers.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: freesweep: enters infinite loop when creating too many mines
Date: Wed, 19 May 2004 14:12:56 -0400
Package: freesweep
Version: 0.88-4.1
Severity: normal
Tags: patch

freesweep enters an infinite loop when placing mines if the user's
configuration has it creating more than (boardsize - 9) mines.  This is
caused by game.c:510 not allowing mines to be created within a 3x3 block
at the centre of the field, while the initial configuration allows for
more than (boardsize - 9) mines to be created.  This patch makes a board
size of 3x3 invalid because no mines can be placed and lowers the 
maximum allowable number of mines on a board to (boardsize - 9).

diff -u freesweep-0.88.old/drawing.c freesweep-0.88/drawing.c
--- freesweep-0.88.old/drawing.c        1999-08-09 18:41:10.000000000 -0400
+++ freesweep-0.88/drawing.c    2004-05-19 01:03:05.000000000 -0400
@@ -138,7 +138,7 @@
                else
                {
                        Value=atoi(ValueBuffer);
-                       if (CheckWidth(Value)>0)
+                       if ((CheckWidth(Value)>0)&&((Value!=3)||(Game->Height!=3)))
                        {
                                Game->Width=Value;
                                Status=1;
diff -u freesweep-0.88.old/game.c freesweep-0.88/game.c
--- freesweep-0.88.old/game.c   1999-08-09 18:41:11.000000000 -0400
+++ freesweep-0.88/game.c       2004-05-19 01:04:43.000000000 -0400
@@ -53,7 +53,7 @@
 */
 int CheckNumMines(int NewVal,int Height,int Width)
 {
-       return (((NewVal>0)&&(NewVal<(Height*Width)))?1:-1);
+       return (((NewVal>0)&&(NewVal<(Height*Width-8)))?1:-1);
 }
 
 int InitGame(GameStats* Game)


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.6-mm3
Locale: LANG=C, LC_CTYPE=C

Versions of packages freesweep depends on:
ii  libc6                       2.3.2.ds1-12 GNU C Library: Shared libraries an
ii  libncurses5                 5.4-3        Shared libraries for terminal hand

-- no debconf information

-- 
Seneca
seneca-cunningham@rogers.com



Reply sent to Ansgar Burchardt <ansgar@43-1.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Seneca <seneca-cunningham@rogers.com>:
Bug acknowledged by developer. (full text, mbox, link).


Message #10 received at 249896-close@bugs.debian.org (full text, mbox, reply):

From: Ansgar Burchardt <ansgar@43-1.org>
To: 249896-close@bugs.debian.org
Subject: Bug#249896: fixed in freesweep 0.90-1
Date: Tue, 26 Feb 2008 21:02:09 +0000
Source: freesweep
Source-Version: 0.90-1

We believe that the bug you reported is fixed in the latest version of
freesweep, which is due to be installed in the Debian FTP archive:

freesweep_0.90-1.diff.gz
  to pool/main/f/freesweep/freesweep_0.90-1.diff.gz
freesweep_0.90-1.dsc
  to pool/main/f/freesweep/freesweep_0.90-1.dsc
freesweep_0.90-1_i386.deb
  to pool/main/f/freesweep/freesweep_0.90-1_i386.deb
freesweep_0.90.orig.tar.gz
  to pool/main/f/freesweep/freesweep_0.90.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 249896@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ansgar Burchardt <ansgar@43-1.org> (supplier of updated freesweep package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 23 Feb 2008 14:03:57 +0100
Source: freesweep
Binary: freesweep
Architecture: source i386
Version: 0.90-1
Distribution: unstable
Urgency: low
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Changed-By: Ansgar Burchardt <ansgar@43-1.org>
Description: 
 freesweep  - a text-based minesweeper
Closes: 210644 249771 249896 436862 465927
Changes: 
 freesweep (0.90-1) unstable; urgency=low
 .
   * New Maintainer: Debian Games Team (Closes: #465927)
   * Add myself to Uploaders
   * Add VCS fields to debian/control
   * Use quilt for patch management
   * New upstream release (Closes: #249771)
   * Handle nostrip build option (Closes: #436862)
   * Create global high score file
   * Do not crash when using global high score (Closes: #210644)
   * Do not try to place too many mines (Closes: #249896)
   * debian/copyright:
     + Correct FSF address
     + Refer to GPL-2
   * debian/freesweep.menu: Quote strings
Files: 
 4493f8c1ef7b11dd3dec281f385bcc6d 893 games optional freesweep_0.90-1.dsc
 fc737e390602e3318297d9adc304da3b 87169 games optional freesweep_0.90.orig.tar.gz
 8aa06f71c58c736d0e9666f22f638588 5810 games optional freesweep_0.90-1.diff.gz
 397411a0fc00c7a9f58c948fc4d13533 38842 games optional freesweep_0.90-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHxHHKBxd04ADYzRYRAu5qAJ9VyFVwGBlTIi0n8HxtQ/aQATvYwACeMPSv
bTSRroHtjVh56pbNJFEhOu0=
=iy+K
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 13 Apr 2008 07:46:54 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 13:52:12 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.