bug-xboard
[Top][All Lists]
Advanced

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

Re: [Bug-XBoard] a Segmentation fault bug


From: H.G. Muller
Subject: Re: [Bug-XBoard] a Segmentation fault bug
Date: Wed, 23 Jul 2014 23:18:49 +0200
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


Binbin Zhang schreef op 7/23/2014 6:14 PM:
            3. Click buttons  in this order

                    Edit  --> Game-list tag --> Players
            4.Oops, xboard quits abnormally

Ah yes, when you double-click Players (or in fact any item in the listbox), it makes XBoard segfault in any mode.

This went so far undetected, because you are not supposed to do this! ;-)

The problem is that the first Option in the discriptor of the dialog (listOptions[] in dialogs.c) has "" initialized for its textValue field, rather than NULL. For a ListBox Option the textValue is (ab)used as a pointer to an optional user-supplied callback for double-click events. As double-clicks have no function in this listbox, no such callback exists, and the way to tell the system that is having textValue=NULL. As it was, the code would try to execute the empty string as if it were code, jumping into the data segment...

Thanks for spotting this.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]