From 0e236d5c71c7b852dde7527846fca146a1b9f188 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 1 Jun 2023 11:08:56 +0200 Subject: [PATCH] Avoid stack overflow in CreateDirectoriesRecursively Fixes #4262 --- googletest/src/gtest-filepath.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/src/gtest-filepath.cc b/googletest/src/gtest-filepath.cc index 75f52bcf..177588c1 100644 --- a/googletest/src/gtest-filepath.cc +++ b/googletest/src/gtest-filepath.cc @@ -335,7 +335,7 @@ bool FilePath::CreateDirectoriesRecursively() const { return false; } - if (pathname_.length() == 0 || this->DirectoryExists()) { + if (pathname_.length() == 0 || pathname_ == kCurrentDirectoryString || this->DirectoryExists()) { return true; }