From 9dc5030525ae791ca66ca31b09bc60bb1f9acf00 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Wed, 15 Oct 2025 13:05:11 +0200 Subject: [PATCH] Prevent TSVG::Text crash when wrong font id specified Font outside 1..15 range not exists in SVG and does not supported --- graf2d/postscript/src/TSVG.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graf2d/postscript/src/TSVG.cxx b/graf2d/postscript/src/TSVG.cxx index 0e742c6334609..20cb5c339d63c 100644 --- a/graf2d/postscript/src/TSVG.cxx +++ b/graf2d/postscript/src/TSVG.cxx @@ -1793,7 +1793,8 @@ void TSVG::Text(Double_t xx, Double_t yy, const char *chars) Float_t ftsize; Int_t font = abs(fTextFont)/10; - if (font > 42 || font < 1) font = 1; + if (font > 15 || font < 1) + font = 1; if (wh < hh) { ftsize = fTextSize*fXsize*gPad->GetAbsWNDC(); } else {