The following issues were found
src/third_party/boost/boost/xpressive/detail/utility/boyer_moore.hpp
1 issues
Line: 189
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
std::vector<string_type> fold_;
BidiIter (boyer_moore::*const find_fun_)(BidiIter, BidiIter, Traits const &) const;
unsigned char length_;
unsigned char offsets_[UCHAR_MAX + 1];
};
}}} // namespace boost::xpressive::detail
#if defined(_MSC_VER)
Reported by FlawFinder.
src/third_party/boost/boost/xpressive/detail/utility/tracking_ptr.hpp
1 issues
Line: 87
Column: 10
CWE codes:
126
Suggestion:
This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it
this->satisfy_();
}
bool equal(weak_iterator<Derived> const &that) const
{
return this->iter_ == that.iter_;
}
void satisfy_()
Reported by FlawFinder.
src/third_party/boost/boost/regex/v4/perl_matcher_common.hpp
1 issues
Line: 956
Column: 38
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
static_cast<unsigned int>(regbase::restart_continue)
: static_cast<unsigned int>(re.get_restart_type());
const kmp_info<char_type>* info = access::get_kmp(re);
int len = info->len;
const char_type* x = info->pstr;
int j = 0;
while (position != last)
{
Reported by FlawFinder.
src/third_party/boost/libs/atomic/src/lockpool.cpp
1 issues
Line: 74
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
{
lock_type lock;
// The additional padding is needed to avoid false sharing between locks
char padding[PaddingSize];
};
template< >
struct BOOST_ALIGNMENT(BOOST_ATOMIC_CACHE_LINE_SIZE) padded_lock< 0u >
{
Reported by FlawFinder.
src/third_party/boost/libs/filesystem/config/has_bcrypt.cpp
1 issues
Line: 29
Column: 12
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
int main()
{
unsigned char buf[16] = {};
boost::winapi::BCRYPT_ALG_HANDLE_ handle;
boost::winapi::NTSTATUS_ status = boost::winapi::BCryptOpenAlgorithmProvider(&handle, boost::winapi::BCRYPT_RNG_ALGORITHM_, NULL, 0);
status = boost::winapi::BCryptGenRandom(handle, reinterpret_cast<boost::winapi::PUCHAR_>(static_cast<unsigned char*>(buf)), static_cast<boost::winapi::ULONG_>(sizeof(buf)), 0);
boost::winapi::BCryptCloseAlgorithmProvider(handle, 0);
}
Reported by FlawFinder.
src/third_party/boost/boost/regex/v4/basic_regex.hpp
1 issues
Line: 198
Column: 13
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
size_type m_mark_count; // the number of marked sub-expressions
BOOST_REGEX_DETAIL_NS::re_syntax_base* m_first_state; // the first state of the machine
unsigned m_restart_type; // search optimisation type
unsigned char m_startmap[1 << CHAR_BIT]; // which characters can start a match
unsigned int m_can_be_null; // whether we can match a null string
BOOST_REGEX_DETAIL_NS::raw_storage m_data; // the buffer in which our states are constructed
typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character
std::vector<
std::pair<
Reported by FlawFinder.
src/third_party/boost/boost/asio/ssl/error.hpp
1 issues
Line: 83
Column: 11
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
} // namespace boost
namespace boost {
namespace system {
template<> struct is_error_code_enum<boost::asio::error::ssl_errors>
{
static const bool value = true;
};
Reported by FlawFinder.
src/third_party/boost/boost/asio/ssl/detail/write_op.hpp
1 issues
Line: 48
Column: 14
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
boost::system::error_code& ec,
std::size_t& bytes_transferred) const
{
unsigned char storage[
boost::asio::detail::buffer_sequence_adapter<boost::asio::const_buffer,
ConstBufferSequence>::linearisation_storage_size];
boost::asio::const_buffer buffer =
boost::asio::detail::buffer_sequence_adapter<boost::asio::const_buffer,
Reported by FlawFinder.
src/third_party/boost/libs/filesystem/src/windows_file_codecvt.cpp
1 issues
Line: 30
Column: 18
CWE codes:
120
UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
int count;
if ((count = ::MultiByteToWideChar(codepage, MB_PRECOMPOSED, from,
static_cast<int>(from_end - from), to, static_cast<int>(to_end - to))) == 0)
{
return error; // conversion failed
}
Reported by FlawFinder.
src/third_party/boost/boost/regex/config/borland.hpp
1 issues
Line: 67
Column: 8
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
//
#include <cstring>
#undef strcmp
#undef strcpy
#endif
#endif
Reported by FlawFinder.