The following issues were found

src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/string_view.h
1 issues
strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 546 Column: 18 CWE codes: 126

                  // __builtin_strlen is constexpr.
    return __builtin_strlen(str);
#else
    return str ? strlen(str) : 0;
#endif
  }

  static constexpr size_t Min(size_type length_a, size_type length_b) {
    return length_a < length_b ? length_a : length_b;

            

Reported by FlawFinder.

src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/strip_test.cc
1 issues
syntax error
Error

Line: 48

                EXPECT_EQ(input, "");
}

TEST(Strip, ConsumePrefix) {
  absl::string_view input("abcdef");
  EXPECT_FALSE(absl::ConsumePrefix(&input, "abcdefg"));
  EXPECT_EQ(input, "abcdef");

  EXPECT_FALSE(absl::ConsumePrefix(&input, "abce"));

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/substitute.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 184 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

              
 private:
  absl::string_view piece_;
  char scratch_[numbers_internal::kFastToBufferSize];
};

// Internal helper function. Don't call this from outside this implementation.
// This interface may change without notice.
void SubstituteAndAppendArray(std::string* output, absl::string_view format,

            

Reported by FlawFinder.

src/third_party/abseil-cpp-master/abseil-cpp/absl/synchronization/blocking_counter_test.cc
1 issues
syntax error
Error

Line: 34

                counter->DecrementCount();
}

TEST(BlockingCounterTest, BasicFunctionality) {
  // This test verifies that BlockingCounter functions correctly. Starts a
  // number of threads that just sleep for a second and decrement a counter.

  // Initialize the counter.
  const int num_workers = 10;

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/synchronization/notification_test.cc
1 issues
syntax error
Error

Line: 126

                EXPECT_EQ(kNumThreads, done_counter.Get());
}

TEST(NotificationTest, SanityTest) {
  Notification local_notification1, local_notification2;
  BasicTests(false, &local_notification1);
  BasicTests(true, &local_notification2);
}


            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/time/civil_time_test.cc
1 issues
syntax error
Error

Line: 46

                EXPECT_EQ("1970", absl::FormatCivilTime(y));
}

TEST(CivilTime, StructMember) {
  struct S {
    absl::CivilDay day;
  };
  S s = {};
  EXPECT_EQ(absl::CivilDay{}, s.day);

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/time/clock_test.cc
1 issues
syntax error
Error

Line: 105

              }

// Tests that SleepFor() returns neither too early nor too late.
TEST(SleepFor, Bounded) {
  const absl::Duration d = absl::Milliseconds(2500);
  const absl::Duration early = absl::Milliseconds(100);
  const absl::Duration late = absl::Milliseconds(300);
  const absl::Duration timeout = 48 * d;
  EXPECT_TRUE(AssertSleepForBounded(d, early, late, timeout,

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/time/duration_test.cc
1 issues
syntax error
Error

Line: 44

              // A gMock matcher to match timespec values. Use this matcher like:
// timespec ts1, ts2;
// EXPECT_THAT(ts1, TimespecMatcher(ts2));
MATCHER_P(TimespecMatcher, ts, "") {
  if (ts.tv_sec == arg.tv_sec && ts.tv_nsec == arg.tv_nsec)
    return true;
  *result_listener << "expected: {" << ts.tv_sec << ", " << ts.tv_nsec << "} ";
  *result_listener << "actual: {" << arg.tv_sec << ", " << arg.tv_nsec << "}";
  return false;

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/time/format_test.cc
1 issues
syntax error
Error

Line: 43

              // Testing FormatTime()
//

TEST(FormatTime, Basics) {
  absl::TimeZone tz = absl::UTCTimeZone();
  absl::Time t = absl::FromTimeT(0);

  // Starts with a couple basic edge cases.
  EXPECT_EQ("", absl::FormatTime("", t, tz));

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/time/internal/cctz/src/civil_time_test.cc
1 issues
syntax error
Error

Line: 338

              
// The remaining tests do not use constexpr.

TEST(CivilTime, DefaultConstruction) {
  civil_second ss;
  EXPECT_EQ("1970-01-01T00:00:00", Format(ss));

  civil_minute mm;
  EXPECT_EQ("1970-01-01T00:00", Format(mm));

            

Reported by Cppcheck.