Re: [dev] [st] Segmentation fault when clicking the top of window

From: Christoph Lohmann <20h_AT_r-36.net>
Date: Wed, 27 Mar 2013 21:48:14 +0100

Greetings.

On Wed, 27 Mar 2013 21:48:14 +0100 Markus Teich <markus.teich_AT_stusta.mhn.de> wrote:
> Am 27.03.2013 08:41, schrieb Christoph Lohmann:
> > I thought you would fix the segfault, but instead all I got was a lousy
> > XML file. :/
>
> problem:
> in config.h borderpx is declared as an unsigned int.
> in the bpress(XEvent* e) function Y2ROW(e->xbutton.y) is called and gets
> expanded to:
> (((e->xbutton.y) - borderpx)/xw.ch)
> XWindow.ch and XButtonEvent.y are both signed integers but the result is
> unsigned, so
> (((0) - 2)/14) for example gets evaluated to something really high and
> out of range to the term.dirty[] array which causes the bad mem access
> in line 801.
>
> one possible solution:
> make borderpx signed and hope the users are not stupid enough to set it
> to a negative value.

Bug reports always have to be reported against latest git revision.
There this is already true. Can you try, if the bug can be still repro‐
duced?


Sincerely,

Christoph Lohmann
Received on Wed Mar 27 2013 - 21:48:14 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 27 2013 - 22:00:06 CET