diff options
author | Adam Jackson <ajax@nwnk.net> | 2004-08-11 05:25:13 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2004-08-11 05:25:13 +0000 |
commit | c4d56e4e288d4e48b84b021a61638f46e9a45e27 (patch) | |
tree | 6e17159d6d705ca9bf6cb315bf348d1405ed8715 | |
parent | 92487437173f600f208d825f65756d3ad14a4f7e (diff) |
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.c | 2 |
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)))) |