The following issues were found
src/third_party/boost/boost/iostreams/stream_buffer.hpp
1 issues
Line: 106
Column: 24
CWE codes:
362
boost::throw_exception(
BOOST_IOSTREAMS_FAILURE("already open")
);
base_type::open(t BOOST_IOSTREAMS_PUSH_ARGS());
}
};
} } // End namespaces iostreams, boost.
Reported by FlawFinder.
src/third_party/boost/boost/iostreams/stream.hpp
1 issues
Line: 159
Column: 22
CWE codes:
362
void open_impl(const Device& dev BOOST_IOSTREAMS_PUSH_PARAMS()) // For forwarding.
{
this->clear();
this->member.open(dev BOOST_IOSTREAMS_PUSH_ARGS());
}
};
#if defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
# pragma warning(pop)
Reported by FlawFinder.
src/third_party/boost/boost/iostreams/skip.hpp
1 issues
Line: 63
Column: 31
CWE codes:
120
20
char_type c;
for (stream_offset z = 0; z < off; ) {
std::streamsize amt;
if ((amt = iostreams::read(flt, dev, &c, 1)) == -1)
boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad skip offset"));
if (amt == 1)
++z;
}
}
Reported by FlawFinder.
src/third_party/boost/boost/iostreams/invert.hpp
1 issues
Line: 76
Column: 21
CWE codes:
120
20
{ }
template<typename Source>
std::streamsize read(Source& src, char_type* s, std::streamsize n)
{
typedef detail::counted_array_sink<char_type> array_sink;
typedef composite<filter_ref, array_sink> filtered_array_sink;
BOOST_ASSERT((flags() & f_write) == 0);
Reported by FlawFinder.
src/third_party/boost/boost/iostreams/filter/line.hpp
1 issues
Line: 67
Column: 21
CWE codes:
120
20
virtual ~basic_line_filter() { }
template<typename Source>
std::streamsize read(Source& src, char_type* s, std::streamsize n)
{
using namespace std;
BOOST_ASSERT(!(flags_ & f_write));
flags_ |= f_read;
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/jit/none/AtomicOperations-feeling-lucky.h
1 issues
Line: 406
Column: 7
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
{
MOZ_ASSERT(!((char*)dest <= (char*)src && (char*)src < (char*)dest+nbytes));
MOZ_ASSERT(!((char*)src <= (char*)dest && (char*)dest < (char*)src+nbytes));
::memcpy(dest, src, nbytes);
}
inline void
js::jit::AtomicOperations::memmoveSafeWhenRacy(void* dest, const void* src, size_t nbytes)
{
Reported by FlawFinder.
src/third_party/boost/boost/iostreams/detail/optional.hpp
1 issues
Line: 35
Column: 9
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
// Borland ICEs if unnamed unions are used for this!
union dummy_u
{
char data[ sizeof(T) ];
BOOST_DEDUCED_TYPENAME type_with_alignment<
::boost::alignment_of<T>::value >::type aligner_;
} dummy_ ;
public:
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/jit/shared/IonAssemblerBuffer.h
1 issues
Line: 141
Column: 13
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
void putBytes(size_t numBytes, const void* source) {
MOZ_ASSERT(bytelength_ + numBytes <= SliceSize);
if (source)
memcpy(&instructions[length()], source, numBytes);
bytelength_ += numBytes;
}
MOZ_ALWAYS_INLINE
void putU32Aligned(uint32_t value) {
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h
1 issues
Line: 1124
Column: 13
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
// The pools should have all been flushed, check.
MOZ_ASSERT(pool_.numEntries() == 0);
for (Slice* cur = getHead(); cur != nullptr; cur = cur->getNext()) {
memcpy(dest, &cur->instructions[0], cur->length());
dest += cur->length();
}
}
bool appendRawCode(const uint8_t* code, size_t numBytes) {
Reported by FlawFinder.
src/third_party/boost/boost/iostreams/detail/counted_array.hpp
1 issues
Line: 28
Column: 21
CWE codes:
120
20
counted_array_source(const Ch* buf, std::streamsize size)
: buf_(buf), ptr_(0), end_(size)
{ }
std::streamsize read(Ch* s, std::streamsize n)
{
using namespace std;
streamsize result = (std::min)(n, end_ - ptr_);
char_traits<char_type>::copy(
s,
Reported by FlawFinder.