Subject: [Boost-bugs] [Boost C++ Libraries] #5734: possible handle leak in posix implementation copy_file_api
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-07-26 04:04:07
#5734: possible handle leak in posix implementation copy_file_api
--------------------------------------+-------------------------------------
Reporter: alexey.kutumov@⦠| Owner: bemandawes
Type: Bugs | Status: new
Milestone: Boost 1.48.0 | Component: filesystem
Version: Boost 1.47.0 | Severity: Problem
Keywords: filesystem copy_file |
--------------------------------------+-------------------------------------
There is possible handle leak in POSIX implementation of function
'''copy_file_api'''.
{{{
...
if ((infile = ::open(from_p.c_str(), O_RDONLY))< 0)
{ return false; }
struct stat from_stat;
if (::stat(from_p.c_str(), &from_stat)!= 0)
{ return false; }
...
}}}
if '''::stat''' failed, then function exits without closing '''infile'''
handle.
This problem exists both in '''v3''' and '''v2''' implementations of
filesystem. Also this problem exists in previous releases.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5734> 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:50:07 UTC