summaryrefslogtreecommitdiff
path: root/src/XawIm.c
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-09-21 17:57:36 +0000
committerEgbert Eich <eich@suse.de>2004-09-21 17:57:36 +0000
commit4904540c4399fed01ce0d1977a0b5d3af173b66c (patch)
tree6cdb7dfe47db72f22011ed7e20f2c4c3418618dc /src/XawIm.c
parentc7f720ae3f0dea94bc6e9eb9bdbbf00e6bb16b24 (diff)
downloadxorg-lib-libXaw-4904540c4399fed01ce0d1977a0b5d3af173b66c.tar.gz
Merged over libXpm security fix provided by Chris Evans, Matthieu Herrb and
Alan Coopersmith from release 6.8.1. Fail during initialization with error if font/fontset is not set for widget. This prevents a sig11 later when the non-existent font/fontset structs are referenced. Check if xf86Info.kbdProc pointer is really set before calling it on abort as this pointer won't be set if the new modular keyboard driver is used (Matthias Hopf). Added new libs to the bindist control files. Removed inclusion of unnecessary kernel header on Linux. This may fail in an -ansi environment.
Diffstat (limited to 'src/XawIm.c')
-rw-r--r--src/XawIm.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/XawIm.c b/src/XawIm.c
index 69c2f99..06f94ef 100644
--- a/src/XawIm.c
+++ b/src/XawIm.c
@@ -808,8 +808,10 @@ CreateIC(Widget w, XawVendorShellExtPart *ve)
pe_a[pe_cnt] = (XPointer) p->font_set; pe_cnt++;
st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++;
st_a[st_cnt] = (XPointer) p->font_set; st_cnt++;
- height = maxAscentOfFontSet(p->font_set)
- + maxDescentOfFontSet(p->font_set);
+ if (p->font_set) {
+ height = maxAscentOfFontSet(p->font_set)
+ + maxDescentOfFontSet(p->font_set);
+ }
height = SetVendorShellHeight(ve, height);
}
if (p->flg & CIFg) {
@@ -938,7 +940,7 @@ SetICValues(Widget w, XawVendorShellExtPart *ve, Bool focus)
XPointer ic_a[20], pe_a[20], st_a[20];
int ic_cnt = 0, pe_cnt = 0, st_cnt = 0;
XawTextMargin *margin;
- int height;
+ int height = 0;
if ((ve->im.xim == NULL) || ((p = GetIcTableShared(w, ve)) == NULL) ||
(p->xic == NULL)) return;
@@ -965,8 +967,10 @@ SetICValues(Widget w, XawVendorShellExtPart *ve, Bool focus)
pe_a[pe_cnt] = (XPointer) p->font_set; pe_cnt++;
st_a[st_cnt] = (XPointer) XNFontSet; st_cnt++;
st_a[st_cnt] = (XPointer) p->font_set; st_cnt++;
- height = maxAscentOfFontSet(p->font_set)
- + maxDescentOfFontSet(p->font_set);
+ if (p->font_set) {
+ height = maxAscentOfFontSet(p->font_set)
+ + maxDescentOfFontSet(p->font_set);
+ }
height = SetVendorShellHeight(ve, height);
}
if (p->flg & CIFg) {