summaryrefslogtreecommitdiff
path: root/src/cairo-path.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2007-03-05 17:11:39 -0500
committerBehdad Esfahbod <behdad@behdad.org>2007-03-05 17:11:39 -0500
commitd25548d679b8a7fce12c9a55e728539e408c75a1 (patch)
tree2c4b347a5d4b42ad69ebc6503895c7b14507941a /src/cairo-path.c
parent3ab9ca54aa490438dbbfae7b5f1cde0bd98352cd (diff)
downloadcairo-d25548d679b8a7fce12c9a55e728539e408c75a1.tar.gz
In cairo_append_path(), allow excess path_data elements
Diffstat (limited to 'src/cairo-path.c')
-rw-r--r--src/cairo-path.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-path.c b/src/cairo-path.c
index 544abf3fa..7c2374c2a 100644
--- a/src/cairo-path.c
+++ b/src/cairo-path.c
@@ -465,19 +465,19 @@ _cairo_path_append_to_context (const cairo_path_t *path,
p = &path->data[i];
switch (p->header.type) {
case CAIRO_PATH_MOVE_TO:
- if (p->header.length != 2)
+ if (p->header.length < 2)
return CAIRO_STATUS_INVALID_PATH_DATA;
cairo_move_to (cr,
p[1].point.x, p[1].point.y);
break;
case CAIRO_PATH_LINE_TO:
- if (p->header.length != 2)
+ if (p->header.length < 2)
return CAIRO_STATUS_INVALID_PATH_DATA;
cairo_line_to (cr,
p[1].point.x, p[1].point.y);
break;
case CAIRO_PATH_CURVE_TO:
- if (p->header.length != 4)
+ if (p->header.length < 4)
return CAIRO_STATUS_INVALID_PATH_DATA;
cairo_curve_to (cr,
p[1].point.x, p[1].point.y,
@@ -485,7 +485,7 @@ _cairo_path_append_to_context (const cairo_path_t *path,
p[3].point.x, p[3].point.y);
break;
case CAIRO_PATH_CLOSE_PATH:
- if (p->header.length != 1)
+ if (p->header.length < 1)
return CAIRO_STATUS_INVALID_PATH_DATA;
cairo_close_path (cr);
break;