From c65e8835f8ecd0a5361c7e94933e311fc08857bb Mon Sep 17 00:00:00 2001 From: Mira Weller Date: Tue, 8 Sep 2026 14:59:52 +0200 Subject: [PATCH] Fix potential infinite loop in pdf render (Z#23245937 / PRT-021) --- src/pretix/base/pdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/base/pdf.py b/src/pretix/base/pdf.py index a63c8f316c..5e4158df49 100644 --- a/src/pretix/base/pdf.py +++ b/src/pretix/base/pdf.py @@ -1069,7 +1069,7 @@ class Renderer: fontsize = float(o['fontsize']) height = float(o['height']) * mm width = float(o['width']) * mm - while True: + for _i in range(25): # try adapting the font size at most 25 times p, ad, lineheight = self._text_paragraph(op, order, o, override_fontsize=fontsize) w, h = p.wrapOn(canvas, width, 1000 * mm) widths = p.getActualLineWidths0()