summaryrefslogtreecommitdiff
path: root/xserver/render
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2007-05-02 09:56:37 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2007-05-02 09:56:37 +0000
commit15fda84a78bca9dfce3e9c07531379967f84f9c8 (patch)
tree844df9f18ee25aba758caeb5b056ed982624a82d /xserver/render
parenteb80540671500ea514a22533b208b4dd01deeb43 (diff)
Fix for a divide by zero that can be triggered by a malicious client.
Problem reported by Derek Abdine of rapid7.com, patch by Keith Packard.
Diffstat (limited to 'xserver/render')
-rw-r--r--xserver/render/renderedge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xserver/render/renderedge.c b/xserver/render/renderedge.c
index 699e25254..226878860 100644
--- a/xserver/render/renderedge.c
+++ b/xserver/render/renderedge.c
@@ -1,5 +1,5 @@
/*
- * $Id: renderedge.c,v 1.1 2006/11/26 18:16:21 matthieu Exp $
+ * $Id: renderedge.c,v 1.2 2007/05/02 09:56:36 matthieu Exp $
*
* Copyright © 2004 Keith Packard
*
@@ -143,6 +143,7 @@ RenderEdgeInit (RenderEdge *e,
dx = x_bot - x_top;
dy = y_bot - y_top;
e->dy = dy;
+ e->dx = 0;
if (dy)
{
if (dx >= 0)