xserver-multidpi/fb
Simon Schubert 863d528a9f fb: reorder Bresenham error correction to avoid overshoot.
When fbBresSolid draws a line, it can happen that after the last
pixel, the Bresenham error term overflows, and fbBresSolid paints
another pixel before adjusting the error term.

However, if this happens on the last pixel (len=0), this extra pixel
might overshoot the boundary, and, in rare cases, lead to a segfault.

Fix this issue by adjusting for the Bresenham error term before
drawing the main pixel, not after.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24274
Signed-off-by: Simon Schubert <2@0x2c.or>
Tested-by: Mitch Davis <mjd+freedesktop.org@afork.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-08-14 12:14:25 -07:00
..
fb.h Use new screen-specific privates for fb window and gc privates 2012-07-05 13:40:18 -07:00
fb24_32.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fb24_32.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fballpriv.c Use new screen-specific privates for fb window and gc privates 2012-07-05 13:40:18 -07:00
fbarc.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbbits.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbbits.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbblt.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbbltone.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbcmap_mi.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbcopy.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbfill.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbfillrect.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbfillsp.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbgc.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbgetsp.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbglyph.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbimage.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbline.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fboverlay.c Use new screen-specific privates for fb window and gc privates 2012-07-05 13:40:18 -07:00
fboverlay.h api: rework the X server driver API to avoid global arrays. 2012-06-05 13:22:18 +01:00
fbpict.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbpict.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbpixmap.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbpoint.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbpush.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbrop.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbscreen.c Use new screen-specific privates for fb window and gc privates 2012-07-05 13:40:18 -07:00
fbseg.c fb: reorder Bresenham error correction to avoid overshoot. 2012-08-14 12:14:25 -07:00
fbsetsp.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbsolid.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbstipple.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbtile.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbtrap.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbutil.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fbwindow.c Use new screen-specific privates for fb window and gc privates 2012-07-05 13:40:18 -07:00
Makefile.am fb: Remove hw/xfree86/ from includes 2011-02-08 12:41:13 -05:00
wfbrename.h Use new screen-specific privates for fb window and gc privates 2012-07-05 13:40:18 -07:00