The following issues were found
src/third_party/mozjs-60/extract/js/src/vm/UbiNodeShortestPaths.cpp
1 issues
Line: 18
namespace JS {
namespace ubi {
JS_PUBLIC_API(BackEdge::Ptr)
BackEdge::clone() const
{
BackEdge::Ptr clone(js_new<BackEdge>());
if (!clone)
return nullptr;
Reported by Cppcheck.
src/third_party/mozjs-60/extract/js/src/vm/UnboxedObject.cpp
1 issues
Line: 597
gc::AutoSuppressGC suppress(cx);
Vector<jsid> ids(cx);
for (Shape::Range<NoGC> r(expando->lastProperty()); !r.empty(); r.popFront()) {
if (!ids.append(r.front().propid()))
return nullptr;
}
for (size_t i = 0; i < expando->getDenseInitializedLength(); i++) {
if (!expando->getDenseElement(i).isMagic(JS_ELEMENTS_HOLE)) {
Reported by Cppcheck.
src/third_party/mozjs-60/extract/js/src/vm/Xdr.cpp
1 issues
Line: 75
Column: 34
CWE codes:
120
20
return fail(JS::TranscodeResult_Throw);
mozilla::NativeEndian::copyAndSwapToLittleEndian(ptr, chars, nchars);
} else {
const uint8_t* ptr = buf.read(nbytes);
if (!ptr)
return fail(JS::TranscodeResult_Failure_BadDecode);
mozilla::NativeEndian::copyAndSwapFromLittleEndian(chars, ptr, nchars);
}
return true;
Reported by FlawFinder.
src/third_party/boost/boost/interprocess/detail/mpl.hpp
1 issues
Line: 52
Column: 4
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
typedef char yes_type;
struct no_type
{
char padding[8];
};
template <bool B, class T = void>
struct enable_if_c {
typedef T type;
Reported by FlawFinder.
src/third_party/boost/boost/interprocess/detail/intermodule_singleton_common.hpp
1 issues
Line: 293
Column: 16
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
//Raw memory to construct the global map manager
static union mem_holder_t
{
unsigned char map_mem [sizeof(ThreadSafeGlobalMap)];
::boost::container::dtl::max_align_t aligner;
} mem_holder;
};
template<class ThreadSafeGlobalMap>
Reported by FlawFinder.
src/third_party/boost/boost/integer/common_factor_rt.hpp
1 issues
Line: 120
Column: 10
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 unlikely_size
{
char buf[9973];
};
unlikely_size operator <<= (any_convert, any_convert);
unlikely_size operator >>= (any_convert, any_convert);
Reported by FlawFinder.
src/third_party/boost/boost/generator_iterator.hpp
1 issues
Line: 53
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
return m_value;
}
bool equal(generator_iterator const& y) const
{
return this->m_g == y.m_g && this->m_value == y.m_value;
}
private:
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/wasm/WasmBinaryToAST.cpp
1 issues
Line: 1937
Column: 18
CWE codes:
126
static bool
ToAstName(AstDecodeContext& c, const char* name, AstName* out)
{
size_t len = strlen(name);
char16_t* buffer = static_cast<char16_t *>(c.lifo.alloc(len * sizeof(char16_t)));
if (!buffer)
return false;
for (size_t i = 0; i < len; i++)
Reported by FlawFinder.
src/third_party/boost/boost/fusion/adapted/struct/detail/value_of_impl.hpp
1 issues
Line: 21
Column: 13
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
{
template <typename It>
struct apply
: access::struct_member<
typename remove_const<typename It::seq_type>::type
, It::index::value
>
{};
};
Reported by FlawFinder.
src/third_party/boost/boost/fusion/adapted/struct/detail/value_at_impl.hpp
1 issues
Line: 23
Column: 13
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
{
template <typename Seq, typename N>
struct apply
: access::struct_member<typename remove_const<Seq>::type, N::value>
{};
};
template <>
struct value_at_impl<assoc_struct_tag>
Reported by FlawFinder.