[Cmake-commits] CMake branch, next, updated. v3.6.1-1499-gc583e88
Brad King
brad.king at kitware.com
Fri Aug 26 10:04:21 EDT 2016
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, next has been updated
via c583e887954417fd07e64061039da5184d35ee69 (commit)
via 1f4aeb1739fb632ab5162a977764b51736728edc (commit)
from 037fa07721e5c990f30e8116d987916d87fddd56 (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=c583e887954417fd07e64061039da5184d35ee69
commit c583e887954417fd07e64061039da5184d35ee69
Merge: 037fa07 1f4aeb1
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Aug 26 10:04:20 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Aug 26 10:04:20 2016 -0400
Merge topic 'vs-NsightTegra-empty-version' into next
1f4aeb17 VS: Fix out-of-bounds write on empty Nsight Tegra version
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f4aeb1739fb632ab5162a977764b51736728edc
commit 1f4aeb1739fb632ab5162a977764b51736728edc
Author: Fujii Hironori <Hironori.Fujii at sony.com>
AuthorDate: Fri Aug 26 15:28:48 2016 +0900
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Aug 26 10:01:39 2016 -0400
VS: Fix out-of-bounds write on empty Nsight Tegra version
In cmVisualStudio10TargetGenerator::cmVisualStudio10TargetGenerator,
wrote 0 to this->NsightTegraVersion[-1] if sscanf returns -1 which is
the case of GetNsightTegraVersion is empty.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index fb05976..009f9a2 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -183,13 +183,12 @@ cmVisualStudio10TargetGenerator::cmVisualStudio10TargetGenerator(
this->GUID = this->GlobalGenerator->GetGUID(this->Name.c_str());
this->Platform = gg->GetPlatformName();
this->NsightTegra = gg->IsNsightTegra();
- for (int i =
- sscanf(gg->GetNsightTegraVersion().c_str(), "%u.%u.%u.%u",
- &this->NsightTegraVersion[0], &this->NsightTegraVersion[1],
- &this->NsightTegraVersion[2], &this->NsightTegraVersion[3]);
- i < 4; ++i) {
+ for (int i = 0; i < 4; ++i) {
this->NsightTegraVersion[i] = 0;
}
+ sscanf(gg->GetNsightTegraVersion().c_str(), "%u.%u.%u.%u",
+ &this->NsightTegraVersion[0], &this->NsightTegraVersion[1],
+ &this->NsightTegraVersion[2], &this->NsightTegraVersion[3]);
this->MSTools = !this->NsightTegra;
this->TargetCompileAsWinRT = false;
this->BuildFileStream = 0;
-----------------------------------------------------------------------
Summary of changes:
Source/cmVisualStudio10TargetGenerator.cxx | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list