[Xorg] [Bug 286] New: Xi: XGetDeviceDontPropagateList does not allocate enough memory on 64-Bit machines
bugzilla-daemon at pdx.freedesktop.org
bugzilla-daemon at pdx.freedesktop.org
Mon Mar 8 02:47:17 PST 2004
http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=286
Summary: Xi: XGetDeviceDontPropagateList does not allocate enough
memory on 64-Bit machines
Product: xorg
Version: unspecified
Platform: DEC
OS/Version: OSF/1
Status: NEW
Severity: critical
Priority: P2
Component: xlib
AssignedTo: xorg at freedesktop.org
ReportedBy: luik at orthogon.de
XEventClass is typedef'd as an "unsigned long", therefore, on an
Alpha, this is a 64-bit long cardinal, i.e. 8 bytes long.
Unfortunately, in the XGetDeviceDontPropagateList function, when the
list of XEventClass entries is allocated, the number of bytes is only
(rep.length << 2), i.e. rep.length*4. Instead, the proper number of
bytes to allocate for the list would be "rep.length * sizeof(XEventClass).
With the current code, the memory allocated for the list will be
overwritten on a 64-bit machine like the Compaq Alpha.
The function XGetSelectedExtensionEvents (in lib/Xi/XGtSelect.c) uses
the correct computation as suggested above.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the xorg
mailing list