Index: xc/lib/xkbfile/maprules.c =================================================================== RCS file: /cvs/xorg/xc/lib/xkbfile/maprules.c,v retrieving revision 1.5 diff -u -r1.5 maprules.c --- xc/lib/xkbfile/maprules.c 3 Jul 2005 07:37:33 -0000 1.5 +++ xc/lib/xkbfile/maprules.c 28 Oct 2005 18:08:04 -0000 @@ -1360,7 +1360,8 @@ Atom rules_atom,actual_type; int fmt; unsigned long nitems,bytes_after; -char *data,*out; +unsigned char *data; +char *out, *end; Status rtrn; rules_atom= XInternAtom(dpy,_XKB_RF_NAMES_PROP_ATOM,True); @@ -1381,35 +1382,36 @@ return (fmt==0?True:False); } - out= data; + out=(char*)data; + end=out+nitems; if (out && (*out) && rf_rtrn) *rf_rtrn= _XkbDupString(out); out+=strlen(out)+1; - if ((out-data)model= _XkbDupString(out); out+=strlen(out)+1; } - if ((out-data)layout= _XkbDupString(out); out+=strlen(out)+1; } - if ((out-data)variant= _XkbDupString(out); out+=strlen(out)+1; } - - if ((out-data)options= _XkbDupString(out); out+=strlen(out)+1; } + XFree(data); return True; }