From a2cd6e75e2777f41a09f42dce0ef81b7861000b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Lehmann?= <gaetan.lehman@jouy.inra.fr> Date: Tue, 1 Aug 2006 15:16:19 -0400 Subject: [PATCH] BUG: #3563. Segmentation fault with non initialized input or NULL pointers. --- Directory.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Directory.cxx b/Directory.cxx index 3fb4d6d..72b4e35 100644 --- a/Directory.cxx +++ b/Directory.cxx @@ -199,6 +199,11 @@ namespace KWSYS_NAMESPACE bool Directory::Load(const char* name) { this->Clear(); + + if (!name) + { + return 0; + } DIR* dir = opendir(name); if (!dir) -- GitLab