Warning, /graphics/krita/3rdparty/ext_qt/0001-Do-not-crash-if-the-foundry-name-is-an-empty-space.patch is written in an unsupported language. File is not indexed.
0001 From 426b95f45b868984290d8d3805ccebee6f29cfac Mon Sep 17 00:00:00 2001 0002 From: Halla Rempt <halla@valdyas.org> 0003 Date: Tue, 7 Sep 2021 14:49:16 +0200 0004 Subject: [PATCH] Do not crash if the foundry name is an empty space 0005 0006 See https://bugs.kde.org/show_bug.cgi?id=430220 0007 --- 0008 src/gui/text/qfontdatabase.cpp | 2 +- 0009 1 file changed, 1 insertion(+), 1 deletion(-) 0010 0011 diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp 0012 index b09891bc..d80cdefe 100644 0013 --- a/src/gui/text/qfontdatabase.cpp 0014 +++ b/src/gui/text/qfontdatabase.cpp 0015 @@ -614,7 +614,7 @@ static void parseFontName(const QString &name, QString &foundry, QString &family 0016 { 0017 int i = name.indexOf(QLatin1Char('[')); 0018 int li = name.lastIndexOf(QLatin1Char(']')); 0019 - if (i >= 0 && li >= 0 && i < li) { 0020 + if (i >= 0 && li >= 0 && i < li && li - i > 1) { 0021 foundry = name.mid(i + 1, li - i - 1); 0022 if (i > 0 && name[i - 1] == QLatin1Char(' ')) 0023 i--; 0024 -- 0025 2.25.1 0026