[PATCH:libXt 1/2] Incorrect cast in XtCvtIntToPixmap could cause bus error on 64-bit machines

Alan Coopersmith alan.coopersmith at oracle.com
Fri Mar 4 18:04:22 PST 2011

Originally fixed by Leo Binchy for Sun Bug 4163152 to resolve bus error
on VSW5 (XTS) testing on 64-bit SPARC test run on Solaris 7.
( Testcase: XtCvtIntToPixmap, Purpose:  1)

Since we're converting from Int to Pixmap, need to access the argument
passed in as an int, not a Pixmap, which is consistent with the other
IntToXXX converters in this file.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
 src/Converters.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Converters.c b/src/Converters.c
index 95dd06b..6574ce0 100644
--- a/src/Converters.c
+++ b/src/Converters.c
@@ -1360,7 +1360,7 @@ Boolean XtCvtIntToPixmap(
                   "Integer to Pixmap conversion needs no extra arguments",
                    (String *) NULL, (Cardinal *)NULL);
-    done(Pixmap, *(Pixmap*)fromVal->addr);
+    done(Pixmap, *(int*)fromVal->addr);
 #ifdef MOTIFBC

More information about the xorg-devel mailing list