summaryrefslogtreecommitdiff
path: root/hw/xquartz
diff options
context:
space:
mode:
authorSimon Schubert <2@0x2c.org>2012-08-12 09:40:16 -0700
committerKeith Packard <keithp@keithp.com>2012-08-14 12:14:25 -0700
commit863d528a9f76d0e8f122aebf19f8564a4c67a938 (patch)
tree675a754c1add3c8da1ea87c16e5936ada2f2db2b /hw/xquartz
parentc22c936b35cee60609041ccb7ee52c00b0634d7b (diff)
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>
Diffstat (limited to 'hw/xquartz')
0 files changed, 0 insertions, 0 deletions