]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/process/detail/posix/executor.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / process / detail / posix / executor.hpp
index c031689b98c70de5feb321ba07156c07999b6474..5293c9ca59790a3617cb851d6a61a2bebb28f7a1 100644 (file)
@@ -274,10 +274,10 @@ class executor
         if ((prepare_cmd_style_fn.find('/') == std::string::npos) && ::access(prepare_cmd_style_fn.c_str(), X_OK))
         {
             auto e = ::environ;
-            while ((*e != nullptr) && !boost::starts_with(*e, "PATH="))
+            while ((e != nullptr) && (*e != nullptr) && !boost::starts_with(*e, "PATH="))
                 e++;
 
-            if (e != nullptr)
+            if ((e != nullptr) && (*e != nullptr))
             {
                 std::vector<std::string> path;
                 boost::split(path, *e, boost::is_any_of(":"));