From 7e8c8917a83cb0e7e48d5af2f3886e0a5256adb5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 7 Jan 2021 18:06:08 -0800 Subject: [PATCH] cairo-fsm: Tolerate negative "space" argument to xr_fsm_draw_slice(). Fixes infinite loop converting the .spv file attached to bug #59837 to a PDF file. --- src/output/cairo-fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output/cairo-fsm.c b/src/output/cairo-fsm.c index df8df7e68f..1671edac4f 100644 --- a/src/output/cairo-fsm.c +++ b/src/output/cairo-fsm.c @@ -1250,7 +1250,7 @@ xr_fsm_draw_slice (struct xr_fsm *fsm, cairo_t *cr, int space) { assert (fsm->print); - if (fsm->done) + if (fsm->done || space <= 0) return 0; cairo_save (cr); -- 2.30.2