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

lesstiff bug triggered by grace and ddd programs



xmgrace and ddd both fail on my AMD64 system.  It seems that the
root of their failure is a pointer corruption in CascadeB.c and
CascadeBG.c of Xm-2.1.  In both cases, the call to
size_cascade(Widget w) corrupts w on return and triggers a
fault in the calling routine.

I believe the problem is in the call to XGetGeometry with the
following XtDisplay(w), CB_CascadePixmap(w),(Window *)&dummy, &dummy,
&dummy,&width, &height, (unsigned *)&dummy, (unsigned *)&dummy).

dummy is an int.  However, Window is an unsigned long.
Making a new varible dummyw of type Window fixes the problem.

diff CascadeB.c CascadeB.bak
351d350
<     Window dummyw;
357c356
<                    (Window *)&dummyw, &dummy, &dummy,
---
>                    (Window *)&dummy, &dummy, &dummy,

diff CascadeBG.c CascadeBG.bak
697d696
<     Window dummyw;
705c704
<                        (Window *)&dummyw, &dummy, &dummy,
---
>                        (Window *)&dummy, &dummy, &dummy,

Is these the correct way to fix this problem, is this correct?

Nick Materer



Reply to: