From 23fd6730fa40a3224beecef199754f53cf2a705f Mon Sep 17 00:00:00 2001 From: Sergey Shambir <sergey.shambir.auto@gmail.com> Date: Mon, 4 Mar 2013 23:36:09 +0400 Subject: [PATCH] Autotools: fixed crash in Debug build Method parseIdentifierBeforeAssign attempts to read null-terminating symbol after end in some cases, it triggers assertion. Change-Id: I1a4bc9ef290d2f09e7f9052f14466bacf957fe7a Reviewed-by: Daniel Teske <daniel.teske@digia.com> --- src/plugins/autotoolsprojectmanager/makefileparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.cpp b/src/plugins/autotoolsprojectmanager/makefileparser.cpp index a6fc4c266d6..760dcb9d903 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparser.cpp +++ b/src/plugins/autotoolsprojectmanager/makefileparser.cpp @@ -421,7 +421,7 @@ QString MakefileParser::parseIdentifierBeforeAssign(const QString &line) QString ret = line.left(end); while (end < line.size() && line[end].isSpace()) ++end; - return (line[end] == QLatin1Char('=')) ? ret : QString(); + return (end < line.size() && line[end] == QLatin1Char('=')) ? ret : QString(); } void MakefileParser::addAllSources() -- GitLab