diff options
author | Jake Petroules <jake.petroules@qt.io> | 2016-05-27 11:17:56 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2016-06-08 21:37:57 +0000 |
commit | cafc0ec1e52903b7c252bf296a5098c0c1672dfc (patch) | |
tree | e97a1fdcb641fa36d1294cfd53968948bda879c8 | |
parent | 3070f40fa60ef7479810d77f5d82c57aa96bc136 (diff) | |
download | qttools-cafc0ec1e52903b7c252bf296a5098c0c1672dfc.tar.gz |
Bail out if otool returned unexpected output.
Change-Id: Ieb1d8056bc7326acce5556d29e9032812be72cd5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rw-r--r-- | src/macdeployqt/shared/shared.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp index 5c50efcdc..999342798 100644 --- a/src/macdeployqt/shared/shared.cpp +++ b/src/macdeployqt/shared/shared.cpp @@ -187,6 +187,11 @@ OtoolInfo findDependencyInfo(const QString &binaryPath) QString output = otool.readAllStandardOutput(); QStringList outputLines = output.split("\n", QString::SkipEmptyParts); + if (outputLines.size() < 2) { + LogError() << "Could not parse otool output:" << output; + return info; + } + outputLines.removeFirst(); // remove line containing the binary path if (binaryPath.contains(".framework/") || binaryPath.endsWith(".dylib")) { const auto match = regexp.match(outputLines.first()); |