diff options
author | Robin Watts <robin.watts@artifex.com> | 2015-09-28 17:05:38 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2015-09-30 17:35:43 +0100 |
commit | e6a6cccd2295ad09fc569debda49ebcef8b2cd92 (patch) | |
tree | 59fde2c8baa2230f9fa9498b564d73b9669c540a /source | |
parent | 1f15bade3112bfdc8ddbae9c4b06047427c2367f (diff) | |
download | mupdf-e6a6cccd2295ad09fc569debda49ebcef8b2cd92.tar.xz |
Ensure that dots are non-zero sized.
In fz_add_line_dot, if the flatness is too low, we can end
up with dots being 1 dimensional. Ensure that we always
use at least 3 vertexes to approximate a dot.
This was inspired by (but does not fix) bug 696172.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/draw-path.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/fitz/draw-path.c b/source/fitz/draw-path.c index bf7a9022..0d37c0da 100644 --- a/source/fitz/draw-path.c +++ b/source/fitz/draw-path.c @@ -594,6 +594,8 @@ fz_add_line_dot(fz_context *ctx, sctx *s, float ax, float ay) float oy = ay; int i; + if (n < 3) + n = 3; for (i = 1; i < n; i++) { float theta = (float)M_PI * 2 * i / n; |