summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-03-04 15:43:43 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-03-06 12:26:21 -0800
commit16d9941f3aa38dde115cbff639e131761c1b36d0 (patch)
treea99bcb3dd74ca2958c747941e90c7f09f5bd67e4
parent994443524ade46bad03eea0acbd1410d561c591d (diff)
Incorrect cast in XtCvtIntToPixmap could cause bus error on 64-bit machines
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@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--src/Converters.c2
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(
XtNwrongParameters,"cvtIntToPixmap",XtCXtToolkitError,
"Integer to Pixmap conversion needs no extra arguments",
(String *) NULL, (Cardinal *)NULL);
- done(Pixmap, *(Pixmap*)fromVal->addr);
+ done(Pixmap, *(int*)fromVal->addr);
}
#ifdef MOTIFBC