MFH: r474979
Fix runtime null pointer dereference (undefined behavior) PR: 229888 Approved by: maintainer Obtained from: https://github.com/boostorg/filesystem/pull/71 Approved by: ports-secteam (runtime fix blanket)
This commit is contained in:
parent
35837d6ce2
commit
86af9fd1e9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q3/; revision=474981
|
@ -2,7 +2,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= boost-libs
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
|
||||
COMMENT= Free portable C++ libraries (without Boost.Python)
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
Fixes a null pointer dereference, patch origin:
|
||||
https://github.com/boostorg/filesystem/pull/71
|
||||
--- libs/filesystem/src/operations.cpp.orig 2018-04-11 13:49:02 UTC
|
||||
+++ libs/filesystem/src/operations.cpp
|
||||
@@ -890,20 +890,20 @@ namespace detail
|
||||
BOOST_FILESYSTEM_DECL
|
||||
void copy(const path& from, const path& to, system::error_code* ec)
|
||||
{
|
||||
- file_status s(symlink_status(from, *ec));
|
||||
+ file_status s(detail::symlink_status(from, ec));
|
||||
if (ec != 0 && *ec) return;
|
||||
|
||||
if(is_symlink(s))
|
||||
{
|
||||
- copy_symlink(from, to, *ec);
|
||||
+ detail::copy_symlink(from, to, ec);
|
||||
}
|
||||
else if(is_directory(s))
|
||||
{
|
||||
- copy_directory(from, to, *ec);
|
||||
+ detail::copy_directory(from, to, ec);
|
||||
}
|
||||
else if(is_regular_file(s))
|
||||
{
|
||||
- copy_file(from, to, fs::copy_option::fail_if_exists, *ec);
|
||||
+ detail::copy_file(from, to, detail::fail_if_exists, ec);
|
||||
}
|
||||
else
|
||||
{
|
Loading…
Reference in New Issue
Block a user