Adding nullptr to std::string
Open
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 340
- PR merge metrics
- No merged PRs in 30d
Description
In https://github.com/boostorg/compute/blob/develop/include/boost/compute/detail/path.hpp#L31 std::getenv can return nullptr. It happens for $HOME in my case and produces a segmentation fault. I don't know the specification for operator+(const char*, const std::string&), but I know that construction of std::string from nullptr is undefined behaviour.
Contributor guide
Assessment
This issue has not been assessed yet.