diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-06-15 22:24:14 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-06-15 22:24:14 +0200 |
commit | ef055a22a6ad0c28f57dc9f783124b51903f3106 (patch) | |
tree | 494333834f986dc81dedf89cb8913d71e5f35367 /draw | |
parent | 190d8160d75410bb3a20c559cc319edc6253613a (diff) | |
download | mupdf-ef055a22a6ad0c28f57dc9f783124b51903f3106.tar.xz |
Don't process paths with missing moveto.
Diffstat (limited to 'draw')
-rw-r--r-- | draw/pathstroke.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/draw/pathstroke.c b/draw/pathstroke.c index 94d986db..aafa4694 100644 --- a/draw/pathstroke.c +++ b/draw/pathstroke.c @@ -409,7 +409,10 @@ fz_strokepath(fz_gel *gel, fz_path *path, fz_strokestate *stroke, fz_matrix ctm, i = 0; if (path->len > 0 && path->els[0].k != FZ_MOVETO) + { fz_warn("assert: path must begin with moveto"); + return; + } p0.x = p0.y = 0; @@ -599,7 +602,10 @@ fz_dashpath(fz_gel *gel, fz_path *path, fz_strokestate *stroke, fz_matrix ctm, f i = 0; if (path->len > 0 && path->els[0].k != FZ_MOVETO) + { fz_warn("assert: path must begin with moveto"); + return; + } p0.x = p0.y = 0; |