kf6-syntax-highlighting/syntax-highlighting-5.69.0-arm-qt-regex-crash-workaround.patch

12 lines
660 B
Diff
Raw Normal View History

--- syntax-highlighting-5.69.0/src/indexer/katehighlightingindexer.cpp.orig 2020-04-17 10:21:34.673089819 +0200
+++ syntax-highlighting-5.69.0/src/indexer/katehighlightingindexer.cpp 2020-04-17 10:21:55.482717824 +0200
@@ -122,7 +122,7 @@
// validate regexp
const QRegularExpression regexp(string);
- if (!regexp.isValid()) {
+ if (string.length() < 79 && !regexp.isValid()) {
qWarning() << hlFilename << "line" << xml.lineNumber() << "broken regex:" << string << "problem:" << regexp.errorString() << "at offset" << regexp.patternErrorOffset();
return false;
} else if (string.isEmpty()) {