The following issues were found

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

Line: 32

                if (Contains(conv, FormatConversionCharSetInternal::c)) { \
    out += #c;                                              \
  }
  ABSL_INTERNAL_CONVERSION_CHARS_EXPAND_(CONV_SET_CASE, )
#undef CONV_SET_CASE
  if (Contains(conv, FormatConversionCharSetInternal::kStar)) {
    out += "*";
  }
  return out;

            

Reported by Cppcheck.

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

Line: 38

              
#define ABSL_INTERNAL_X_VAL(id) \
  constexpr absl::FormatConversionChar FormatConversionCharInternal::id;
ABSL_INTERNAL_CONVERSION_CHARS_EXPAND_(ABSL_INTERNAL_X_VAL, )
#undef ABSL_INTERNAL_X_VAL
// NOLINTNEXTLINE(readability-redundant-declaration)
constexpr absl::FormatConversionChar FormatConversionCharInternal::kNone;

#define ABSL_INTERNAL_CHAR_SET_CASE(c) \

            

Reported by Cppcheck.

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

Line: 88

              #define X_VAL(id)                           \
  EXPECT_EQ(absl::FormatConversionChar::id, \
            absl::str_format_internal::FormatConversionCharInternal::id);
  ABSL_INTERNAL_CONVERSION_CHARS_EXPAND_(X_VAL, );
#undef X_VAL

#define X_VAL(id)                              \
  EXPECT_EQ(absl::FormatConversionCharSet::id, \
            absl::str_format_internal::FormatConversionCharSetInternal::id);

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/internal/str_format/output.cc
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 36 Column: 8 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              
void BufferRawSink::Write(string_view v) {
  size_t to_write = std::min(v.size(), size_);
  std::memcpy(buffer_, v.data(), to_write);
  buffer_ += to_write;
  size_ -= to_write;
  total_written_ += v.size();
}


            

Reported by FlawFinder.

src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/internal/str_format/parser.h
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 217 Column: 5 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

                  items_ = other.items_;
    size_t text_size = items_.empty() ? 0 : items_.back().text_end;
    data_.reset(new char[text_size]);
    memcpy(data_.get(), other.data_.get(), text_size);
    return *this;
  }

  ParsedFormatBase& operator=(ParsedFormatBase&& other) {
    if (this == &other) return *this;

            

Reported by FlawFinder.

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

Line: 31

                }
};

TEST(StringConstant, Traits) {
  constexpr auto str = MakeStringConstant(Callable{});
  using T = decltype(str);

  EXPECT_TRUE(std::is_empty<T>::value);
  EXPECT_TRUE(std::is_trivial<T>::value);

            

Reported by Cppcheck.

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

Line: 38

                EXPECT_FALSE(absl::StartsWith(e, a));
}

TEST(MatchTest, EndsWith) {
  const std::string s1("123\0abc", 7);
  const absl::string_view a("foobar");
  const absl::string_view b(s1);
  const absl::string_view e;
  EXPECT_TRUE(absl::EndsWith(a, a));

            

Reported by Cppcheck.

src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/str_replace_test.cc
1 issues
StrCat - Does not check for buffer overflows when concatenating to destination [MS-banned]
Security

Line: 158 Column: 49 CWE codes: 120

              TEST(StrReplaceAll, ReplacementsInPlace) {
  std::string s = std::string("$who bought $count #Noun. Thanks $who!");
  int count;
  count = absl::StrReplaceAll({{"$count", absl::StrCat(5)},
                              {"$who", "Bob"},
                              {"#Noun", "Apples"}}, &s);
  EXPECT_EQ(count, 4);
  EXPECT_EQ("Bob bought 5 Apples. Thanks Bob!", s);
}

            

Reported by FlawFinder.

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

Line: 42

              using ::testing::Pair;
using ::testing::UnorderedElementsAre;

TEST(Split, TraitsTest) {
  static_assert(!absl::strings_internal::SplitterIsConvertibleTo<int>::value,
                "");
  static_assert(
      !absl::strings_internal::SplitterIsConvertibleTo<std::string>::value, "");
  static_assert(absl::strings_internal::SplitterIsConvertibleTo<

            

Reported by Cppcheck.

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

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

              
namespace {
void WritePadding(std::ostream& o, size_t pad) {
  char fill_buf[32];
  memset(fill_buf, o.fill(), sizeof(fill_buf));
  while (pad) {
    size_t n = std::min(pad, sizeof(fill_buf));
    o.write(fill_buf, n);
    pad -= n;

            

Reported by FlawFinder.