The following issues were found
src/third_party/boost/boost/multiprecision/cpp_int/comparison.hpp
2 issues
Line: 29
Column: 78
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
bool>::type
eval_eq(const cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& a, const cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& b) noexcept
{
return (a.sign() == b.sign()) && (a.size() == b.size()) && std_constexpr::equal(a.limbs(), a.limbs() + a.size(), b.limbs());
}
template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value,
bool>::type
Reported by FlawFinder.
Line: 37
Column: 78
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
bool>::type
eval_eq(const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a, const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& b) noexcept
{
return (a.sign() == b.sign()) && (a.size() == b.size()) && std_constexpr::equal(a.limbs(), a.limbs() + a.size(), b.limbs());
}
template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
BOOST_MP_FORCEINLINE BOOST_MP_CXX14_CONSTEXPR typename std::enable_if<
!is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, signed_magnitude, Checked, Allocator> >::value,
bool>::type
Reported by FlawFinder.
src/third_party/boost/boost/spirit/home/classic/meta/as_parser.hpp
2 issues
Line: 104
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
struct as_parser<wchar_t[N]> : impl::wstring_as_parser {};
template<int N>
struct as_parser<char const[N]> : impl::string_as_parser {};
template<int N>
struct as_parser<wchar_t const[N]> : impl::wstring_as_parser {};
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
Reported by FlawFinder.
Line: 107
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
struct as_parser<char const[N]> : impl::string_as_parser {};
template<int N>
struct as_parser<wchar_t const[N]> : impl::wstring_as_parser {};
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
}} // namespace BOOST_SPIRIT_CLASSIC_NS
Reported by FlawFinder.
src/third_party/boost/boost/regex/v4/states.hpp
2 issues
Line: 225
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: 241
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.
src/third_party/boost/boost/spirit/home/support/attributes.hpp
2 issues
Line: 82
Column: 26
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
mpl::and_<
fusion::traits::is_sequence<T>,
fusion::traits::is_sequence<Expected>,
mpl::equal<T, Expected, is_substitute<mpl::_1, mpl::_2> >
>
>::type>
: mpl::true_ {};
template <typename T, typename Expected>
Reported by FlawFinder.
Line: 169
Column: 26
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
mpl::and_<
fusion::traits::is_sequence<T>
, fusion::traits::is_sequence<Expected>
, mpl::equal<T, Expected, is_weak_substitute<mpl::_1, mpl::_2> > >
>::type>
: mpl::true_ {};
// If this is not defined, the main template definition above will return
// true if T is convertible to the first type in a fusion::vector. We
Reported by FlawFinder.
src/third_party/icu4c-57.1/source/common/filteredbrk.cpp
2 issues
Line: 31
Column: 3
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 FB_DEBUG
#include <stdio.h>
static void _fb_trace(const char *m, const UnicodeString *s, UBool b, int32_t d, const char *f, int l) {
char buf[2048];
if(s) {
s->extract(0,s->length(),buf,2048);
} else {
strcpy(buf,"NULL");
}
Reported by FlawFinder.
Line: 35
Column: 5
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
if(s) {
s->extract(0,s->length(),buf,2048);
} else {
strcpy(buf,"NULL");
}
fprintf(stderr,"%s:%d: %s. s='%s'(%p), b=%c, d=%d\n",
f, l, m, buf, (const void*)s, b?'T':'F',(int)d);
}
Reported by FlawFinder.
src/third_party/mozjs-60/extract/js/src/devtools/rootAnalysis/t/sixgill-tree/source.cpp
2 issues
Line: 48
Column: 40
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
void js_GC() {}
void root_arg(JSObject *obj, JSObject *random)
{
// Use all these types so they get included in the output.
SpecialObject so;
UnrootedPointer up;
Bogon b;
Reported by FlawFinder.
Line: 58
Column: 9
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
Rooted<JSObject*> ro;
Rooted<SpecialObject*> rso;
obj = random;
JSObject *other1 = obj;
js_GC();
float MARKER1 = 0;
Reported by FlawFinder.
src/third_party/icu4c-57.1/source/common/locdispnames.cpp
2 issues
Line: 355
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
UDisplayNameGetter *getter,
const char *tag,
UErrorCode *pErrorCode) {
char localeBuffer[ULOC_FULLNAME_CAPACITY*4];
int32_t length;
UErrorCode localStatus;
const char* root = NULL;
/* argument checking */
Reported by FlawFinder.
Line: 805
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
UErrorCode* status){
char keywordValue[ULOC_FULLNAME_CAPACITY*4];
int32_t capacity = ULOC_FULLNAME_CAPACITY*4;
int32_t keywordValueLen =0;
/* argument checking */
if(status==NULL || U_FAILURE(*status)) {
Reported by FlawFinder.
src/third_party/icu4c-57.1/source/common/locdspnm.cpp
2 issues
Line: 562
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
UBool hasVariant = uprv_strlen(variant) > 0;
if (dialectHandling == ULDN_DIALECT_NAMES) {
char buffer[ULOC_FULLNAME_CAPACITY];
do { // loop construct is so we can break early out of search
if (hasScript && hasCountry) {
ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", script, "_", country, (char *)0);
localeIdName(buffer, resultName);
if (!resultName.isBogus()) {
Reported by FlawFinder.
Line: 614
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
LocalPointer<StringEnumeration> e(locale.createKeywords(status));
if (e.isValid() && U_SUCCESS(status)) {
UnicodeString temp2;
char value[ULOC_KEYWORD_AND_VALUES_CAPACITY]; // sigh, no ULOC_VALUE_CAPACITY
const char* key;
while ((key = e->next((int32_t *)0, status)) != NULL) {
locale.getKeywordValue(key, value, ULOC_KEYWORD_AND_VALUES_CAPACITY, status);
if (U_FAILURE(status)) {
return result;
Reported by FlawFinder.
src/third_party/boost/boost/multi_index/detail/safe_mode.hpp
2 issues
Line: 530
Column: 38
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
* facility for use by adaptor classes.
*/
friend class boost::serialization::access;
BOOST_SERIALIZATION_SPLIT_MEMBER()
template<class Archive>
void save(Archive& ar,const unsigned int version)const
Reported by FlawFinder.
Line: 478
Column: 8
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 *(this->base_reference());
}
bool equal(const safe_iterator& x)const
{
BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(*this);
BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(x);
BOOST_MULTI_INDEX_CHECK_SAME_OWNER(*this,x);
return this->base_reference()==x.base_reference();
Reported by FlawFinder.
src/third_party/boost/boost/thread/futures/future_error_code.hpp
2 issues
Line: 29
Column: 13
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
}
BOOST_SCOPED_ENUM_DECLARE_END(future_errc)
namespace system
{
template <>
struct BOOST_SYMBOL_VISIBLE is_error_code_enum< ::boost::future_errc> : public true_type {};
#ifdef BOOST_NO_CXX11_SCOPED_ENUMS
Reported by FlawFinder.
Line: 43
Column: 13
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
BOOST_THREAD_DECL
const system::error_category& future_category() BOOST_NOEXCEPT;
namespace system
{
inline
error_code
make_error_code(future_errc e) BOOST_NOEXCEPT
{
Reported by FlawFinder.