mirror of
https://github.com/boostorg/filesystem.git
synced 2026-01-27 06:52:09 +00:00
ed5f5aa0804a30ff19db0d774f42016a22a4cf9a
The current_path() and read_symlink() algorithms had the potential to cause memory exhaustion as they were looping trying to allocate exponentially larger buffers without limit. Now the common limit is defined to 16MiB, the library will not accept larger paths from the system calls. This is mostly a precaution against broken or maliciously tampered with filesystems. Also, the functions will start with a larger stack-based buffer to avoid dynamic memory allocation at all in the best case scenario. Also, increased the size of the buffer used by copy_file(). Corrected errno uses in a few places and made sure errno is read before it could be modified by any system calls made by the error handling machinery.
Clean up some tutorial example code and fix the wording for it in the tutorial. Thanks to Anmol-Singh-Jaggi for pull request #11.
Boost.Filesystem
Boost.Filesystem, part of collection of the Boost C++ Libraries, provides facilities to manipulate files and directories, and the paths that identify them.
Directories
- doc - Documentation sources
- include - Interface headers of Boost.Filesystem
- src - Compilable source files of Boost.Filesystem
- test - Boost.Filesystem unit tests
- example - Boost.Filesystem usage examples
More information
- Documentation
- Report bugs. Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
- Submit your patches as pull requests against develop branch. Note that by submitting patches you agree to license your modifications under the Boost Software License, Version 1.0.
Build status
License
Distributed under the Boost Software License, Version 1.0.
Description
Languages
C++
98.4%
CMake
1.5%