The following issues were found
src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid64_quantize.c
1 issues
Line: 135
CWE codes:
758
coefficient_x += bid_round_const_table[rmode][extra_digits];
// get P*(2^M[extra_digits])/10^extra_digits
__mul_64x64_to_128 (CT, coefficient_x,
bid_reciprocals10_64[extra_digits]);
// now get P/10^extra_digits: shift C64 right by M[extra_digits]-128
amount = bid_short_recip_scale[extra_digits];
C64 = CT.w[1] >> amount;
Reported by Cppcheck.
src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
1 issues
Line: 382
Column: 19
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
unsigned int u32_value;
unsigned long u64_value;
fpieee_compare_result_t compare_value;
unsigned char s[256];
} value;
unsigned int operand_valid:1;
BID_fpieee_format_t format:5;
} BID_fpieee_value_t;
Reported by FlawFinder.
src/third_party/IntelRDFPMathLib20U1/TESTS/test_bid_functions.h
1 issues
Line: 376
Column: 19
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
unsigned int u32_value;
unsigned long u64_value;
fpieee_compare_result_t compare_value;
unsigned char s[256];
} value;
unsigned int operand_valid:1;
BID_fpieee_format_t format:5;
} BID_fpieee_value_t;
Reported by FlawFinder.
src/third_party/abseil-cpp-master/abseil-cpp/absl/algorithm/algorithm.h
1 issues
Line: 74
Column: 15
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
std::random_access_iterator_tag,
std::random_access_iterator_tag) {
return (last1 - first1 == last2 - first2) &&
std::equal(first1, last1, first2);
}
template <typename It>
It RotateImpl(It first, It middle, It last, std::true_type) {
return std::rotate(first, middle, last);
Reported by FlawFinder.
src/third_party/abseil-cpp-master/abseil-cpp/absl/algorithm/algorithm_test.cc
1 issues
Line: 37
EXPECT_FALSE(absl::equal(v1.begin(), v1.end(), v4.begin(), v4.end()));
}
TEST(EqualTest, DefaultComparison) {
std::list<int> lst1{1, 2, 3};
std::list<int> lst2 = lst1;
std::list<int> lst3{1, 2};
std::list<int> lst4{1, 2, 4};
Reported by Cppcheck.
src/third_party/abseil-cpp-master/abseil-cpp/absl/algorithm/container_test.cc
1 issues
Line: 69
bool Equals(int v1, int v2) { return v1 == v2; }
bool IsOdd(int x) { return x % 2 != 0; }
TEST_F(NonMutatingTest, Distance) {
EXPECT_EQ(container_.size(), absl::c_distance(container_));
EXPECT_EQ(sequence_.size(), absl::c_distance(sequence_));
EXPECT_EQ(vector_.size(), absl::c_distance(vector_));
EXPECT_EQ(ABSL_ARRAYSIZE(array_), absl::c_distance(array_));
Reported by Cppcheck.
src/third_party/abseil-cpp-master/abseil-cpp/absl/algorithm/equal_benchmark.cc
1 issues
Line: 54
Column: 28
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
std::vector<T> xs(state.range(0), T(0));
std::vector<T> ys = xs;
while (state.KeepRunning()) {
const bool same = std::equal(xs.begin(), xs.end(), ys.begin());
benchmark::DoNotOptimize(same);
}
}
template <typename T>
Reported by FlawFinder.
src/third_party/abseil-cpp-master/abseil-cpp/absl/base/call_once_test.cc
1 issues
Line: 69
return running_thread_count == 10 && call_once_invoke_count == 1;
}
TEST(CallOnceTest, ExecutionCount) {
std::vector<std::thread> threads;
// Start 10 threads all calling call_once on the same once_flag.
for (int i = 0; i < 10; ++i) {
threads.emplace_back(ThreadBody);
Reported by Cppcheck.
src/third_party/abseil-cpp-master/abseil-cpp/absl/base/casts.h
1 issues
Line: 157
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
int>::type = 0>
inline Dest bit_cast(const Source& source) {
Dest dest;
memcpy(static_cast<void*>(std::addressof(dest)),
static_cast<const void*>(std::addressof(source)), sizeof(dest));
return dest;
}
// NOTE: This overload is only picked if the requirements of bit_cast are
Reported by FlawFinder.
src/third_party/abseil-cpp-master/abseil-cpp/absl/base/dynamic_annotations.h
1 issues
Line: 474
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
__sanitizer_annotate_contiguous_container(beg, end, old_mid, new_mid)
#define ABSL_ADDRESS_SANITIZER_REDZONE(name) \
struct { \
char x[8] __attribute__((aligned(8))); \
} name
#else
#define ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(beg, end, old_mid, new_mid) // empty
Reported by FlawFinder.