[Boost-bugs] [Boost C++ Libraries] #2106: oversight in "boost::filesystem::path::operator /"

Subject: [Boost-bugs] [Boost C++ Libraries] #2106: oversight in "boost::filesystem::path::operator /"
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-07-11 07:39:42

#2106: oversight in "boost::filesystem::path::operator /"
 Reporter: rtomov_at_[hidden] | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: | Component: filesystem
  Version: Boost 1.35.0 | Severity: Problem
 Keywords: |
 Using "boost::filesystem::path::operator /" with "const char*" or "const
 string&" as parameter is dangerous because the temporary object of type
 "path" is create but without control of the name's checking parameter. For
 example: you can write this code
 "string filePath = (fs::path(pathName, fs::no_check) /
 fileName).string();" and expect both "pathName" and "fileName" not to be
 checked against rules.
 In fact only "pathName" will not be checked but "fileName" will be checked
 with default checker. Thus you will receive, unexpected and unhandled,
 "boost::filesystem::filesystem_error" exception.

Ticket URL: <http://svn.boost.org/trac/boost/ticket/2106>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:58 UTC