[Boost-bugs] [Boost C++ Libraries] #5900: Access violation in boost filesystem 3 directory iterator

Subject: [Boost-bugs] [Boost C++ Libraries] #5900: Access violation in boost filesystem 3 directory iterator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-14 11:55:07


#5900: Access violation in boost filesystem 3 directory iterator
-----------------------------------------------------+----------------------
 Reporter: Andreas Eckleder <a.eckleder@…> | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
-----------------------------------------------------+----------------------
 Whenever dir_itr_increment() reports an error (e.g. because an error code
 was returned by FindNextFile() on WIN32), directory_iterator_increment()
 will crash with an access violation when trying to throw a filesystem
 error.

 The access violation is caused by an attempt to read the parent path
 string from it.m_imp immediately after calling it.m_imp.reset().

 Please find a patch against boost 1.47.0 attached to this ticket. It fixes
 the issue without any side-effects by storing the parent path locally
 before calling it.m_imp.reset().

 The issue is hard to reproduce as essentially a defective file-system is
 required to see its effect. However, I think it should be sufficiently
 clear from the patch what's going on. I ran across this when trying to
 read from an optical disc with a defective UDF file-system.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5900>
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