summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-libs/openmotif/files/openmotif-2.3.0-fix-nedit-segfaults.patch')
-rw-r--r--x11-libs/openmotif/files/openmotif-2.3.0-fix-nedit-segfaults.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/x11-libs/openmotif/files/openmotif-2.3.0-fix-nedit-segfaults.patch b/x11-libs/openmotif/files/openmotif-2.3.0-fix-nedit-segfaults.patch
new file mode 100644
index 000000000000..0d3f1b97c373
--- /dev/null
+++ b/x11-libs/openmotif/files/openmotif-2.3.0-fix-nedit-segfaults.patch
@@ -0,0 +1,20 @@
+--- openmotif-2.3.0-orig/lib/Xm/List.c 2008-04-07 18:27:43.000000000 +0200
++++ openmotif-2.3.0/lib/Xm/List.c 2008-04-07 18:45:47.000000000 +0200
+@@ -3647,6 +3647,7 @@
+ XmStringFree(lw->list.items[pos]);
+ lw->list.items[pos] = XmStringCopy(item);
+ /*Selected items should be replaced also*/
++ UpdateSelectedPositions(lw, lw->list.selectedItemCount);
+ for(i=0; i<lw->list.selectedItemCount; i++)
+ if(lw->list.selectedPositions[i]==pos+1) {
+ XmStringFree(lw->list.selectedItems[i]);
+--- openmotif-2.3.0-orig/lib/Xm/ResEncod.c 2006-11-21 20:50:31.000000000 +0100
++++ openmotif-2.3.0/lib/Xm/ResEncod.c 2008-04-07 18:45:47.000000000 +0200
+@@ -2524,6 +2524,7 @@
+ /* Now copy in the text */
+ if (ctlen > 0) {
+ char *text = Convert(ctext, ctlen, "UTF-8", tag);
++ if (text == NULL) return(False);
+ *outc = ctextConcat(*outc, *outlen, text, strlen(text));
+ *outlen += ctlen;
+ XtFree(text);