crash in executor.hpp when env PATH is missing
Open
- Dominant language
- C++
- Stars
- 145
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
version: 1.73.0
source: boost/process/detail/posix/executor.hpp
line: 283
compiler: gcc-8.4.0
target: armv7
machine: rpi2
os: Raspbian GNU/Linux 9.8 (stretch)
debug: qtcreator & gdbserver remote debug
**Cause of crash:**
when not found "PATH="
e != nullptr, but *e == nullptr
**Reproduction method:**
```c++
#include
#include
#include
using namespace std;
int main()
{
auto e = ::environ;
while ((*e != nullptr) && 0 != std::string(*e).find("PATH="))
e++;
if (e != nullptr)
std::cout << std::string(*e) /* crash here */ << std::endl;
return 0;
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.