[Cmake-commits] CMake branch, next, updated. v3.1.1-2331-g9dfe97f
Brad King
brad.king at kitware.com
Mon Jan 26 10:07:26 EST 2015
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 9dfe97f83ff4472e34e161d978efcfba7ed793a2 (commit)
via 482c84759fb6df983d519ca2ac61e3c92c0ae7e3 (commit)
from dbb73396e7c7172ae58e42dd9840cf7f89f35da4 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9dfe97f83ff4472e34e161d978efcfba7ed793a2
commit 9dfe97f83ff4472e34e161d978efcfba7ed793a2
Merge: dbb7339 482c847
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 26 10:07:25 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 26 10:07:25 2015 -0500
Merge topic 'backport-kwsys-directory-check-opendir' into next
482c8475 KWSys Directory: Check opendir return value before using it (#15367)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=482c84759fb6df983d519ca2ac61e3c92c0ae7e3
commit 482c84759fb6df983d519ca2ac61e3c92c0ae7e3
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Jan 23 13:14:01 2015 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Jan 23 13:19:07 2015 -0500
KWSys Directory: Check opendir return value before using it (#15367)
In Directory::GetNumberOfFilesInDirectory add a missing check for NULL.
diff --git a/Source/kwsys/Directory.cxx b/Source/kwsys/Directory.cxx
index 741bcba..7041f7b 100644
--- a/Source/kwsys/Directory.cxx
+++ b/Source/kwsys/Directory.cxx
@@ -239,6 +239,11 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const kwsys_stl::string& na
{
DIR* dir = opendir(name.c_str());
+ if (!dir)
+ {
+ return 0;
+ }
+
unsigned long count = 0;
for (dirent* d = readdir(dir); d; d = readdir(dir) )
{
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list