mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-02 18:57:59 +02:00
read-only mirror of https://gitlab.freedesktop.org/xorg/lib/libx11
Properly handle the return value of XGetWindowProperty by considering if after the loop as well. Using freed pointer "prop_ret" There were numerous things wrong in how this function interacted with XGetWindowProperty. None of the local variables were initialized and remained that way if the call to XGetWindowProperty returned 1 (not Succeed). That doesn't result in after_ret being initialized in which case if it happens to be 0, the loop was exited. In that case format_ret and nitems_ret were uninitialized and the function might return with success (but with uninitialized pointer in prop_ret) or XcmsFailure. As the buffer enlarging code was called only when XGetWindowProperty failed (returned not Success), after_ret would not have been initialized. It would have been initialized only if the XGetWindowProperty has returned Success earlier, but in that case the code fragment would not have been reached. This patch alters the function to return XcmsFailure if the call to XGetWindowProperty fails. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> |
||
|---|---|---|
| include | ||
| m4 | ||
| man | ||
| modules | ||
| nls | ||
| specs | ||
| src | ||
| .gitignore | ||
| AUTHORS | ||
| autogen.sh | ||
| configure.ac | ||
| COPYING | ||
| cpprules.in | ||
| Makefile.am | ||
| NEWS | ||
| README | ||
| x11-xcb.pc.in | ||
| x11.pc.in | ||
libX11 - Core X11 protocol client library
Documentation for this library can be found in the included man pages,
the xlib spec from the doc/xorg-docs module, also available at:
http://xorg.freedesktop.org/releases/X11R7.0/doc/PDF/xlib.pdf
and the O'Reilly Xlib books, which they have made freely available online,
though only for older versions of X11:
- X Series Volume 2: Xlib Reference Manual (1989, covers X11R3)
http://www.archive.org/details/xlibretmanver1102nyemiss
- X Series Volume 2: Xlib Reference Manual, 2nd Edition (1990, covers X11R4)
http://www.archive.org/details/xlibrefmanv115ed02nyemiss
All questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
Please submit bug reports to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
The master development code repository can be found at:
git://anongit.freedesktop.org/git/xorg/lib/libX11
http://cgit.freedesktop.org/xorg/lib/libX11
For patch submission instructions, see:
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
For more information on the git code manager, see:
http://wiki.x.org/wiki/GitPage