FVWM: Full crash when using an invalid PNG for a mini-icon

2019-05-28 Thread gi1242+fvwm
Hi All,

I'm using fvwm 2.6.7 from Debian/stretch.

If I execute the command

Pick WindowStyle MiniIcon password.png

I get a full FVWM crash (and consequently an X server exit + lost work +
tears).

The problem is that the png file password.png (which I'm attaching,
and hoping it makes it past the list mail filters) is badly formed. When
opening it, libpng reports an error:

libpng error: IDAT: invalid distance too far back

Regardless of what the error with the PNG is, FVWM should just install a
Dummy MiniIcon (or ignore the request) instead of crashing.

Please let me know if someone else can reproduce the problem, and if it
persists with the latest release. (I'm happy to file a bug report
instead if you prefer.)

Thanks,

GI

-- 
'Committee' -- A cul-de-sac down which ideas are lured and then quietly
strangled.



Re: FVWM: Full crash when using an invalid PNG for a mini-icon

2019-05-28 Thread gi1242+fvwm
On Tue, May 28, 2019 at 09:46:35AM -0400, gi1242+f...@gmail.com wrote:

> The problem is that the png file password.png (which I'm attaching,
> and hoping it makes it past the list mail filters) is badly formed.

Oops. I forgot the attachment. Here it is now.

Best,

Gautam

-- 
A lot of money is tainted. It taint yours and it taint mine.


Re: FVWM: Full crash when using an invalid PNG for a mini-icon

2019-05-28 Thread Thomas Adam
On Tue, 28 May 2019 at 14:47,  wrote:
>
> Hi All,
>
> I'm using fvwm 2.6.7 from Debian/stretch.
>
> If I execute the command
>
> Pick WindowStyle MiniIcon password.png
>
> I get a full FVWM crash (and consequently an X server exit + lost work +
> tears).

Can you please ensure FVWM has been built with debug symbols, and get
a backtrace from gdb?

Thanks,
Thomas



Re: FVWM: Full crash when using an invalid PNG for a mini-icon

2019-05-28 Thread Martin Cermak
On  Tue  2019-05-28  15:27 , Thomas Adam wrote:
> On Tue, 28 May 2019 at 14:47,  wrote:
> >
> > Hi All,
> >
> > I'm using fvwm 2.6.7 from Debian/stretch.
> >
> > If I execute the command
> >
> > Pick WindowStyle MiniIcon password.png
> >
> > I get a full FVWM crash (and consequently an X server exit + lost work +
> > tears).
> 
> Can you please ensure FVWM has been built with debug symbols, and get
> a backtrace from gdb?

Reproduced with fvwm-2.6.8-2.fc29.x86_64 
(https://koji.fedoraproject.org/koji/buildinfo?buildID=1108778) :

===
(gdb) bt
#0  0x7ff3879ff53f in raise () from /lib64/libc.so.6
#1  0x7ff3879e9895 in abort () from /lib64/libc.so.6
#2  0x7ff38851a235 in ?? () from /lib64/libpng16.so.16
#3  0x7ff38851f4eb in png_error () from /lib64/libpng16.so.16
#4  0x7ff38851f574 in png_chunk_error () from /lib64/libpng16.so.16
#5  0x7ff3885325ff in ?? () from /lib64/libpng16.so.16
#6  0x7ff388524b08 in png_read_row () from /lib64/libpng16.so.16
#7  0x7ff38852668a in png_read_image () from /lib64/libpng16.so.16
#8  0x559b77dc8df1 in PImageLoadPng (dpy=, path=, argb_data=0x7ffe4630b2b0, width=, height=) 
at PictureImageLoader.c:535
#9  0x559b77dc9941 in PImageLoadArgbDataFromFile 
(dpy=dpy@entry=0x559b78ff9290, path=path@entry=0x559b79020750 
"/home/mcermak/password.png", argb_data=argb_data@entry=0x7ffe4630b2b0, 
width=width@entry=0x7ffe4630b354, height=height@entry=0x7ffe4630b358) at 
PictureImageLoader.c:114
#10 0x559b77dca14b in PImageLoadPixmapFromFile 
(dpy=dpy@entry=0x559b78ff9290, win=win@entry=6291788, 
path=path@entry=0x559b79020750 "/home/mcermak/password.png", 
pixmap=pixmap@entry=0x7ffe4630b368, mask=mask@entry=0x7ffe4630b370, 
alpha=alpha@entry=0x7ffe4630b378, width=0x7ffe4630b354, height=0x7ffe4630b358, 
depth=0x7ffe4630b35c, nalloc_pixels=0x7ffe4630b364, 
alloc_pixels=0x7ffe4630b380, no_limit=0x7ffe4630b360, fpa=...) at 
PictureImageLoader.c:830
#11 0x559b77dca36b in PImageLoadFvwmPictureFromFile 
(dpy=dpy@entry=0x559b78ff9290, win=win@entry=6291788, 
path=path@entry=0x559b79020750 "/home/mcermak/password.png", fpa=...) at 
PictureImageLoader.c:893
#12 0x559b77dd3fde in PCacheFvwmPicture (dpy=0x559b78ff9290, win=6291788, 
ImagePath=ImagePath@entry=0x0, name=, fpa=...) at Picture.c:138
#13 0x559b77d71c5d in setup_mini_icon (pstyle=pstyle@entry=0x7ffe4630bb00, 
fw=, fw=) at add_window.c:850
#14 0x559b77d7319e in change_mini_icon (fw=fw@entry=0x559b7902c460, 
pstyle=pstyle@entry=0x7ffe4630bb00) at add_window.c:2258
#15 0x559b77dac1af in apply_window_updates (t=t@entry=0x559b7902c460, 
flags=flags@entry=0x7ffe4630baf8, pstyle=pstyle@entry=0x7ffe4630bb00, 
focus_w=focus_w@entry=0x559b7902c460) at update.c:180
#16 0x559b77dad0c2 in flush_window_updates () at update.c:727
#17 0x559b77d5e755 in HandleEvents () at events.c:4199
#18 0x559b77d3b59a in main (argc=, argv=) at 
fvwm.c:2590
(gdb)
===

Martin



Re: FVWM: Full crash when using an invalid PNG for a mini-icon

2019-05-28 Thread gi1242+fvwm
On Tue, May 28, 2019 at 05:21:50PM +0200, Martin Cermak wrote:

>> Can you please ensure FVWM has been built with debug symbols, and get
>> a backtrace from gdb?
> 
> Reproduced with fvwm-2.6.8-2.fc29.x86_64

Yay, thanks! Now I don't have to download + compile... :)

GI

-- 
In democracy your vote counts. In feudalism your count votes.