xserver-multidpi/render
Peter Hutterer 622fc98fd0 render: Fix crash in RenderAddGlyphs (#23645)
This patch fixes two bugs:
size is calculated as glyph height * padded_width. If the client submits
garbage, this may get above INT_MAX, resulting in a negative size if size is
unsigned. The sanity checks don't trigger for negative sizes and the server
goes and writes into random memory locations.

If the client submits glyphs with a width or height 0, the destination
pixmap is NULL, causing a null-pointer dereference. Since there's nothing to
composite if the width/height is 0, we might as well skip the whole thing
anyway.

Tested with Xvfb, Xephyr and Xorg.

X.Org Bug 23645 <http://bugs.freedesktop.org/show_bug.cgi?id=23645>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-10-01 16:00:41 +10:00
..
animcur.c render: delete unused headers declaration 2009-08-28 15:33:19 +03:00
filter.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
glyph.c render: set the glyph picture to NULL by default. 2009-10-01 16:00:13 +10:00
glyphstr.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
Makefile.am Export a bunch of matrix operations from render. 2008-11-24 13:24:36 -08:00
matrix.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
miindex.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
mipict.c Fix miComputeCompositeRegion() to follow new clip rules. 2009-06-18 12:36:11 -04:00
mipict.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
mirect.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
mitrap.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
mitri.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
picture.c render: Don't add b8g8r8x8 format for depth 24. 2009-09-23 13:10:05 +02:00
picture.h Add 4 missing 10bpc picture formats to the server format list. 2009-08-13 12:04:33 -07:00
picturestr.h render: AnimCurInit and AnimCursorCreate shouldn't be _X_EXPORT 2009-08-28 15:30:21 +03:00
render.c render: Fix crash in RenderAddGlyphs (#23645) 2009-10-01 16:00:41 +10:00
renderedge.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
renderedge.h Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00