Created attachment 27239 [details] [review] Resources.c patch Application crashes when calling XtVaCreateManagedWidget if specified resources are not found: #0 0xf7b5382e in ?? () from /usr/lib/libXt.so.6 #1 0xf7b54876 in _XtGetResources () from /usr/lib/libXt.so.6 #2 0xf7b3c429 in ?? () from /usr/lib/libXt.so.6 #3 0xf7b3ce65 in _XtCreateWidget () from /usr/lib/libXt.so.6 #4 0xf7b6e376 in ?? () from /usr/lib/libXt.so.6 #5 0xf7b6e48d in XtVaCreateManagedWidget () from /usr/lib/libXt.so.6 Calling code: myform = XtVaCreateManagedWidget( "myform", xmFormWidgetClass, wParent, XmNwidth, 259, XmNheight, 648, XmNresizePolicy, XmRESIZE_NONE, XmNunitType, XmPIXELS, XmNautoUnmanage, FALSE, XmNnoResize, TRUE, XmNdialogTitle, "My Desktop Manager", XmNbackground, myColorBg, XmNforeground, myColorFg, XmNhighlightColor, scanHighlightColor, NULL ); Crash occurs in GetResources() because the code is attempting to adjust elements in the input/output array 'typed_args' while still referring to the original offsets with the marker arrays 'typed' and 'found'. The patch corrects the error by not 'compressing the list' array 'typed_args' until all the args have been processed.
commit 9e898aa4fd964e888044e2fa2d64089505331f62 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Oct 7 17:01:34 2011 -0700 Don't pop elements from our array while we're itterating through it. https://bugs.freedesktop.org/show_bug.cgi?id=22543 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.