From: Ben Pfaff Date: Fri, 8 Jan 2021 02:06:08 +0000 (-0800) Subject: cairo-fsm: Tolerate negative "space" argument to xr_fsm_draw_slice(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e8c8917a83cb0e7e48d5af2f3886e0a5256adb5;p=pspp 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. --- 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);