summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2004-08-11 05:25:13 +0000
committerAdam Jackson <ajax@nwnk.net>2004-08-11 05:25:13 +0000
commitc4d56e4e288d4e48b84b021a61638f46e9a45e27 (patch)
tree6e17159d6d705ca9bf6cb315bf348d1405ed8715
parent92487437173f600f208d825f65756d3ad14a4f7e (diff)
downloadxorg-lib-libX11-XORG-6_7_99_2.tar.gz
Bug #372: Prevent a crash in XPolygonRegion when called with a bogus point count. Reported by Andreas Luik.XORG-6_7_99_2
-rw-r--r--src/PolyReg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/PolyReg.c b/src/PolyReg.c
index 66c50c4b..90bec77e 100644
--- a/src/PolyReg.c
+++ b/src/PolyReg.c
@@ -517,6 +517,8 @@ XPolygonRegion(Pts, Count, rule)
}
return(region);
}
+
+ if (Count < 2) return region;
if (! (pETEs = (EdgeTableEntry *)
Xmalloc((unsigned) (sizeof(EdgeTableEntry) * Count))))