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/ustr-1.0.4/ustr-pool.h
Examining data/ustr-1.0.4/ustr-b.h
Examining data/ustr-1.0.4/ustr-cmp-internal.h
Examining data/ustr-1.0.4/ustr-utf8-code.h
Examining data/ustr-1.0.4/ustr-split.h
Examining data/ustr-1.0.4/tst.h
Examining data/ustr-1.0.4/ustr-parse.h
Examining data/ustr-1.0.4/ustr-set.h
Examining data/ustr-1.0.4/ustr-srch-internal.h
Examining data/ustr-1.0.4/ustr-io-code.h
Examining data/ustr-1.0.4/ustr-srch.h
Examining data/ustr-1.0.4/ustr-ins-internal.h
Examining data/ustr-1.0.4/ustr-sub-internal.h
Examining data/ustr-1.0.4/ustr-spn-code.h
Examining data/ustr-1.0.4/ustr-fmt-internal.h
Examining data/ustr-1.0.4/ustr-split-internal.h
Examining data/ustr-1.0.4/ustr-ins.h
Examining data/ustr-1.0.4/ustr-spn.h
Examining data/ustr-1.0.4/ustr-sub.h
Examining data/ustr-1.0.4/ustr-fmt.h
Examining data/ustr-1.0.4/ustr-conf-64.h
Examining data/ustr-1.0.4/T/tst_7_auto.c
Examining data/ustr-1.0.4/T/ctst_0_sizes.c
Examining data/ustr-1.0.4/T/tst_19_concat.c
Examining data/ustr-1.0.4/T/otst_10_b.c
Examining data/ustr-1.0.4/T/ctst_99_enomem.c
Examining data/ustr-1.0.4/T/ctst_10_b.c
Examining data/ustr-1.0.4/T/tst_13_utf8.c
Examining data/ustr-1.0.4/T/tst_9_ins.c
Examining data/ustr-1.0.4/T/ctst_0_nothing.c
Examining data/ustr-1.0.4/T/ctst_0_manual.c
Examining data/ustr-1.0.4/T/ctst_19_join.c
Examining data/ustr-1.0.4/T/tst_0_sizes.c
Examining data/ustr-1.0.4/T/tst_99_64bit.c
Examining data/ustr-1.0.4/T/tst_0_cntl.c
Examining data/ustr-1.0.4/T/tst_11_io.c
Examining data/ustr-1.0.4/T/ctst_15_trim.c
Examining data/ustr-1.0.4/T/tst_98_pool.c
Examining data/ustr-1.0.4/T/tst_10_b.c
Examining data/ustr-1.0.4/T/ctst_2_small.c
Examining data/ustr-1.0.4/T/ctst_13_utf8.c
Examining data/ustr-1.0.4/T/tst_0_manual.c
Examining data/ustr-1.0.4/T/tst_19_join.c
Examining data/ustr-1.0.4/T/tst_2_small.c
Examining data/ustr-1.0.4/T/ctst_18_split.c
Examining data/ustr-1.0.4/T/ctst_14_cmp.c
Examining data/ustr-1.0.4/T/tst_99_enomem.c
Examining data/ustr-1.0.4/T/tst_1_basic.c
Examining data/ustr-1.0.4/T/ctst_5_shrink.c
Examining data/ustr-1.0.4/T/tst_8_spn.c
Examining data/ustr-1.0.4/T/ctst_1_basic.c
Examining data/ustr-1.0.4/T/ctst_4_grow.c
Examining data/ustr-1.0.4/T/ctst_12_fmt.c
Examining data/ustr-1.0.4/T/octst_10_b.c
Examining data/ustr-1.0.4/T/ctst_19_concat.c
Examining data/ustr-1.0.4/T/ctst_6_tiny.c
Examining data/ustr-1.0.4/T/tst_5_shrink.c
Examining data/ustr-1.0.4/T/tst_17_sub.c
Examining data/ustr-1.0.4/T/tst_14_cmp.c
Examining data/ustr-1.0.4/T/tst_12_fmt.c
Examining data/ustr-1.0.4/T/tst_0_nothing.c
Examining data/ustr-1.0.4/T/tst_3_medium.c
Examining data/ustr-1.0.4/T/ctst_7_auto.c
Examining data/ustr-1.0.4/T/ctst_0_cntl.c
Examining data/ustr-1.0.4/T/ctst_8_spn.c
Examining data/ustr-1.0.4/T/ctst_9_ins.c
Examining data/ustr-1.0.4/T/tst_16_parse.c
Examining data/ustr-1.0.4/T/tst_15_trim.c
Examining data/ustr-1.0.4/T/ctst_98_pool.c
Examining data/ustr-1.0.4/T/ctst_16_parse.c
Examining data/ustr-1.0.4/T/tst_18_split.c
Examining data/ustr-1.0.4/T/tst_4_grow.c
Examining data/ustr-1.0.4/T/tst_6_tiny.c
Examining data/ustr-1.0.4/T/ctst_17_sub.c
Examining data/ustr-1.0.4/T/ctst_11_io.c
Examining data/ustr-1.0.4/T/ctst_3_medium.c
Examining data/ustr-1.0.4/T/ctst_99_64bit.c
Examining data/ustr-1.0.4/examples/dirname.c
Examining data/ustr-1.0.4/examples/mkdir_p.c
Examining data/ustr-1.0.4/examples/txt2html.c
Examining data/ustr-1.0.4/examples/fgrep.c
Examining data/ustr-1.0.4/examples/netstr.c
Examining data/ustr-1.0.4/examples/linecat.c
Examining data/ustr-1.0.4/examples/hello_world.c
Examining data/ustr-1.0.4/examples/basename.c
Examining data/ustr-1.0.4/examples/nums.c
Examining data/ustr-1.0.4/examples/hexdump.c
Examining data/ustr-1.0.4/examples/custr.c
Examining data/ustr-1.0.4/ustr-replace.h
Examining data/ustr-1.0.4/ustr-set-code.h
Examining data/ustr-1.0.4/ustr-replace-internal.h
Examining data/ustr-1.0.4/ustr-sub-code.h
Examining data/ustr-1.0.4/ustr-cntl.h
Examining data/ustr-1.0.4/ustr-io.h
Examining data/ustr-1.0.4/ustr-b-code.h
Examining data/ustr-1.0.4/ustr-conf-debug-multilib-linux.h
Examining data/ustr-1.0.4/ustr-debug.h
Examining data/ustr-1.0.4/ustr-conf-debug-64.h
Examining data/ustr-1.0.4/ustr-pool-code.h
Examining data/ustr-1.0.4/T-installed/tst_io.c
Examining data/ustr-1.0.4/T-installed/tst_cmp.c
Examining data/ustr-1.0.4/T-installed/tst_b.c
Examining data/ustr-1.0.4/T-installed/tst_custr_chk.c
Examining data/ustr-1.0.4/T-installed/tst_set.c
Examining data/ustr-1.0.4/T-installed/tst_parse.c
Examining data/ustr-1.0.4/T-installed/tst_utf8.c
Examining data/ustr-1.0.4/T-installed/tst_spn.c
Examining data/ustr-1.0.4/T-installed/tst_sub.c
Examining data/ustr-1.0.4/T-installed/tst_ins.c
Examining data/ustr-1.0.4/T-installed/tst_fmt.c
Examining data/ustr-1.0.4/T-installed/tst_vstr_chk.c
Examining data/ustr-1.0.4/T-installed/tst_srch.c
Examining data/ustr-1.0.4/T-installed/tst_replace.c
Examining data/ustr-1.0.4/T-installed/tst_pool.c
Examining data/ustr-1.0.4/T-installed/tst_cntl.c
Examining data/ustr-1.0.4/T-installed/tst_split.c
Examining data/ustr-1.0.4/T-installed/tst_sc.c
Examining data/ustr-1.0.4/ustr-ins-code.h
Examining data/ustr-1.0.4/ustr-conf-multilib-linux.h
Examining data/ustr-1.0.4/ustr-cmp.h
Examining data/ustr-1.0.4/ustr-utf8.h
Examining data/ustr-1.0.4/ustr-main.h
Examining data/ustr-1.0.4/malloc-check.h
Examining data/ustr-1.0.4/ustr-fmt-code.h
Examining data/ustr-1.0.4/ustr-cmp-code.h
Examining data/ustr-1.0.4/ustr-sc-internal.h
Examining data/ustr-1.0.4/ustr-replace-code.h
Examining data/ustr-1.0.4/ustr.h
Examining data/ustr-1.0.4/ustr-sc.h
Examining data/ustr-1.0.4/ustr-split-code.h
Examining data/ustr-1.0.4/ustr-parse-code.h
Examining data/ustr-1.0.4/perf-sizes.c
Examining data/ustr-1.0.4/ustr-io-internal.h
Examining data/ustr-1.0.4/ustr-set-internal.h
Examining data/ustr-1.0.4/ustr-main-internal.h
Examining data/ustr-1.0.4/ustr-srch-code.h
Examining data/ustr-1.0.4/ustr-utf8-internal.h
Examining data/ustr-1.0.4/ustr-b-dbg-code.c
Examining data/ustr-1.0.4/ustr-b-opt-code.c
Examining data/ustr-1.0.4/ustr-cmp-dbg-code.c
Examining data/ustr-1.0.4/ustr-cmp-opt-code.c
Examining data/ustr-1.0.4/ustr-fmt-dbg-code.c
Examining data/ustr-1.0.4/ustr-fmt-opt-code.c
Examining data/ustr-1.0.4/ustr-ins-dbg-code.c
Examining data/ustr-1.0.4/ustr-ins-opt-code.c
Examining data/ustr-1.0.4/ustr-io-dbg-code.c
Examining data/ustr-1.0.4/ustr-io-opt-code.c
Examining data/ustr-1.0.4/ustr-main-dbg-code.c
Examining data/ustr-1.0.4/ustr-main-opt-code.c
Examining data/ustr-1.0.4/ustr-parse-dbg-code.c
Examining data/ustr-1.0.4/ustr-parse-opt-code.c
Examining data/ustr-1.0.4/ustr-pool-dbg-code.c
Examining data/ustr-1.0.4/ustr-pool-opt-code.c
Examining data/ustr-1.0.4/ustr-replace-dbg-code.c
Examining data/ustr-1.0.4/ustr-replace-opt-code.c
Examining data/ustr-1.0.4/ustr-sc-dbg-code.c
Examining data/ustr-1.0.4/ustr-sc-opt-code.c
Examining data/ustr-1.0.4/ustr-set-dbg-code.c
Examining data/ustr-1.0.4/ustr-set-opt-code.c
Examining data/ustr-1.0.4/ustr-split-dbg-code.c
Examining data/ustr-1.0.4/ustr-split-opt-code.c
Examining data/ustr-1.0.4/ustr-spn-dbg-code.c
Examining data/ustr-1.0.4/ustr-spn-opt-code.c
Examining data/ustr-1.0.4/ustr-srch-dbg-code.c
Examining data/ustr-1.0.4/ustr-srch-opt-code.c
Examining data/ustr-1.0.4/ustr-sub-dbg-code.c
Examining data/ustr-1.0.4/ustr-sub-opt-code.c
Examining data/ustr-1.0.4/ustr-utf8-dbg-code.c
Examining data/ustr-1.0.4/ustr-utf8-opt-code.c
Examining data/ustr-1.0.4/ustr-cntl-code.h
Examining data/ustr-1.0.4/ustr-compiler.h
Examining data/ustr-1.0.4/ustr-main-code.h
Examining data/ustr-1.0.4/ustr-sc-code.h

FINAL RESULTS:

data/ustr-1.0.4/T/ctst_12_fmt.c:22:10:  [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.
  return vsnprintf(buf, len, fmt, ap);
data/ustr-1.0.4/T/ctst_12_fmt.c:28:10:  [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.
  return vsnprintf(buf, len, fmt, ap);
data/ustr-1.0.4/T/ctst_12_fmt.c:45:36:  [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.
         ofmt.sys_vsnprintf_beg == vsnprintf && 
data/ustr-1.0.4/T/ctst_12_fmt.c:46:36:  [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.
         ofmt.sys_vsnprintf_end == vsnprintf);
data/ustr-1.0.4/T/ctst_7_auto.c:82: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(buf_s4, USTR_BEG_FIXED2 "abcd");
data/ustr-1.0.4/ustr-cntl-code.h:23:4:  [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.
  {vsnprintf, vsnprintf}, /* fmt */
data/ustr-1.0.4/ustr-cntl-code.h:23:15:  [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.
  {vsnprintf, vsnprintf}, /* fmt */
data/ustr-1.0.4/ustr-fmt-code.h:18:34:  [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.
  if (USTR_CONF_VSNPRINTF_BEG != vsnprintf)
data/ustr-1.0.4/ustr-fmt-code.h:25:17:  [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.
  while ((ret = vsnprintf(ptr, sz, fmt, nap)) == -1)
data/ustr-1.0.4/ustr-main.h:191:33:  [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.
#define USTR_CONF_VSNPRINTF_BEG vsnprintf
data/ustr-1.0.4/ustr-main.h:194:33:  [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.
#define USTR_CONF_VSNPRINTF_END vsnprintf
data/ustr-1.0.4/examples/custr.c:315:21:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optchar = getopt_long(argc, argv, "cfhiV", long_options,NULL)) != -1)
data/ustr-1.0.4/examples/fgrep.c:330:21:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optchar = getopt_long(argc, argv,
data/ustr-1.0.4/examples/hexdump.c:160:21:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optchar = getopt_long(argc, argv, "hHSV", long_options, NULL)) != -1)
data/ustr-1.0.4/examples/netstr.c:482:21:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optchar = getopt_long(argc, argv, "cfhiCV", long_options,NULL)) != -1)
data/ustr-1.0.4/examples/nums.c:95:21:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optchar = getopt_long(argc, argv, "alhV", long_options, NULL)) != -1)
data/ustr-1.0.4/examples/txt2html.c:231:21:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((optchar = getopt_long(argc, argv, "hV", long_options, NULL)) != -1)
data/ustr-1.0.4/ustr-cntl-code.h:57:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char *ptr = getenv(key);
data/ustr-1.0.4/T/ctst_11_io.c:89:14:  [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 *fp = fopen("T/ctst_11_io.c", "rb");
data/ustr-1.0.4/T/ctst_11_io.c:157:8:  [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).
  fp = fopen(ustr_cstr(s2), "w+b");
data/ustr-1.0.4/T/ctst_11_io.c:286:21:  [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 *filechk = fopen("/dev/full", "wb");
data/ustr-1.0.4/T/ctst_7_auto.c:7: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_s3[1024];
data/ustr-1.0.4/T/ctst_7_auto.c:9: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_s4[USTR_SIZE_FIXED(15)] = USTR_BEG_FIXED2 "abcd";
data/ustr-1.0.4/T/ctst_98_pool.c:21: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_spa[1024];
data/ustr-1.0.4/T/ctst_99_64bit.c:16:13:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  if ((fd = mkstemp(ustr_wstr(s2))) == -1)
data/ustr-1.0.4/examples/custr.c:337: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_line[USTR_SIZE_FIXED(160)]; /* enough for two "normal" lines,
data/ustr-1.0.4/examples/custr.c:347:23:  [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).
      else if (!(fp = fopen(argv[scan], "rb")))
data/ustr-1.0.4/examples/custr.c:393: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_args[USTR_SIZE_FIXED(160)]; /* enough for two "normal" lines,
data/ustr-1.0.4/examples/fgrep.c:109:17:  [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 unsigned char fast__off_bad[256];
data/ustr-1.0.4/examples/fgrep.c:183: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_line[USTR_SIZE_FIXED(160)]; /* enough for two "normal" lines,
data/ustr-1.0.4/examples/fgrep.c:225: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 * 1024];
data/ustr-1.0.4/examples/fgrep.c:232:14:  [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).
  if (!(fp = fopen(ustr_cstr(fname), "rb")))
data/ustr-1.0.4/examples/hello_world.c:60: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_out[1024] = USTR_BEG_FIXED2 "Hello";
data/ustr-1.0.4/examples/hexdump.c: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 buf[CONF_READ_SZ * 5]; /* each 16 bytes turns into 70 bytes */
data/ustr-1.0.4/examples/hexdump.c:60: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_line[128]; /* 16 max */
data/ustr-1.0.4/examples/hexdump.c:189:18:  [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 *fp = fopen(argv[scan], "rb");
data/ustr-1.0.4/examples/linecat.c:51: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_line[USTR_SIZE_FIXED(160)]; /* enough for two "normal" lines,
data/ustr-1.0.4/examples/linecat.c:118:18:  [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).
      if (!(fp = fopen(argv[scan], "rb")))
data/ustr-1.0.4/examples/netstr.c:510: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_line[USTR_SIZE_FIXED(160)]; /* enough for two "normal" lines,
data/ustr-1.0.4/examples/netstr.c:520:23:  [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).
      else if (!(fp = fopen(argv[scan], "rb")))
data/ustr-1.0.4/examples/nums.c:75: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 tout_buf[1024];
data/ustr-1.0.4/examples/txt2html.c:88: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_rep[USTR_SIZE_FIXED(40 * 6)] = USTR_BEG_FIXED2 " ";
data/ustr-1.0.4/examples/txt2html.c:151: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_line[USTR_SIZE_FIXED(160)]; /* enough for two "normal" lines,
data/ustr-1.0.4/examples/txt2html.c:182: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 * 1024];
data/ustr-1.0.4/examples/txt2html.c:189:14:  [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).
  if (!(fp = fopen(ustr_cstr(fname), "rb")))
data/ustr-1.0.4/malloc-check.h:366: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(ret, ptr, sz);
data/ustr-1.0.4/perf-sizes.c:80:11:  [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).
    beg = atoi(argv[1]);
data/ustr-1.0.4/perf-sizes.c:81:11:  [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).
    end = atoi(argv[2]);
data/ustr-1.0.4/ustr-b.h:56:12:  [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.
  unsigned char buf[2];
data/ustr-1.0.4/ustr-b.h:66:12:  [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.
  unsigned char buf[4];
data/ustr-1.0.4/ustr-b.h:78:12:  [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.
  unsigned char buf[8];
data/ustr-1.0.4/ustr-b.h:170:12:  [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.
  unsigned char buf[2];
data/ustr-1.0.4/ustr-b.h:182:12:  [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.
  unsigned char buf[4];
data/ustr-1.0.4/ustr-b.h:196:12:  [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.
  unsigned char buf[8];
data/ustr-1.0.4/ustr-fmt-code.h:63: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[USTR__SNPRINTF_LOCAL];
data/ustr-1.0.4/ustr-fmt-code.h:172: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[USTR__SNPRINTF_LOCAL];
data/ustr-1.0.4/ustr-ins-code.h:232: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[USTR__SNPRINTF_LOCAL];
data/ustr-1.0.4/ustr-io-code.h:83:14:  [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 *fp = fopen(name, "rb");
data/ustr-1.0.4/ustr-io-code.h:261:14:  [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 *fp = fopen(name, mode);
data/ustr-1.0.4/ustr-main-code.h:526: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 + len, USTR_END_ALOCDx, sizeof(USTR_END_ALOCDx));
data/ustr-1.0.4/ustr-main-code.h:528: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 + len, USTR_END_FIXEDx, sizeof(USTR_END_FIXEDx));
data/ustr-1.0.4/ustr-main-code.h:535:25:  [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 map_big_pow2[9] = {-1, -1, 0, -1, 1, -1, -1, -1,2};
data/ustr-1.0.4/ustr-main-code.h:536:25:  [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 map_pow2[5] = {0, 1, 2, -1, 3};
data/ustr-1.0.4/ustr-main-code.h:745: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(ustr_wstr(s1) + off, ptr, len);
data/ustr-1.0.4/ustr-main.h:245:11:  [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.
 unsigned char data[1];
data/ustr-1.0.4/ustr-main.h:890:25:  [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 map_big_pow2[4] = {2, 4, 8, 16};
data/ustr-1.0.4/ustr-main.h:891:25:  [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 map_pow2[4] = {0, 1, 2,  4};
data/ustr-1.0.4/ustr-pool-code.h:101: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(ret, old, olen);
data/ustr-1.0.4/ustr-sc-code.h:259: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(ret, ustr_cstr(s1) + pos, len);
data/ustr-1.0.4/ustr-set-code.h:219: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[USTR__SNPRINTF_LOCAL];
data/ustr-1.0.4/ustr-srch-code.h:114:48:  [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.
    return (ustr_srch_chr_fwd(s1, off, ((const char *)val)[0]));
data/ustr-1.0.4/ustr-srch-code.h:141:48:  [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.
    return (ustr_srch_chr_rev(s1, off, ((const char *)val)[0]));
data/ustr-1.0.4/ustr-srch-code.h:431:53:  [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.
    return (ustr_srch_case_chr_fwd(s1, off, ((const char *)val)[0]));
data/ustr-1.0.4/ustr-srch-code.h:459:53:  [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.
    return (ustr_srch_case_chr_rev(s1, off, ((const char *)val)[0]));
data/ustr-1.0.4/ustr-sub-code.h:251: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(ptr, ptr + bpos, blen);
data/ustr-1.0.4/ustr-sub-code.h:357: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[USTR__SNPRINTF_LOCAL];
data/ustr-1.0.4/ustr-sub-code.h:467: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[USTR__SNPRINTF_LOCAL];
data/ustr-1.0.4/T/ctst_3_medium.c:58: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).
  ASSERT(ustr_len(s2) == strlen("s2"));
data/ustr-1.0.4/T/ctst_3_medium.c:436:12:  [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).
    ASSERT(strlen(cstr) == ustr_len(s1));
data/ustr-1.0.4/T/ctst_3_medium.c:444:14:  [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).
      ASSERT(strlen(cstr) == scan);
data/ustr-1.0.4/T/ctst_3_medium.c:453:14:  [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).
      ASSERT(strlen(cstr) == ustr_len(s1) - scan);
data/ustr-1.0.4/T/ctst_3_medium.c:460:12:  [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).
    ASSERT(strlen(cstr) == 3);
data/ustr-1.0.4/T/ctst_3_medium.c:466:12:  [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).
    ASSERT(strlen(cstr) == 0);
data/ustr-1.0.4/T/ctst_98_pool.c:933:12:  [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).
    ASSERT(strlen(cstr) == ustrp_len(sp1));
data/ustr-1.0.4/T/ctst_98_pool.c:941:14:  [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).
      ASSERT(strlen(cstr) == scan);
data/ustr-1.0.4/T/ctst_98_pool.c:951:14:  [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).
      ASSERT(strlen(cstr) == ustrp_len(sp1) - scan);
data/ustr-1.0.4/T/ctst_98_pool.c:958:12:  [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).
    ASSERT(strlen(cstr) == 3);
data/ustr-1.0.4/T/ctst_98_pool.c:964:12:  [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).
    ASSERT(strlen(cstr) == 0);
data/ustr-1.0.4/T/ctst_98_pool.c:978:12:  [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).
    ASSERT(strlen(cstr) == ustrp_len(sp1));
data/ustr-1.0.4/T/ctst_98_pool.c:985:14:  [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).
      ASSERT(strlen(cstr) == scan);
data/ustr-1.0.4/T/ctst_98_pool.c:994:14:  [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).
      ASSERT(strlen(cstr) == ustrp_len(sp1) - scan);
data/ustr-1.0.4/T/ctst_98_pool.c:1000:12:  [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).
    ASSERT(strlen(cstr) == 3);
data/ustr-1.0.4/T/ctst_98_pool.c:1005:12:  [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).
    ASSERT(strlen(cstr) == 0);
data/ustr-1.0.4/T/tst_2_small.c:15: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).
  ASSERT(ustr_len(s2) == strlen("s2"));
data/ustr-1.0.4/T/tst_2_small.c:21: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).
  ASSERT(ustr_len(s2) == strlen("s2"));
data/ustr-1.0.4/T/tst_6_tiny.c:13: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).
  ASSERT(ustr_len(s2) == strlen("s2"));
data/ustr-1.0.4/examples/custr.c:383:45:  [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).
      Ustr *arg = gen_custr_buf(argv[scan], strlen(argv[scan]));
data/ustr-1.0.4/examples/fgrep.c:14: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).
# define _D_EXACT_NAMLEN(d) strlen((d)->d_name)
data/ustr-1.0.4/examples/txt2html.c:41: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).
# define _D_EXACT_NAMLEN(d) strlen((d)->d_name)
data/ustr-1.0.4/examples/txt2html.c:113: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).
      spcs_off = spcs_pos + (spcs_len * strlen(" ")) - 1;
data/ustr-1.0.4/examples/txt2html.c:115:14:  [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).
      rep *= strlen(" ");
data/ustr-1.0.4/ustr-cmp.h:243:32:  [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 (ustr_cmp_buf(s1, s2, strlen(s2))); }
data/ustr-1.0.4/ustr-cmp.h:245:37:  [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 (ustr_cmp_fast_buf(s1, s2, strlen(s2))); }
data/ustr-1.0.4/ustr-cmp.h:248:37:  [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 (ustr_cmp_case_buf(s1, s2, strlen(s2))); }
data/ustr-1.0.4/ustr-cmp.h:260: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).
{ return (!ustr_cmp_fast_buf(s1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-cmp.h:288:16:  [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 len = strlen(cstr);
data/ustr-1.0.4/ustr-cmp.h:305:44:  [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 (ustr_cmp_prefix_buf_eq(s1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-cmp.h:319:49:  [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 (ustr_cmp_case_prefix_buf_eq(s1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-cmp.h:333:44:  [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 (ustr_cmp_suffix_buf_eq(s1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-cmp.h:347:49:  [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 (ustr_cmp_case_suffix_buf_eq(s1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-cmp.h:516:33:  [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 (ustrp_cmp_buf(s1, s2, strlen(s2))); }
data/ustr-1.0.4/ustr-cmp.h:530:38:  [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 (ustrp_cmp_fast_buf(s1, s2, strlen(s2))); }
data/ustr-1.0.4/ustr-cmp.h:543:38:  [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 (ustrp_cmp_case_buf(s1, s2, strlen(s2))); }
data/ustr-1.0.4/ustr-cmp.h:557: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).
{ return (!ustrp_cmp_fast_buf(s1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-cmp.h:571:46:  [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 (ustr_cmp_case_buf_eq(&s1->s, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-cmp.h:585:45:  [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 (ustrp_cmp_prefix_buf_eq(s1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-cmp.h:599:50:  [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 (ustrp_cmp_case_prefix_buf_eq(s1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-cmp.h:613:45:  [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 (ustrp_cmp_suffix_buf_eq(s1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-cmp.h:627:50:  [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 (ustrp_cmp_case_suffix_buf_eq(s1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-ins.h:93:34:  [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 (ustr_ins_buf(s1, p, c, strlen(c))); }
data/ustr-1.0.4/ustr-ins.h:96:38:  [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 (ustrp_ins_buf(x, s1, p, c, strlen(c))); }
data/ustr-1.0.4/ustr-io-code.h:115:27:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
# define USTR__IO_GETC(x) getc(x)
data/ustr-1.0.4/ustr-main.h:942:39:  [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 (ustrp_add_buf(p, ps1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-main.h:945:35:  [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 (ustr_add_buf(ps1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-main.h:950:48:  [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 (ustrp_dupx_buf(p, sz, rb, ex, me, c, strlen(c))); }
data/ustr-1.0.4/ustr-main.h:953:34:  [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 (ustrp_dup_buf(p, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-main.h:957:44:  [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 (ustr_dupx_buf(sz, rb, ex, me, c, strlen(c))); }
data/ustr-1.0.4/ustr-main.h:959: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).
{ return (ustr_dup_buf(cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-parse-code.h:146:17:  [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 slen = strlen(sep);
data/ustr-1.0.4/ustr-replace.h:54: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).
{ return (ustrp_replace_buf(p, s1, oc, strlen(oc), nc, strlen(nc), lim)); }
data/ustr-1.0.4/ustr-replace.h:54: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).
{ return (ustrp_replace_buf(p, s1, oc, strlen(oc), nc, strlen(nc), lim)); }
data/ustr-1.0.4/ustr-replace.h:58:36:  [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 (ustr_replace_buf(s1, oc, strlen(oc), nc, strlen(nc), lim)); }
data/ustr-1.0.4/ustr-replace.h:58:52:  [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 (ustr_replace_buf(s1, oc, strlen(oc), nc, strlen(nc), lim)); }
data/ustr-1.0.4/ustr-sc.h:214: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).
{ return (ustr_sc_ltrim_chrs(ps1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-sc.h:219: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).
{ return (ustr_sc_rtrim_chrs(ps1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-sc.h:224: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).
{ return (ustr_sc_trim_chrs(ps1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-sc.h:231:42:  [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 (ustrp_sc_ltrim_chrs(p, ps1, c, strlen(c))); }
data/ustr-1.0.4/ustr-sc.h:238:42:  [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 (ustrp_sc_rtrim_chrs(p, ps1, c, strlen(c))); }
data/ustr-1.0.4/ustr-sc.h:245: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).
{ return (ustrp_sc_trim_chrs(p, ps1, c, strlen(c))); }
data/ustr-1.0.4/ustr-set.h:94:35:  [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 (ustr_set_buf(ps1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-set.h:98:39:  [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 (ustrp_set_buf(p, ps1, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-split.h:83: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).
{ return (ustr_split_buf(s1, off, cstr, strlen(cstr), ret, flags)); }
data/ustr-1.0.4/ustr-split.h:88:46:  [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 (ustrp_split_buf(p, sp1, off, cstr, strlen(cstr), ret, flgs)); }
data/ustr-1.0.4/ustr-split.h:94:46:  [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 (ustr_split_spn_chrs(s1, off, cstr, strlen(cstr), ret, flags)); }
data/ustr-1.0.4/ustr-split.h:99:51:  [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 (ustrp_split_spn_chrs(p, sp1, off, cstr, strlen(cstr), ret, flgs)); }
data/ustr-1.0.4/ustr-spn.h:131:44:  [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 (ustr_spn_chrs_fwd(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-spn.h:134:44:  [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 (ustr_spn_chrs_rev(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-spn.h:138:45:  [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 (ustr_cspn_chrs_fwd(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-spn.h:141:45:  [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 (ustr_cspn_chrs_rev(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-spn.h:160:49:  [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 (ustr_utf8_spn_chrs_fwd(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-spn.h:163:49:  [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 (ustr_utf8_spn_chrs_rev(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-spn.h:167:50:  [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 (ustr_utf8_cspn_chrs_fwd(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-spn.h:170:50:  [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 (ustr_utf8_cspn_chrs_rev(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-spn.h:326:45:  [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 (ustrp_spn_chrs_fwd(s1, off, chrs, strlen(chrs))); }
data/ustr-1.0.4/ustr-spn.h:329:45:  [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 (ustrp_spn_chrs_rev(s1, off, chrs, strlen(chrs))); }
data/ustr-1.0.4/ustr-spn.h:351:46:  [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 (ustrp_cspn_chrs_fwd(s1, off, chrs, strlen(chrs))); }
data/ustr-1.0.4/ustr-spn.h:354:46:  [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 (ustrp_cspn_chrs_rev(s1, off, chrs, strlen(chrs))); }
data/ustr-1.0.4/ustr-spn.h:373:50:  [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 (ustrp_utf8_spn_chrs_fwd(s1, off, chrs, strlen(chrs))); }
data/ustr-1.0.4/ustr-spn.h:376:50:  [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 (ustrp_utf8_spn_chrs_rev(s1, off, chrs, strlen(chrs))); }
data/ustr-1.0.4/ustr-spn.h:394:51:  [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 (ustrp_utf8_cspn_chrs_fwd(s1, off, chrs, strlen(chrs))); }
data/ustr-1.0.4/ustr-spn.h:397:51:  [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 (ustrp_utf8_cspn_chrs_rev(s1, off, chrs, strlen(chrs))); }
data/ustr-1.0.4/ustr-srch.h:140:44:  [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 (ustr_srch_buf_fwd(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-srch.h:143:44:  [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 (ustr_srch_buf_rev(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-srch.h:155:47:  [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 (ustr_srch_case_buf_fwd(s1, o, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-srch.h:158:47:  [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 (ustr_srch_case_buf_rev(s1, o, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-srch.h:299:45:  [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 (ustrp_srch_buf_fwd(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-srch.h:302:45:  [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 (ustrp_srch_buf_rev(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-srch.h:349:50:  [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 (ustrp_srch_case_buf_fwd(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-srch.h:353:50:  [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 (ustrp_srch_case_buf_rev(s1, off, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-sub.h:181:34:  [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 (ustr_sub_buf(s1, p, c, strlen(c))); }
data/ustr-1.0.4/ustr-sub.h:184:47:  [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 (ustr_sc_sub_buf(s1, pos, len, cstr, strlen(cstr))); }
data/ustr-1.0.4/ustr-sub.h:188:38:  [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 (ustrp_sub_buf(x, s1, p, c, strlen(c))); }
data/ustr-1.0.4/ustr-sub.h:192:51:  [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 (ustrp_sc_sub_buf(p, s1, pos, len, cstr, strlen(cstr))); }

ANALYSIS SUMMARY:

Hits = 173
Lines analyzed = 23467 in approximately 0.64 seconds (36758 lines/second)
Physical Source Lines of Code (SLOC) = 19021
Hits@level = [0]  46 [1]  96 [2]  59 [3]   7 [4]  11 [5]   0
Hits@level+ = [0+] 219 [1+] 173 [2+]  77 [3+]  18 [4+]  11 [5+]   0
Hits/KSLOC@level+ = [0+] 11.5136 [1+] 9.09521 [2+] 4.04816 [3+] 0.946322 [4+] 0.578308 [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.