diff options
author | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-02-24 18:09:00 +0000 |
---|---|---|
committer | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-02-24 18:09:00 +0000 |
commit | 2a01568e61905944a59a7a8b34f22e08ccd25937 (patch) | |
tree | c2305fd2dda566c7f28d61fd217e7029c342fc13 | |
parent | 26388c9b82fd29ecde162b81bd59f38827171142 (diff) |
Bug #1391 <https://bugs.freedesktop.org/show_bug.cgi?id=1391> Patch #4739
<https://bugs.freedesktop.org/attachment.cgi?id=4739> xdm hangs in a
loop when invalid xpm bitmap is used for logo (Costantino Leandro
<lcostantino@gmail.com>)
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | greeter/Login.c | 25 |
2 files changed, 26 insertions, 7 deletions
@@ -1,3 +1,11 @@ +2006-02-24 Alan Coopersmith <alan.coopersmith@sun.com> + + * greeter/Login.c: + Bug #1391 <https://bugs.freedesktop.org/show_bug.cgi?id=1391> + Patch #4739 <https://bugs.freedesktop.org/attachment.cgi?id=4739> + xdm hangs in a loop when invalid xpm bitmap is used for logo + (Costantino Leandro <lcostantino@gmail.com>) + 2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org> * configure.ac: diff --git a/greeter/Login.c b/greeter/Login.c index 4324666..360cd7c 100644 --- a/greeter/Login.c +++ b/greeter/Login.c @@ -1,3 +1,4 @@ +/* $XdotOrg: $ */ /* $Xorg: Login.c,v 1.4 2001/02/09 02:05:41 xorgcvs Exp $ */ /* @@ -1030,6 +1031,8 @@ static void Initialize ( #endif #ifdef XPM + int rv = 0; + myXGCV.foreground = w->login.hipixel; myXGCV.background = w->core.background_pixel; valuemask = GCForeground | GCBackground; @@ -1117,13 +1120,21 @@ static void Initialize ( myAttributes.valuemask |= XpmReturnPixels; myAttributes.valuemask |= XpmReturnExtensions; - XpmReadFileToPixmap(XtDisplay(w), /* display */ - RootWindowOfScreen(XtScreen(w)), /* window */ - w->login.logoFileName, /* XPM filename */ - &(w->login.logoPixmap), /* pixmap */ - &(w->login.logoMask), /* pixmap mask */ - &myAttributes); /* XPM attributes */ - w->login.logoValid = True; + rv = XpmReadFileToPixmap(XtDisplay(w), /* display */ + RootWindowOfScreen(XtScreen(w)), /* window */ + w->login.logoFileName, /* XPM filename */ + &(w->login.logoPixmap), /* pixmap */ + &(w->login.logoMask), /* pixmap mask */ + &myAttributes); /* XPM attributes */ + + if ( rv < 0 ) + { + LogError("Cannot load xpm file %s: %s.\n", w->login.logoFileName, + XpmGetErrorString(rv)); + goto SkipXpmLoad; + } + + w->login.logoValid = True; XGetGeometry(XtDisplay(w), w->login.logoPixmap, &tmpWindow, |