From 0de08d19769ef3ad33440f76f62693c4ca436c5b Mon Sep 17 00:00:00 2001 From: Benjamin Vedder Date: Wed, 15 Nov 2023 15:52:38 +0100 Subject: [PATCH] Fix crash when opening some logs with bad format --- pages/pageloganalysis.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pages/pageloganalysis.cpp b/pages/pageloganalysis.cpp index 3668e5fc1..1cd5865b0 100644 --- a/pages/pageloganalysis.cpp +++ b/pages/pageloganalysis.cpp @@ -1164,6 +1164,9 @@ void PageLogAnalysis::openLog(QByteArray data) QStringList tokens = in.readLine().split(";"); QVector entry; for (int i = 0;i < tokens.size();i++) { + if (i >= entryLastData.size()) { + break; + } if (!tokens.at(i).isEmpty()) { entryLastData[i] = tokens.at(i).toDouble(); }