The following issues were found
src/third_party/boost/boost/type_traits/integral_constant.hpp
2 issues
Line: 62
Column: 23
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
operator const mpl::integral_c<T, val>& ()const
{
static const char data[sizeof(long)] = { 0 };
static const void* pdata = data;
return *(reinterpret_cast<const mpl::integral_c<T, val>*>(pdata));
}
BOOST_CONSTEXPR operator T()const { return val; }
};
Reported by FlawFinder.
Line: 82
Column: 23
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
operator const mpl::bool_<val>& ()const
{
static const char data[sizeof(long)] = { 0 };
static const void* pdata = data;
return *(reinterpret_cast<const mpl::bool_<val>*>(pdata));
}
BOOST_CONSTEXPR operator bool()const { return val; }
};
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/builtin/Stream.h
2 issues
Line: 88
Column: 35
CWE codes:
120
20
class ReadableStreamDefaultReader : public NativeObject
{
public:
static MOZ_MUST_USE JSObject* read(JSContext* cx, Handle<ReadableStreamDefaultReader*> reader);
static bool constructor(JSContext* cx, unsigned argc, Value* vp);
static const ClassSpec classSpec_;
static const Class class_;
static const ClassSpec protoClassSpec_;
Reported by FlawFinder.
Line: 100
Column: 35
CWE codes:
120
20
class ReadableStreamBYOBReader : public NativeObject
{
public:
static MOZ_MUST_USE JSObject* read(JSContext* cx, Handle<ReadableStreamBYOBReader*> reader,
Handle<ArrayBufferViewObject*> view);
static bool constructor(JSContext* cx, unsigned argc, Value* vp);
static const ClassSpec classSpec_;
static const Class class_;
Reported by FlawFinder.
src/third_party/boost/boost/phoenix/stl/container/detail/container.hpp
2 issues
Line: 120
Column: 22
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
///////////////////////////////////////////////////////////////////////////////
namespace stl_impl
{
struct one { char a[1]; };
struct two { char a[2]; };
template <typename C>
one has_mapped_type(typename C::mapped_type(*)());
Reported by FlawFinder.
Line: 121
Column: 22
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
namespace stl_impl
{
struct one { char a[1]; };
struct two { char a[2]; };
template <typename C>
one has_mapped_type(typename C::mapped_type(*)());
template <typename C>
Reported by FlawFinder.
src/third_party/boost/boost/chrono/detail/inlined/mac/thread_clock.hpp
2 issues
Line: 47
Column: 35
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000
+ static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000);
return time_point( user + system );
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
thread_clock::time_point thread_clock::now( system::error_code & ec )
{
Reported by FlawFinder.
Line: 89
Column: 35
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000
+ static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000);
return time_point( user + system );
}
#endif
} }
Reported by FlawFinder.
src/third_party/boost/boost/type_traits/is_polymorphic.hpp
2 issues
Line: 41
Column: 7
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
# if !defined(__GNUC__) // this raises warnings with some classes, and buys nothing with GCC
~d1()throw();
# endif
char padding[256];
private:
// keep some picky compilers happy:
d1(const d1&);
d1& operator=(const d1&);
};
Reported by FlawFinder.
Line: 57
Column: 7
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
struct unique{};
virtual void unique_name_to_boost5487629(unique*);
# endif
char padding[256];
private:
// keep some picky compilers happy:
d2(const d2&);
d2& operator=(const d2&);
};
Reported by FlawFinder.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Platform/mingw.py
2 issues
Line: 30
Column: 1
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
__revision__ = "src/engine/SCons/Platform/mingw.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import sys
MINGW_DEFAULT_PATHS = []
if sys.platform == 'win32':
Reported by Pylint.
Line: 39
Column: 1
MINGW_DEFAULT_PATHS = [
r'C:\msys64',
r'C:\msys'
]
Reported by Pylint.
src/third_party/boost/boost/asio/ip/detail/socket_option.hpp
2 issues
Line: 404
Column: 7
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
using namespace std; // For memcpy.
address_v6 ipv6_address = multicast_address.to_v6();
address_v6::bytes_type bytes = ipv6_address.to_bytes();
memcpy(ipv6_value_.ipv6mr_multiaddr.s6_addr, bytes.data(), 16);
ipv6_value_.ipv6mr_interface = ipv6_address.scope_id();
}
else
{
ipv4_value_.imr_multiaddr.s_addr =
Reported by FlawFinder.
Line: 439
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
{
using namespace std; // For memcpy.
address_v6::bytes_type bytes = multicast_address.to_bytes();
memcpy(ipv6_value_.ipv6mr_multiaddr.s6_addr, bytes.data(), 16);
if (network_interface)
ipv6_value_.ipv6mr_interface = network_interface;
else
ipv6_value_.ipv6mr_interface = multicast_address.scope_id();
}
Reported by FlawFinder.
src/third_party/icu4c-57.1/source/common/bytestriebuilder.cpp
2 issues
Line: 429
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
if(0<=i && i<=BytesTrie::kMaxOneByteValue) {
return write(((BytesTrie::kMinOneByteValueLead+i)<<1)|isFinal);
}
char intBytes[5];
int32_t length=1;
if(i<0 || i>0xffffff) {
intBytes[0]=(char)BytesTrie::kFiveByteValueLead;
intBytes[1]=(char)((uint32_t)i>>24);
intBytes[2]=(char)((uint32_t)i>>16);
Reported by FlawFinder.
Line: 475
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
if(i<=BytesTrie::kMaxOneByteDelta) {
return write(i);
}
char intBytes[5];
int32_t length;
if(i<=BytesTrie::kMaxTwoByteDelta) {
intBytes[0]=(char)(BytesTrie::kMinTwoByteDeltaLead+(i>>8));
length=1;
} else {
Reported by FlawFinder.
src/third_party/icu4c-57.1/source/common/cmemory.h
2 issues
Line: 50
Column: 30
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
#define uprv_memcpy(dst, src, size) ( \
uprv_checkValidMemory(src, 1), \
U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size))
#define uprv_memmove(dst, src, size) ( \
uprv_checkValidMemory(src, 1), \
U_STANDARD_CPP_NAMESPACE memmove(dst, src, size))
#else
Reported by FlawFinder.
Line: 57
Column: 62
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
#else
#define uprv_memcpy(dst, src, size) U_STANDARD_CPP_NAMESPACE memcpy(dst, src, size)
#define uprv_memmove(dst, src, size) U_STANDARD_CPP_NAMESPACE memmove(dst, src, size)
#endif /* U_DEBUG */
/**
Reported by FlawFinder.
src/third_party/boost/boost/regex/v5/states.hpp
2 issues
Line: 214
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
***********************************************************************/
struct re_set : public re_syntax_base
{
unsigned char _map[1 << CHAR_BIT];
};
/*** struct re_jump ***************************************************
Jump to a new location in the machine (not next).
***********************************************************************/
Reported by FlawFinder.
Line: 230
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
***********************************************************************/
struct re_alt : public re_jump
{
unsigned char _map[1 << CHAR_BIT]; // which characters can take the jump
unsigned int can_be_null; // true if we match a NULL string
};
/*** struct re_repeat *************************************************
Repeat a section of the machine
Reported by FlawFinder.