Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/sentencepiece-0.1.94/src/builder_test.cc
Examining data/sentencepiece-0.1.94/src/bpe_model_trainer.cc
Examining data/sentencepiece-0.1.94/src/testharness.h
Examining data/sentencepiece-0.1.94/src/spm_encode_main.cc
Examining data/sentencepiece-0.1.94/src/word_model.cc
Examining data/sentencepiece-0.1.94/src/unigram_model.cc
Examining data/sentencepiece-0.1.94/src/common.h
Examining data/sentencepiece-0.1.94/src/sentencepiece_trainer.cc
Examining data/sentencepiece-0.1.94/src/testharness.cc
Examining data/sentencepiece-0.1.94/src/init_test.cc
Examining data/sentencepiece-0.1.94/src/builder.cc
Examining data/sentencepiece-0.1.94/src/char_model_trainer.h
Examining data/sentencepiece-0.1.94/src/filesystem.cc
Examining data/sentencepiece-0.1.94/src/bpe_model.h
Examining data/sentencepiece-0.1.94/src/model_interface_test.cc
Examining data/sentencepiece-0.1.94/src/init.h
Examining data/sentencepiece-0.1.94/src/word_model_trainer.cc
Examining data/sentencepiece-0.1.94/src/unicode_script_map.h
Examining data/sentencepiece-0.1.94/src/normalizer.h
Examining data/sentencepiece-0.1.94/src/builtin_pb/sentencepiece.pb.cc
Examining data/sentencepiece-0.1.94/src/builtin_pb/sentencepiece.pb.h
Examining data/sentencepiece-0.1.94/src/builtin_pb/sentencepiece_model.pb.h
Examining data/sentencepiece-0.1.94/src/builtin_pb/sentencepiece_model.pb.cc
Examining data/sentencepiece-0.1.94/src/unigram_model_test.cc
Examining data/sentencepiece-0.1.94/src/word_model.h
Examining data/sentencepiece-0.1.94/src/unigram_model_trainer.cc
Examining data/sentencepiece-0.1.94/src/bpe_model_test.cc
Examining data/sentencepiece-0.1.94/src/util.h
Examining data/sentencepiece-0.1.94/src/init.cc
Examining data/sentencepiece-0.1.94/src/char_model.cc
Examining data/sentencepiece-0.1.94/src/model_factory_test.cc
Examining data/sentencepiece-0.1.94/src/pretokenizer_for_training.cc
Examining data/sentencepiece-0.1.94/src/filesystem.h
Examining data/sentencepiece-0.1.94/src/bpe_model_trainer_test.cc
Examining data/sentencepiece-0.1.94/src/char_model_trainer_test.cc
Examining data/sentencepiece-0.1.94/src/sentencepiece_processor_test.cc
Examining data/sentencepiece-0.1.94/src/model_factory.h
Examining data/sentencepiece-0.1.94/src/char_model_test.cc
Examining data/sentencepiece-0.1.94/src/model_interface.cc
Examining data/sentencepiece-0.1.94/src/sentencepiece_processor.h
Examining data/sentencepiece-0.1.94/src/word_model_test.cc
Examining data/sentencepiece-0.1.94/src/normalizer_test.cc
Examining data/sentencepiece-0.1.94/src/unigram_model.h
Examining data/sentencepiece-0.1.94/src/trainer_interface_test.cc
Examining data/sentencepiece-0.1.94/src/model_factory.cc
Examining data/sentencepiece-0.1.94/src/sentencepiece_trainer.h
Examining data/sentencepiece-0.1.94/src/model_interface.h
Examining data/sentencepiece-0.1.94/src/builder.h
Examining data/sentencepiece-0.1.94/src/spm_normalize_main.cc
Examining data/sentencepiece-0.1.94/src/error.cc
Examining data/sentencepiece-0.1.94/src/char_model.h
Examining data/sentencepiece-0.1.94/src/normalization_rule.h
Examining data/sentencepiece-0.1.94/src/unigram_model_trainer_test.cc
Examining data/sentencepiece-0.1.94/src/trainer_factory_test.cc
Examining data/sentencepiece-0.1.94/src/spm_decode_main.cc
Examining data/sentencepiece-0.1.94/src/spm_train_main.cc
Examining data/sentencepiece-0.1.94/src/trainer_factory.cc
Examining data/sentencepiece-0.1.94/src/spm_export_vocab_main.cc
Examining data/sentencepiece-0.1.94/src/bpe_model.cc
Examining data/sentencepiece-0.1.94/src/freelist.h
Examining data/sentencepiece-0.1.94/src/util_test.cc
Examining data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc
Examining data/sentencepiece-0.1.94/src/char_model_trainer.cc
Examining data/sentencepiece-0.1.94/src/spec_parser.h
Examining data/sentencepiece-0.1.94/src/test_main.cc
Examining data/sentencepiece-0.1.94/src/unicode_script.h
Examining data/sentencepiece-0.1.94/src/trainer_factory.h
Examining data/sentencepiece-0.1.94/src/unicode_script_test.cc
Examining data/sentencepiece-0.1.94/src/pretokenizer_for_training.h
Examining data/sentencepiece-0.1.94/src/filesystem_test.cc
Examining data/sentencepiece-0.1.94/src/freelist_test.cc
Examining data/sentencepiece-0.1.94/src/trainer_interface.h
Examining data/sentencepiece-0.1.94/src/pretokenizer_for_training_test.cc
Examining data/sentencepiece-0.1.94/src/trainer_interface.cc
Examining data/sentencepiece-0.1.94/src/sentencepiece_processor.cc
Examining data/sentencepiece-0.1.94/src/compile_charsmap_main.cc
Examining data/sentencepiece-0.1.94/src/word_model_trainer.h
Examining data/sentencepiece-0.1.94/src/unigram_model_trainer.h
Examining data/sentencepiece-0.1.94/src/util.cc
Examining data/sentencepiece-0.1.94/src/word_model_trainer_test.cc
Examining data/sentencepiece-0.1.94/src/normalizer.cc
Examining data/sentencepiece-0.1.94/src/unicode_script.cc
Examining data/sentencepiece-0.1.94/src/bpe_model_trainer.h
Examining data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx
Examining data/sentencepiece-0.1.94/python/once.h
Examining data/sentencepiece-0.1.94/third_party/absl/flags/flag.cc
Examining data/sentencepiece-0.1.94/third_party/absl/flags/flag.h
Examining data/sentencepiece-0.1.94/third_party/absl/container/flat_hash_map.h
Examining data/sentencepiece-0.1.94/third_party/absl/container/flat_hash_set.h
Examining data/sentencepiece-0.1.94/third_party/absl/strings/str_split.h
Examining data/sentencepiece-0.1.94/third_party/absl/strings/string_view.cc
Examining data/sentencepiece-0.1.94/third_party/absl/strings/str_cat.h
Examining data/sentencepiece-0.1.94/third_party/absl/strings/string_view.h
Examining data/sentencepiece-0.1.94/third_party/absl/strings/str_replace.h
Examining data/sentencepiece-0.1.94/third_party/absl/strings/match.h
Examining data/sentencepiece-0.1.94/third_party/absl/strings/ascii.h
Examining data/sentencepiece-0.1.94/third_party/absl/strings/strip.h
Examining data/sentencepiece-0.1.94/third_party/absl/strings/numbers.h
Examining data/sentencepiece-0.1.94/third_party/absl/strings/str_join.h
Examining data/sentencepiece-0.1.94/third_party/absl/strings/str_format.h
Examining data/sentencepiece-0.1.94/third_party/absl/memory/memory.h
Examining data/sentencepiece-0.1.94/third_party/darts_clone/darts.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/message_lite.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/callback.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/common.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/map_util.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/platform_macros.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/stringprintf.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/mathlimits.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/hash.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/casts.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/mutex.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/logging.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/bytestream.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/int128.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/status.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/time.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/io_win32.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/macros.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/once.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/statusor.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/port.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/stringpiece.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/stl_util.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/map.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/repeated_field.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/arena_impl.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/arenastring.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/map_entry_lite.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/generated_message_table_driven.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/wire_format_lite.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/generated_message_table_driven_lite.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/extension_set.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/arena.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/implicit_weak_message.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/coded_stream.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/zero_copy_stream.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/coded_stream_inl.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/zero_copy_stream_impl_lite.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/wire_format_lite_inl.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/has_bits.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/metadata_lite.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/map_field_lite.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/map_type_handler.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/generated_message_util.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/inlined_string_field.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/generated_enum_util.h
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/statusor.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/extension_set.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/stringpiece.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/status.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/bytestream.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/zero_copy_stream_impl_lite.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/coded_stream.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/stringprintf.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/generated_message_table_driven_lite.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/time.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/zero_copy_stream.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/message_lite.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/io_win32.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/int128.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/wire_format_lite.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/common.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/arenastring.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/implicit_weak_message.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/arena.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/generated_message_util.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/structurally_valid.cc
Examining data/sentencepiece-0.1.94/third_party/protobuf-lite/repeated_field.cc

FINAL RESULTS:

data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:706:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(r,name);
data/sentencepiece-0.1.94/src/bpe_model_trainer_test.cc:100:17:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
          absl::StrCat(
data/sentencepiece-0.1.94/src/pretokenizer_for_training_test.cc:67:21:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    EXPECT_EQ(absl::StrCat("I", TrainerInterface::kWSStr, "love",
data/sentencepiece-0.1.94/src/sentencepiece_processor.cc:102:17:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
          absl::StrCat(s.input(), "\t", s.expected(), "\t", result));
data/sentencepiece-0.1.94/src/sentencepiece_trainer.cc:71:13:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      absl::StrCat(PrintProto(trainer_spec, "trainer_spec"),
data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc:58:25:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  absl::StrCat("--input=", input, " --model_prefix=", model,
data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc:65:17:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
          absl::StrCat("--input=", input, " --model_prefix=", model,
data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc:71:25:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  absl::StrCat("--input=", input, " --model_prefix=", model,
data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc:77:25:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  absl::StrCat("--input=", input, " --model_prefix=", model,
data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc:83:25:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  absl::StrCat("--input=", input, " --model_prefix=", model,
data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc:89:25:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  absl::StrCat("--input=", input, " --model_prefix=", model,
data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc:96:25:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  absl::StrCat("--input=", input, " --model_prefix=", model,
data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc:135:17:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
          absl::StrCat("--model_prefix=", model, " --vocab_size=1000"), &it)
data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc:150:25:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                  absl::StrCat("--input=", input, " --model_prefix=", model,
data/sentencepiece-0.1.94/src/sentencepiece_trainer_test.cc:168:17:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
          absl::StrCat("--input=", input_file, " --model_prefix=", model,
data/sentencepiece-0.1.94/src/trainer_interface_test.cc:512:51:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                                            absl::StrCat("input", i));
data/sentencepiece-0.1.94/src/trainer_interface_test.cc:516:32:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
      const auto value = absl::StrCat(rand());
data/sentencepiece-0.1.94/src/trainer_interface_test.cc:534:51:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
                                            absl::StrCat("input_not_exist", i));
data/sentencepiece-0.1.94/src/unigram_model_trainer_test.cc:46:17:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
          absl::StrCat(
data/sentencepiece-0.1.94/third_party/absl/strings/str_cat.h:27:20:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
inline std::string StrCat(int v) {
data/sentencepiece-0.1.94/third_party/absl/strings/str_cat.h:33:20:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
inline std::string StrCat(absl::string_view str) {
data/sentencepiece-0.1.94/third_party/absl/strings/str_cat.h:38:20:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
inline std::string StrCat(absl::string_view first, const T &... rest) {
data/sentencepiece-0.1.94/third_party/absl/strings/str_cat.h:39:10:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
  return StrCat(first) + StrCat(rest...);
data/sentencepiece-0.1.94/third_party/absl/strings/str_cat.h:39:26:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
  return StrCat(first) + StrCat(rest...);
data/sentencepiece-0.1.94/third_party/absl/strings/str_cat.h:43:20:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
inline std::string StrCat(int first, const T &... rest) {
data/sentencepiece-0.1.94/third_party/absl/strings/str_cat.h:44:10:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
  return StrCat(first) + StrCat(rest...);
data/sentencepiece-0.1.94/third_party/absl/strings/str_cat.h:44:26:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
  return StrCat(first) + StrCat(rest...);
data/sentencepiece-0.1.94/third_party/absl/strings/str_format.h:29:21:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  const int len = ::snprintf(nullptr, 0, format, args...);
data/sentencepiece-0.1.94/third_party/absl/strings/str_format.h:32:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  ::snprintf(&s[0], s.size() + 1, format, args...);
data/sentencepiece-0.1.94/third_party/protobuf-lite/common.cc:48:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf    // see comment in strutil.cc
data/sentencepiece-0.1.94/third_party/protobuf-lite/common.cc:48:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf    // see comment in strutil.cc
data/sentencepiece-0.1.94/third_party/protobuf-lite/common.cc:232:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(buffer, sizeof(buffer), FORMAT, value);                \
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/io_win32.h:61:24:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
LIBPROTOBUF_EXPORT int access(const char* path, int mode);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:695:27:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:696:27:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b,
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:698:27:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b,
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:700:27:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b,
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:703:27:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b,
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:706:27:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b,
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:710:27:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b,
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:714:27:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
LIBPROTOBUF_EXPORT string StrCat(const AlphaNum& a, const AlphaNum& b,
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:720:15:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
inline string StrCat(const AlphaNum& a) { return string(a.data(), a.size()); }
data/sentencepiece-0.1.94/third_party/protobuf-lite/io_win32.cc:276:5:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
int access(const char* path, int mode) {
data/sentencepiece-0.1.94/third_party/protobuf-lite/stringprintf.cc:65:16:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  int result = vsnprintf(space, kSpaceLength, format, backup_ap);
data/sentencepiece-0.1.94/third_party/protobuf-lite/stringprintf.cc:79:16:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      result = vsnprintf(NULL, 0, format, backup_ap);
data/sentencepiece-0.1.94/third_party/protobuf-lite/stringprintf.cc:96:12:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  result = vsnprintf(buf, length, format, backup_ap);
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:56:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:56:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:524:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
          sprintf(dest + used, (use_hex ? "\\x%02x" : "\\%03o"),
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1476:8:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
string StrCat(const AlphaNum &a, const AlphaNum &b) {
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1485:8:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c) {
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1495:8:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1505:8:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1516:8:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1528:8:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1542:8:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1555:8:  [4] (buffer) StrCat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
string StrCat(const AlphaNum &a, const AlphaNum &b, const AlphaNum &c,
data/sentencepiece-0.1.94/src/bpe_model.cc:137:41:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    if (rand_gen == nullptr) rand_gen = random::GetRandomGenerator();
data/sentencepiece-0.1.94/src/sentencepiece_processor.cc:496:16:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    auto *mt = random::GetRandomGenerator();
data/sentencepiece-0.1.94/src/trainer_interface.cc:90:19:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  using Sampler = random::ReservoirSampler<TrainerInterface::Sentence>;
data/sentencepiece-0.1.94/src/trainer_interface.cc:313:3:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  random::ReservoirSampler<std::string> test_sentence_sampler(
data/sentencepiece-0.1.94/src/unigram_model.cc:348:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  auto *mt = random::GetRandomGenerator();
data/sentencepiece-0.1.94/src/util.cc:147:11:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
namespace random {
data/sentencepiece-0.1.94/src/util.h:303:11:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
namespace random {
data/sentencepiece-0.1.94/src/util_test.cc:419:3:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  random::ReservoirSampler<int> sampler(&sampled, 100);
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:657:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const char hex[17] = "0123456789abcdef";
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:819:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(newstr, cstr, len+1);
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:1802:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char result[SWIG_BUFFER_SIZE];
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:1813:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char result[SWIG_BUFFER_SIZE];
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:1943:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pack, ptr, size);
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:1961:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ptr, sobj->pack, size);
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:2505:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char mesg[256];
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:2985:38:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:3027:45:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:5897:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(gv->name, name, size);
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:5978:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(buff, methods[i].ml_doc, ldoc);
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:5980:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(buff, "swig_ptr: ", 10);
data/sentencepiece-0.1.94/src/builtin_pb/sentencepiece.pb.cc:127:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  ::memcpy(&id_, &from.id_,
data/sentencepiece-0.1.94/src/builtin_pb/sentencepiece_model.pb.cc:327:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  ::memcpy(&self_test_sample_size_, &from.self_test_sample_size_,
data/sentencepiece-0.1.94/src/builtin_pb/sentencepiece_model.pb.cc:1832:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  ::memcpy(&add_dummy_prefix_, &from.add_dummy_prefix_,
data/sentencepiece-0.1.94/src/builtin_pb/sentencepiece_model.pb.cc:2668:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  ::memcpy(&score_, &from.score_,
data/sentencepiece-0.1.94/src/spm_decode_main.cc:68:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      ids.push_back(atoi(s.c_str()));
data/sentencepiece-0.1.94/src/util.cc:137:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[8];
data/sentencepiece-0.1.94/src/util.cc:188:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[kStrErrorSize];
data/sentencepiece-0.1.94/src/util.cc:242:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      ::MultiByteToWideChar(CP_UTF8, 0, input.c_str(), -1, nullptr, 0);
data/sentencepiece-0.1.94/src/util.cc:248:24:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  const int result = ::MultiByteToWideChar(CP_UTF8, 0, input.c_str(), -1,
data/sentencepiece-0.1.94/src/util.h:106:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(result, str.data(), sizeof(T));
data/sentencepiece-0.1.94/src/util.h:114:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(const_cast<char *>(s.data()), &value, sizeof(T));
data/sentencepiece-0.1.94/src/util.h:161:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[32];
data/sentencepiece-0.1.94/src/util_test.cc:115:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[16];
data/sentencepiece-0.1.94/src/util_test.cc:228:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[16];
data/sentencepiece-0.1.94/third_party/absl/strings/str_join.h:81:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[32];
data/sentencepiece-0.1.94/third_party/absl/strings/str_split.h:79:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char delim[2];
data/sentencepiece-0.1.94/third_party/absl/strings/string_view.cc:30:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fill_buf[32];
data/sentencepiece-0.1.94/third_party/darts_clone/darts.h:242:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int open(const char *file_name, const char *mode = "rb",
data/sentencepiece-0.1.94/third_party/darts_clone/darts.h:327:34:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int DoubleArrayImpl<A, B, T, C>::open(const char *file_name,
data/sentencepiece-0.1.94/third_party/darts_clone/darts.h:335:26:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  std::FILE *file = std::fopen(file_name, mode);
data/sentencepiece-0.1.94/third_party/darts_clone/darts.h:419:26:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  std::FILE *file = std::fopen(file_name, mode);
data/sentencepiece-0.1.94/third_party/protobuf-lite/bytestream.cc:61:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dest_, data, n);
data/sentencepiece-0.1.94/third_party/protobuf-lite/bytestream.cc:80:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(outbuf_ + size_, bytes, n);
data/sentencepiece-0.1.94/third_party/protobuf-lite/bytestream.cc:107:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf_ + size_, bytes, n);
data/sentencepiece-0.1.94/third_party/protobuf-lite/bytestream.cc:124:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(bigger, buf_, size_);
data/sentencepiece-0.1.94/third_party/protobuf-lite/bytestream.cc:135:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(just_enough, buf_, size_);
data/sentencepiece-0.1.94/third_party/protobuf-lite/coded_stream.cc:682:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer_, data, buffer_size_);
data/sentencepiece-0.1.94/third_party/protobuf-lite/coded_stream.cc:688:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buffer_, data, size);
data/sentencepiece-0.1.94/third_party/protobuf-lite/coded_stream.cc:694:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(target, data, size);
data/sentencepiece-0.1.94/third_party/protobuf-lite/common.cc:98:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[128];
data/sentencepiece-0.1.94/third_party/protobuf-lite/common.cc:231:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[128];                                               \
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/coded_stream.h:946:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(value, buffer, sizeof(*value));
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/coded_stream.h:961:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(value, buffer, sizeof(*value));
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/coded_stream.h:1172:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(target, &value, sizeof(value));
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/coded_stream.h:1185:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(target, &value, sizeof(value));
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/coded_stream_inl.h:61:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(z.first, buffer_, size);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/coded_stream_inl.h:74:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer, buffer_, current_buffer_size);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/io/coded_stream_inl.h:81:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buffer, buffer_, size);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/message_lite.h:123:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char space[sizeof(T)];
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/repeated_field.h:1426:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(to, from, static_cast<size_t>(array_size) * sizeof(Element));
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:129:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case  1: memcpy(dst, src, 1); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:130:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case  2: memcpy(dst, src, 2); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:131:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case  3: memcpy(dst, src, 3); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:132:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case  4: memcpy(dst, src, 4); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:133:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case  5: memcpy(dst, src, 5); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:134:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case  6: memcpy(dst, src, 6); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:135:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case  7: memcpy(dst, src, 7); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:136:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case  8: memcpy(dst, src, 8); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:137:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case  9: memcpy(dst, src, 9); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:138:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case 10: memcpy(dst, src, 10); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:139:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case 11: memcpy(dst, src, 11); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:140:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case 12: memcpy(dst, src, 12); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:141:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case 13: memcpy(dst, src, 13); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:142:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case 14: memcpy(dst, src, 14); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:143:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case 15: memcpy(dst, src, 15); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:144:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    case 16: memcpy(dst, src, 16); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/fastmem.h:145:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    default: memcpy(dst, src, size); break;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/io_win32.h:60:26:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
LIBPROTOBUF_EXPORT FILE* fopen(const char* path, const char* mode);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/io_win32.h:67:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
LIBPROTOBUF_EXPORT int open(const char* path, int flags, int mode = 0);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/port.h:329:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&t, p, sizeof t);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/port.h:335:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&t, p, sizeof t);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/port.h:341:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&t, p, sizeof t);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/port.h:346:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p, &v, sizeof v);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/port.h:350:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p, &v, sizeof v);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/port.h:354:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p, &v, sizeof v);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:617:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char digits[kFastToBufferSize];
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/wire_format_lite_inl.h:640:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(target, ii, static_cast<size_t>(bytes));
data/sentencepiece-0.1.94/third_party/protobuf-lite/io_win32.cc:250:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int open(const char* path, int flags, int mode) {
data/sentencepiece-0.1.94/third_party/protobuf-lite/io_win32.cc:315:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
FILE* fopen(const char* path, const char* mode) {
data/sentencepiece-0.1.94/third_party/protobuf-lite/io_win32.cc:333:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  return ::fopen(path, mode);
data/sentencepiece-0.1.94/third_party/protobuf-lite/io_win32.cc:389:7:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      MultiByteToWideChar(inUtf8 ? CP_UTF8 : CP_ACP, 0, s, -1, NULL, 0);
data/sentencepiece-0.1.94/third_party/protobuf-lite/io_win32.cc:394:3:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  MultiByteToWideChar(
data/sentencepiece-0.1.94/third_party/protobuf-lite/repeated_field.cc:73:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(rep_->elements, old_rep->elements,
data/sentencepiece-0.1.94/third_party/protobuf-lite/stringpiece.cc:94:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buf, ptr_ + pos, ret);
data/sentencepiece-0.1.94/third_party/protobuf-lite/stringprintf.cc:58:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char space[kSpaceLength];
data/sentencepiece-0.1.94/third_party/protobuf-lite/stringprintf.cc:138:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char string_printf_empty_block[256] = { '\0' };
data/sentencepiece-0.1.94/third_party/protobuf-lite/structurally_valid.cc:324:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char utf8acceptnonsurrogates_fast[256] = {
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:546:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char c_escaped_len[256] = {
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:960:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char two_ASCII_digits[100][2] = {
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1133:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[kFastToBufferSize];
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1140:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[kFastToBufferSize];
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1147:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[kFastToBufferSize];
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1154:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[kFastToBufferSize];
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1161:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[kFastToBufferSize];
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1168:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[kFastToBufferSize];
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1216:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[kDoubleToBufferSize];
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1221:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[kFloatToBufferSize];
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1266:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(buffer, "inf");
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1269:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(buffer, "-inf");
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1272:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(buffer, "nan");
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1384:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(buffer, "inf");
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1387:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(buffer, "-inf");
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1390:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(buffer, "nan");
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1448:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(out, x.data(), x.size());
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1453:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(out, x1.data(), x1.size());
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1456:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(out, x2.data(), x2.size());
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1463:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(out, x1.data(), x1.size());
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1466:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(out, x2.data(), x2.size());
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1469:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(out, x3.data(), x3.size());
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1472:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(out, x4.data(), x4.size());
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:2278:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(output, reinterpret_cast<const char*>(&tmp) + sizeof(tmp) - len, len);
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:2283:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char kUTF8LenTbl[256] = {
data/sentencepiece-0.1.94/third_party/protobuf-lite/zero_copy_stream_impl_lite.cc:200:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char junk[4096];
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:421:25:  [1] (buffer) 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) (CWE-126).
  const char* te = tb + strlen(tb);
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:705:7:  [1] (buffer) 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) (CWE-126).
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:726:26:  [1] (buffer) 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) (CWE-126).
  size_t lname = (name ? strlen(name) : 0);
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:731:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(r,name,lname+1);
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:3045:30:  [1] (buffer) 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) (CWE-126).
	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:5894:21:  [1] (buffer) 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) (CWE-126).
      size_t size = strlen(name)+1;
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:5963:15:  [1] (buffer) 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) (CWE-126).
              strlen(const_table[j].name)) == 0) {
data/sentencepiece-0.1.94/python/src/sentencepiece/sentencepiece_wrap.cxx:5974:27:  [1] (buffer) 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) (CWE-126).
            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
data/sentencepiece-0.1.94/src/builder.cc:198:67:  [1] (buffer) 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) (CWE-126).
                                                  results.size(), strlen(str));
data/sentencepiece-0.1.94/src/sentencepiece_processor.h:36:58:  [1] (buffer) 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) (CWE-126).
  string_view(const char *str) : ptr_(str), length_(std::strlen(str)) {}
data/sentencepiece-0.1.94/src/util_test.cc:203:56:  [1] (buffer) 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) (CWE-126).
                    kInvalidData[i], kInvalidData[i] + strlen(kInvalidData[i]),
data/sentencepiece-0.1.94/third_party/absl/strings/string_view.h:493:18:  [1] (buffer) 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) (CWE-126).
    return str ? strlen(str) : 0;
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/io_win32.h:68:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
LIBPROTOBUF_EXPORT int read(int fd, void* buffer, size_t size);
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/stringpiece.h:215:40:  [1] (buffer) 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) (CWE-126).
      length_ = CheckedSsizeTFromSizeT(strlen(str));
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/stringpiece.h:264:40:  [1] (buffer) 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) (CWE-126).
      length_ = CheckedSsizeTFromSizeT(strlen(str));
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:636:40:  [1] (buffer) 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) (CWE-126).
    : piece_data_(digits), piece_size_(strlen(FloatToBuffer(f, digits))) {}
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:638:40:  [1] (buffer) 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) (CWE-126).
    : piece_data_(digits), piece_size_(strlen(DoubleToBuffer(f, digits))) {}
data/sentencepiece-0.1.94/third_party/protobuf-lite/google/protobuf/stubs/strutil.h:643:41:  [1] (buffer) 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) (CWE-126).
      : piece_data_(c_str), piece_size_(strlen(c_str)) {}
data/sentencepiece-0.1.94/third_party/protobuf-lite/io_win32.cc:343:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int read(int fd, void* buffer, size_t size) {
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:285:22:  [1] (buffer) 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) (CWE-126).
  int delim_length = strlen(delim);
data/sentencepiece-0.1.94/third_party/protobuf-lite/strutil.cc:1254:29:  [1] (buffer) 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) (CWE-126).
    memmove(target, buffer, strlen(buffer) + 1);

ANALYSIS SUMMARY:

Hits = 201
Lines analyzed = 206411 in approximately 6.98 seconds (29584 lines/second)
Physical Source Lines of Code (SLOC) = 186106
Hits@level = [0]  24 [1]  21 [2] 115 [3]   8 [4]  57 [5]   0
Hits@level+ = [0+] 225 [1+] 201 [2+] 180 [3+]  65 [4+]  57 [5+]   0
Hits/KSLOC@level+ = [0+] 1.20899 [1+] 1.08003 [2+] 0.967191 [3+] 0.349263 [4+] 0.306277 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.