[Cmake-commits] CMake branch, master, updated. v3.11.0-rc4-344-g9dd7776
Kitware Robot
kwrobot at kitware.com
Wed Mar 28 07:25:06 EDT 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 9dd7776cd9b34d2bcfa7740ebd4f23f09ed434ca (commit)
via 27f033550a3693df67a30ce94f3c5e60a7a337ec (commit)
via 75e8af3354c42ce42abb4bece351fe1a8b99d96a (commit)
from cf39c14f46d2e7fc1302a6ec026e3b0efafecf9b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9dd7776cd9b34d2bcfa7740ebd4f23f09ed434ca
commit 9dd7776cd9b34d2bcfa7740ebd4f23f09ed434ca
Merge: cf39c14 27f0335
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Mar 28 11:23:14 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Mar 28 07:23:47 2018 -0400
Merge topic 'ctest_update-memory-problems'
27f033550a ctest_update: Fix crash when handling svn externals
75e8af3354 cmSystemTools: Fix ParseArguments out-of-bounds read
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1893
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27f033550a3693df67a30ce94f3c5e60a7a337ec
commit 27f033550a3693df67a30ce94f3c5e60a7a337ec
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Mar 27 08:41:09 2018 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Mar 27 08:46:20 2018 -0400
ctest_update: Fix crash when handling svn externals
Refactoring in commit v3.9.0-rc1~156^2 (c++: prefer vectors over lists,
2017-05-04) switched `cmCTestSVN::Repositories` from `std::list` to
`std::vector`. This can cause re-allocation when svn externals are
processed and break the `RootInfo` pointer that is supposed to point at
the first repository element. Switch back to `std::list` so that the
address remains stable.
Fixes: #17854
diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index dbc7fde..a467ede 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -8,6 +8,7 @@
#include "cmCTestGlobalVC.h"
#include <iosfwd>
+#include <list>
#include <string>
#include <vector>
@@ -70,7 +71,8 @@ private:
friend struct Revision;
// Info of all the repositories (root, externals and nested ones).
- std::vector<SVNInfo> Repositories;
+ // Use std::list so the elements don't move in memory.
+ std::list<SVNInfo> Repositories;
// Pointer to the infos of the root repository.
SVNInfo* RootInfo;
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75e8af3354c42ce42abb4bece351fe1a8b99d96a
commit 75e8af3354c42ce42abb4bece351fe1a8b99d96a
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Mar 27 08:18:47 2018 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Mar 27 08:46:20 2018 -0400
cmSystemTools: Fix ParseArguments out-of-bounds read
When checking for a Windows-style leading path, do not read past the
null terminator.
Issue: #17854
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 88cfe81..eeb73c3 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -550,12 +550,13 @@ std::vector<std::string> cmSystemTools::ParseArguments(const char* command)
bool win_path = false;
- if ((command[0] != '/' && command[1] == ':' && command[2] == '\\') ||
- (command[0] == '\"' && command[1] != '/' && command[2] == ':' &&
- command[3] == '\\') ||
- (command[0] == '\'' && command[1] != '/' && command[2] == ':' &&
- command[3] == '\\') ||
- (command[0] == '\\' && command[1] == '\\')) {
+ if (command[0] && command[1] &&
+ ((command[0] != '/' && command[1] == ':' && command[2] == '\\') ||
+ (command[0] == '\"' && command[1] != '/' && command[2] == ':' &&
+ command[3] == '\\') ||
+ (command[0] == '\'' && command[1] != '/' && command[2] == ':' &&
+ command[3] == '\\') ||
+ (command[0] == '\\' && command[1] == '\\'))) {
win_path = true;
}
// Split the command into an argv array.
-----------------------------------------------------------------------
Summary of changes:
Source/CTest/cmCTestSVN.h | 4 +++-
Source/cmSystemTools.cxx | 13 +++++++------
2 files changed, 10 insertions(+), 7 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list