[8932] in Athena Bugs
7.3P DECstation "xmodmap -pk" unaligned access bus error
daemon@ATHENA.MIT.EDU (epeisach@Athena.MIT.EDU)
Tue Feb 4 13:40:21 1992
From: epeisach@Athena.MIT.EDU
Date: Tue, 4 Feb 92 13:39:54 -0500
To: bugs@Athena.MIT.EDU
The bug is in X/XKeySymstr.c - the following is the fix. We overflow the
buf by one if ks has the high bit set in the sprintf. (%lX to sprintf is
can by 8 bytes, plus 1 for the NULL -- 9)
Diff against the R5 sources shows this to be a proper fix. (They added
some other code which I'm unsure of, but this part is self contained and
makes matters no worse)
RCS file: RCS/XKeysymStr.c,v
retrieving revision 1.1
diff -c -r1.1 XKeysymStr.c
*** /tmp/,RCSt1a01468 Tue Feb 4 13:37:04 1992
--- XKeysymStr.c Tue Feb 4 13:35:48 1992
***************
*** 56,62 ****
if (keysymdb = _XInitKeysymDB())
{
! char buf[8];
XrmValue resval;
sprintf(buf, "%lX", ks);
--- 56,62 ----
if (keysymdb = _XInitKeysymDB())
{
! char buf[9];
XrmValue resval;
sprintf(buf, "%lX", ks);