summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xps/xpspath.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xps/xpspath.c b/xps/xpspath.c
index 0cde88dbc..091ea71e1 100644
--- a/xps/xpspath.c
+++ b/xps/xpspath.c
@@ -256,7 +256,7 @@ xps_parse_abbreviated_geometry(xps_context_t *ctx, char *geom)
256 float smooth_x, smooth_y; /* saved cubic bezier control point for smooth curves */ 256 float smooth_x, smooth_y; /* saved cubic bezier control point for smooth curves */
257 int reset_smooth; 257 int reset_smooth;
258 258
259 args = xps_alloc(ctx, sizeof(char*) * (strlen(geom) + 2)); 259 args = xps_alloc(ctx, sizeof(char*) * (strlen(geom) + 1));
260 if (!args) { 260 if (!args) {
261 gs_throw(gs_error_VMerror, "out of memory: args.\n"); 261 gs_throw(gs_error_VMerror, "out of memory: args.\n");
262 return; 262 return;
@@ -284,8 +284,7 @@ xps_parse_abbreviated_geometry(xps_context_t *ctx, char *geom)
284 } 284 }
285 } 285 }
286 286
287 pargs[0] = s; 287 *pargs = s;
288 pargs[1] = 0;
289 288
290 n = pargs - args; 289 n = pargs - args;
291 i = 0; 290 i = 0;