On Sat Sep 16 00:23:08 2000, dennis@xxxxxxxxxxxxxxxxxxxxxx wrote:
>
> Hi,
>
> I was having trouble building Open Inventor using the OpenMotif 2.1.30 rpms
> from Metrolink on a RedHat 6.2 Linux system. In particular ivview would
> seg fault immediately. I tracked the problem to a call to
> XmCreatePulldownMenu that passed NULL in for the second parameter,
> the name string. Replacing:
>
> XmCreatePulldownMenu(menuWidget, NULL, popupargs, popupn);
>
> with
>
> XmCreatePulldownMenu(menuWidget, "", popupargs, popupn);
>
> fixed the problem. This problem had been fixed at a few other places
More information about this ... I happen to be working on an unrelated Motif
2.1 problem and have the code for RowColumn.c in front of me.
In Motif 1.2, the name argument was sprintf()'d into an array of 200 bytes,
hardcoded. In Motif 2.1, the array is dynamically allocated and strlen() is
used to figure out the length of the name argument. Consequently, the program
crashes at strlen() when one passes in NULL. The Motif code should really be
checking for that, just to be safe.
Jonathan Lim _ Silicon Graphics _ Mountain View
GPS Graphics Computer Systems CA, USA
|