Bug#679875: ace-of-penguins: Games crash when trying to view help screen

2022-05-02 Thread Krzysztof Aleksander Pyrkosz
Package: ace-of-penguins
Followup-For: Bug #679875
X-Debbugs-Cc: krzpyrk...@gmail.com

Dear Maintainer,

the source of the bug is an out of bounds access in a for loop in lib/help.c:515

int ts = (thin_space[words[i-1].flags & STYLE_BITS]
  + thin_space[words[i].flags & STYLE_BITS])/2;

Iteration starts from i = 0, accessing words[i-1] causes the crash.
The upper bound is wrong aswell. Iteration should terminate for i < nwords, not 
i <= nwords.



Bug#679875: ace-of-penguins: Games crash when trying to view help screen

2012-11-20 Thread jari
Hi DJ,

If there are no suitable fonts, it causes program to crash.

Could you look and release a possible fix or workaround[1]. The previous
discussion is at:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679875

Jari

[1] One possibility would be to use perror() + exit(). Note that due
to Debian policy, programs cannot rely on any fonts being installed.
http://lists.debian.org/debian-policy/2008/07/msg00173.html
http://lists.debian.org/debian-policy/2008/07/msg00176.html


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679875: ace-of-penguins: Games crash when trying to view help screen

2012-11-01 Thread Jonathan Nieder
tags 679875 + upstream - unreproducible
found 679875 ace-of-penguins/1.3-10
quit

| Program received signal SIGSEGV, Segmentation fault.
| 0x776a5150 in XTextWidth () from /usr/lib/x86_64-linux-gnu/libX11.so.6
| (gdb) bt
| #0  0x776a5150 in XTextWidth () from 
/usr/lib/x86_64-linux-gnu/libX11.so.6
| #1  0x77bcf3b1 in help_init () at help.c:179
| #2  help (filename=0x6eaa freecell.html, 
| text=0x557590c0 h1Freecell/h1\nimg align=left 
src=xemboss\nimg align=right src=as\n\nh2iThe Ace of 
Penguins/i/h2\n\nh2ttFreecell/tt/h2\npCopyright \251 1998, 2001 
by DJ Delorie ttd...@delorie.combr...) at help.c:390
| #3  0x77bcdc99 in table_loop () at table.c:463
| #4  0x5710 in main (argc=1, argv=0x7fffe868) at freecell.c:654

Here's a quick patch to demonstrate where the problem is.

diff --git i/lib/help.c w/lib/help.c
index a8dcd3d4..66805531 100644
--- i/lib/help.c
+++ w/lib/help.c
@@ -176,6 +176,8 @@ help_init()
   {
 if (!fonts[i])
   fonts[i] = XLoadQueryFont(display, i  STYLE_TT ? fixed : variable);
+if (!fonts[i])
+  exit(1);
 thin_space[i] = XTextWidth(fonts[i],  , 1);
   }
   for (i=0; iNTAGS; i++)
diff --git i/lib/xwin.c w/lib/xwin.c
index 2c8fcfaf..658fa3e8 100644
--- i/lib/xwin.c
+++ w/lib/xwin.c
@@ -217,6 +217,7 @@ xwin_init(int argc, char **argv)
   font = XLoadQueryFont(display, 6x13bold);
   if (!font) font = XLoadQueryFont(display, 6x10);
   if (!font) font = XLoadQueryFont(display, fixed);
+  if (!font) exit(1);
   font_width = font-max_bounds.width;
   font_height = font-ascent + font-descent;
 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679875: ace-of-penguins: Games crash when trying to view help screen

2012-11-01 Thread Jari Aalto
forwarded 679875 d...@delorie.com
thanks

Hi DJ,

The font problem is still present. Could you look at the code to see if
there is a way around the problem when font is not available. The previous
discussion is at:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679875

If all others fail, perhaps using perror() + exit() is the only solution?

Jari

2012-11-02 04:32 Jonathan Nieder jrnie...@gmail.com:
| | Program received signal SIGSEGV, Segmentation fault.
|
| Here's a quick patch to demonstrate where the problem is.
|
| diff --git i/lib/help.c w/lib/help.c
| index a8dcd3d4..66805531 100644
| --- i/lib/help.c
| +++ w/lib/help.c
| @@ -176,6 +176,8 @@ help_init()
|{
|  if (!fonts[i])
|fonts[i] = XLoadQueryFont(display, i  STYLE_TT ? fixed : 
variable);
| +if (!fonts[i])
| +  exit(1);
|  thin_space[i] = XTextWidth(fonts[i],  , 1);
|}
|for (i=0; iNTAGS; i++)
| diff --git i/lib/xwin.c w/lib/xwin.c
| index 2c8fcfaf..658fa3e8 100644
| --- i/lib/xwin.c
| +++ w/lib/xwin.c
| @@ -217,6 +217,7 @@ xwin_init(int argc, char **argv)
|font = XLoadQueryFont(display, 6x13bold);
|if (!font) font = XLoadQueryFont(display, 6x10);
|if (!font) font = XLoadQueryFont(display, fixed);
| +  if (!font) exit(1);
|font_width = font-max_bounds.width;
|font_height = font-ascent + font-descent;
|


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679875: ace-of-penguins: Games crash when trying to view help screen

2012-08-15 Thread Jari Aalto

FYI, why debian/control::Recommends is used in place of Depends
---

The Policy disallows any package for requiring fonts prior
installing the software:

http://lists.debian.org/debian-policy/2008/07/msg00173.html

This is because the X server may retrieve fonts from the
local file system or over the network from an X font server;
the Debian package system is empowered to deal only with the
local file system.

For more information in same thread later:

http://lists.debian.org/debian-policy/2008/07/msg00176.html

The reason for the Policy requirement for Recommends is to
enable font servers and not require all the fonts be installed
locally when you're running a font server.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679875: ace-of-penguins: Games crash when trying to view help screen

2012-07-09 Thread Jari Aalto
severity 679875 minor
tags 679875 + unreproducible
thanks

2012-07-02 11:24 Lukas Hofmann lhfl...@gmx.de:
| Architecture: amd64 (x86_64)
| Package: ace-of-penguins
| Version: 1.3-8
| Severity: normal
|
| Dear Maintainer,
|
| Whenever I press F1 or h to view the help screen in any ace-of-penguins
| game it crashes with a Segmentation fault. This happens in all of the
| included games except in canfield, which doesn't react to F1 or h at all.

I tested both in i386 and amd64 but the F1 key works normally; brings up
game info screen.

It's hard to tell what is different in your environemt. Could you:

1. Update all to latest

   apt-get update  apt-get dist-upgrade

2. Try removing the package and installing it fresh

   apt-get --purge remove ace-of-penguins
   apt-get install ace-of-penguins

3. If F1 still brings up segmentation fault, please send strace:

:  /tmp/strace.log
strace -o /tmp/strace.log /usr/games/ace-freecell

4. send *.log as an attachment to this bug report

Until then, downgrading the severity.

Thanks,
Jari



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679875: ace-of-penguins: Games crash when trying to view help screen

2012-07-09 Thread lhfloss
Sorry for sending my reply twice. I did a mistake sending it with my
mail client.

I examined the log-file and found out that some fonts were missing.
After installing the package xfonts-100dpi everything works fine now.

Sorry for making you unnecessary work.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679875: ace-of-penguins: Games crash when trying to view help screen

2012-07-09 Thread jaalto
On 2012-07-09 12:01, Lukas Hofmann wrote:
| Sorry for sending my reply twice. I did a mistake sending it with my
| mail client.
| 
| I examined the log-file and found out that some fonts were missing.
| After installing the package xfonts-100dpi everything works fine now.
| 
| Sorry for making you unnecessary work.

Not at all. Thanks for taking the time to debug this. I'll add that fonts to 
Depends.

Jari




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#679875: ace-of-penguins: Games crash when trying to view help screen

2012-07-02 Thread Lukas Hofmann
Package: ace-of-penguins
Version: 1.3-8
Severity: normal

Dear Maintainer,

Whenever I press F1 or h to view the help screen in any ace-of-penguins game it 
crashes with a Segmentation fault.
This happens in all of the included games except in canfield, which doesn't 
react to F1 or h at all.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.4.4-gnu (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ace-of-penguins depends on:
ii  libc6  2.13-33
ii  libpng12-0 1.2.49-1
ii  libx11-6   2:1.5.0-1
ii  multiarch-support  2.13-33

ace-of-penguins recommends no packages.

ace-of-penguins suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org