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/jansson-2.13.1/src/hashtable.h
Examining data/jansson-2.13.1/src/dump.c
Examining data/jansson-2.13.1/src/jansson_private.h
Examining data/jansson-2.13.1/src/version.c
Examining data/jansson-2.13.1/src/lookup3.h
Examining data/jansson-2.13.1/src/jansson.h
Examining data/jansson-2.13.1/src/value.c
Examining data/jansson-2.13.1/src/hashtable.c
Examining data/jansson-2.13.1/src/utf.c
Examining data/jansson-2.13.1/src/memory.c
Examining data/jansson-2.13.1/src/pack_unpack.c
Examining data/jansson-2.13.1/src/error.c
Examining data/jansson-2.13.1/src/strbuffer.c
Examining data/jansson-2.13.1/src/utf.h
Examining data/jansson-2.13.1/src/load.c
Examining data/jansson-2.13.1/src/strbuffer.h
Examining data/jansson-2.13.1/src/strconv.c
Examining data/jansson-2.13.1/src/hashtable_seed.c
Examining data/jansson-2.13.1/test/ossfuzz/json_load_dump_fuzzer.cc
Examining data/jansson-2.13.1/test/ossfuzz/testinput.h
Examining data/jansson-2.13.1/test/ossfuzz/standaloneengine.cc
Examining data/jansson-2.13.1/test/suites/api/test_memory_funcs.c
Examining data/jansson-2.13.1/test/suites/api/test_simple.c
Examining data/jansson-2.13.1/test/suites/api/test_equal.c
Examining data/jansson-2.13.1/test/suites/api/test_unpack.c
Examining data/jansson-2.13.1/test/suites/api/test_object.c
Examining data/jansson-2.13.1/test/suites/api/test_dump.c
Examining data/jansson-2.13.1/test/suites/api/test_load_callback.c
Examining data/jansson-2.13.1/test/suites/api/test_version.c
Examining data/jansson-2.13.1/test/suites/api/test_chaos.c
Examining data/jansson-2.13.1/test/suites/api/test_load.c
Examining data/jansson-2.13.1/test/suites/api/test_sprintf.c
Examining data/jansson-2.13.1/test/suites/api/test_loadb.c
Examining data/jansson-2.13.1/test/suites/api/test_copy.c
Examining data/jansson-2.13.1/test/suites/api/test_pack.c
Examining data/jansson-2.13.1/test/suites/api/util.h
Examining data/jansson-2.13.1/test/suites/api/test_dump_callback.c
Examining data/jansson-2.13.1/test/suites/api/test_number.c
Examining data/jansson-2.13.1/test/suites/api/test_array.c
Examining data/jansson-2.13.1/test/bin/json_process.c
Examining data/jansson-2.13.1/android/jansson_config.h
Examining data/jansson-2.13.1/doc/github_commits.c
Examining data/jansson-2.13.1/examples/simple_parse.c

FINAL RESULTS:

data/jansson-2.13.1/doc/github_commits.c:122: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(url, URL_SIZE, URL_FORMAT, argv[1], argv[2]);
data/jansson-2.13.1/src/dump.c:225:20:  [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.
            size = snprintf(buffer, MAX_INTEGER_STR_LENGTH, "%" JSON_INTEGER_FORMAT,
data/jansson-2.13.1/src/error.c:56:5:  [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(error->text, JSON_ERROR_TEXT_LENGTH - 1, msg, ap);
data/jansson-2.13.1/src/jansson.h:310:47:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    JANSSON_ATTRS((warn_unused_result, format(printf, 1, 2)));
data/jansson-2.13.1/src/jansson.h:312:47:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    JANSSON_ATTRS((warn_unused_result, format(printf, 1, 0)));
data/jansson-2.13.1/src/jansson_private.h:101:14:  [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.
    !defined(snprintf) /* snprintf not defined yet & not introduced */
data/jansson-2.13.1/src/jansson_private.h:102: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/jansson-2.13.1/src/jansson_private.h:102: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/jansson-2.13.1/src/jansson_private.h:105:14:  [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.
    !defined(vsnprintf) /* vsnprintf not defined yet & not introduced */
data/jansson-2.13.1/src/jansson_private.h:106:9:  [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 vsnprintf(b, c, f, a) _vsnprintf(b, c, f, a)
data/jansson-2.13.1/src/jansson_private.h:109: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/jansson-2.13.1/src/jansson_private.h:109:19:  [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/jansson-2.13.1/src/jansson_private.h:110:9:  [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 vsnprintf _vsnprintf
data/jansson-2.13.1/src/load.c:99:5:  [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(msg_text, JSON_ERROR_TEXT_LENGTH, msg, ap);
data/jansson-2.13.1/src/value.c:799:14:  [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.
    length = vsnprintf(NULL, 0, fmt, ap);
data/jansson-2.13.1/src/value.c:809:5:  [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(buf, length + 1, fmt, aq);
data/jansson-2.13.1/test/bin/json_process.c:126:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(filename, "%s%c%s", path, dir_sep, fname);
data/jansson-2.13.1/test/bin/json_process.c:160:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(filename, "%s%cinput", test_path, dir_sep);
data/jansson-2.13.1/test/bin/json_process.c:166:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(filename, "%s%cenv", test_path, dir_sep);
data/jansson-2.13.1/test/bin/json_process.c:215:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(errstr, "%d %d %d\n%s\n", error.line, error.column, error.position,
data/jansson-2.13.1/test/ossfuzz/json_load_dump_fuzzer.cc:13:11:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
          fprintf(stderr, FMT, ##__VA_ARGS__);                                \
data/jansson-2.13.1/test/bin/json_process.c:234:13:  [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.
    value = getenv(name);
data/jansson-2.13.1/test/bin/json_process.c:284:9:  [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.
    if (getenv("HASHSEED"))
data/jansson-2.13.1/test/ossfuzz/json_load_dump_fuzzer.cc:37:19:  [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.
  enable_diags = (getenv("FUZZ_VERBOSE") != NULL);
data/jansson-2.13.1/doc/github_commits.c:42: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(result->data + result->pos, ptr, size * nmemb);
data/jansson-2.13.1/doc/github_commits.c:111: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 url[URL_SIZE];
data/jansson-2.13.1/examples/simple_parse.c:180: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 line[MAX_CHARS];
data/jansson-2.13.1/src/dump.c:46: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(&buf->data[buf->used], buffer, size);
data/jansson-2.13.1/src/dump.c:106:9:  [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 seq[13];
data/jansson-2.13.1/src/dump.c:222:13:  [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[MAX_INTEGER_STR_LENGTH];
data/jansson-2.13.1/src/dump.c:234:13:  [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[MAX_REAL_STR_LENGTH];
data/jansson-2.13.1/src/dump.c:255:13:  [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 key[2 + (sizeof(json) * 2) + 1];
data/jansson-2.13.1/src/dump.c:295:13:  [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 loop_key[LOOP_KEY_LEN];
data/jansson-2.13.1/src/dump.c:441:20:  [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 *output = fopen(path, "w");
data/jansson-2.13.1/src/error.c:28: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(error->source, "...", 3);
data/jansson-2.13.1/src/hashtable.h:27: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 key[1];
data/jansson-2.13.1/src/hashtable_seed.c:63: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 data[sizeof(uint32_t)];
data/jansson-2.13.1/src/hashtable_seed.c:68:15:  [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).
    urandom = open("/dev/urandom", O_RDONLY);
data/jansson-2.13.1/src/hashtable_seed.c:77:15:  [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).
    urandom = fopen("/dev/urandom", "rb");
data/jansson-2.13.1/src/jansson.h:156: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 source[JSON_ERROR_SOURCE_LENGTH];
data/jansson-2.13.1/src/jansson.h:157: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 text[JSON_ERROR_TEXT_LENGTH];
data/jansson-2.13.1/src/jansson_private.h:31:23:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define va_copy(a, b) memcpy(&(a), &(b), sizeof(va_list))
data/jansson-2.13.1/src/load.c:57: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[5];
data/jansson-2.13.1/src/load.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 msg_text[JSON_ERROR_TEXT_LENGTH];
data/jansson-2.13.1/src/load.c:89: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 msg_with_context[JSON_ERROR_TEXT_LENGTH];
data/jansson-2.13.1/src/load.c:1042:10:  [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(path, "rb");
data/jansson-2.13.1/src/load.c:1058: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 data[MAX_BUF_LEN];
data/jansson-2.13.1/src/memory.c:46: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(new_str, str, len);
data/jansson-2.13.1/src/strbuffer.c:77: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(new_value, strbuff->value, strbuff->length);
data/jansson-2.13.1/src/strbuffer.c:84: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(strbuff->value + strbuff->length, data, size);
data/jansson-2.13.1/src/value.c:204: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 loop_key[LOOP_KEY_LEN];
data/jansson-2.13.1/src/value.c:342: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 loop_key[LOOP_KEY_LEN];
data/jansson-2.13.1/src/value.c:452: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[dpos], &src[spos], count * sizeof(json_t *));
data/jansson-2.13.1/src/value.c:635: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 loop_key[LOOP_KEY_LEN];
data/jansson-2.13.1/test/bin/json_process.c:97:27:  [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).
            conf.indent = atoi(val);
data/jansson-2.13.1/test/bin/json_process.c:99:28:  [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).
            conf.compact = atoi(val);
data/jansson-2.13.1/test/bin/json_process.c:101:33:  [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).
            conf.ensure_ascii = atoi(val);
data/jansson-2.13.1/test/bin/json_process.c:103:35:  [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).
            conf.preserve_order = atoi(val);
data/jansson-2.13.1/test/bin/json_process.c:105:30:  [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).
            conf.sort_keys = atoi(val);
data/jansson-2.13.1/test/bin/json_process.c:107:30:  [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).
            conf.precision = atoi(val);
data/jansson-2.13.1/test/bin/json_process.c:109:26:  [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).
            conf.strip = atoi(val);
data/jansson-2.13.1/test/bin/json_process.c:112:29:  [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).
            conf.hashseed = atoi(val);
data/jansson-2.13.1/test/bin/json_process.c:122: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 filename[1024], *buffer;
data/jansson-2.13.1/test/bin/json_process.c:127: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).
    file = fopen(filename, "rb");
data/jansson-2.13.1/test/bin/json_process.c:130:13:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            strcat(filename, ".strip");
data/jansson-2.13.1/test/bin/json_process.c:132:13:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            strcat(filename, ".normal");
data/jansson-2.13.1/test/bin/json_process.c:133:16:  [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(filename, "rb");
data/jansson-2.13.1/test/bin/json_process.c:154: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 filename[1024], errstr[1024];
data/jansson-2.13.1/test/bin/json_process.c:161:20:  [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 (!(infile = fopen(filename, "rb"))) {
data/jansson-2.13.1/test/bin/json_process.c:167:16:  [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).
    conffile = fopen(filename, "rb");
data/jansson-2.13.1/test/ossfuzz/standaloneengine.cc:22: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).
    infile = fopen(argv[ii], "rb");
data/jansson-2.13.1/test/suites/api/test_chaos.c:146:9:  [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 testkey[10];
data/jansson-2.13.1/test/suites/api/test_dump.c:226: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[2];
data/jansson-2.13.1/test/suites/api/test_dump_callback.c:24: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(s->buf + s->off, buffer, len);
data/jansson-2.13.1/test/suites/api/test_load.c:117: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 big[311];
data/jansson-2.13.1/test/suites/api/test_load_callback.c:26: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(buf, s->buf + s->off, buflen);
data/jansson-2.13.1/test/suites/api/test_memory_funcs.c:22: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 key[4];
data/jansson-2.13.1/test/suites/api/test_object.c:149: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[2];
data/jansson-2.13.1/test/suites/api/test_pack.c:56: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[4] = {'t', 'e', 's', 't'};
data/jansson-2.13.1/doc/github_commits.c:24: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).
        return strlen(text);
data/jansson-2.13.1/src/dump.c:347: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).
                    dump_string(key, strlen(key), dump, data, flags);
data/jansson-2.13.1/src/dump.c:376: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).
                    dump_string(key, strlen(key), dump, data, flags);
data/jansson-2.13.1/src/error.c:23: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).
    length = strlen(source);
data/jansson-2.13.1/src/error.c:25:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(error->source, source, length + 1);
data/jansson-2.13.1/src/error.c:29:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(error->source + 3, source + extra, length - extra + 1);
data/jansson-2.13.1/src/hashtable.c:38:64:  [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 hash_str(key)               ((size_t)hashlittle((key), strlen(key), hashtable_seed))
data/jansson-2.13.1/src/hashtable.c:219: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).
        size_t len = strlen(key);
data/jansson-2.13.1/src/hashtable.c:230:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(pair->key, key, len + 1);
data/jansson-2.13.1/src/hashtable_seed.c:72:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ok = read(urandom, data, sizeof(uint32_t)) == sizeof(uint32_t);
data/jansson-2.13.1/src/load.c:985:34:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (lex_init(&lex, (get_func)fgetc, flags, input))
data/jansson-2.13.1/src/load.c:997:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(*fd, &c, 1) == 1)
data/jansson-2.13.1/src/memory.c:37:65:  [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).
char *jsonp_strdup(const char *str) { return jsonp_strndup(str, strlen(str)); }
data/jansson-2.13.1/src/pack_unpack.c:143: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).
        length = strlen(str);
data/jansson-2.13.1/src/pack_unpack.c:181: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).
            length = s->has_error ? 0 : strlen(str);
data/jansson-2.13.1/src/pack_unpack.c:577:77:  [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).
                            strbuffer_append_bytes(&unrecognized_keys, key, strlen(key));
data/jansson-2.13.1/src/value.c:126: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).
    if (!key || !utf8_check_string(key, strlen(key))) {
data/jansson-2.13.1/src/value.c:692: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 string_create(value, strlen(value), 0);
data/jansson-2.13.1/src/value.c:708: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 json_stringn(value, strlen(value));
data/jansson-2.13.1/src/value.c:736: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 json_string_setn_nocheck(json, value, strlen(value));
data/jansson-2.13.1/src/value.c:762: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 json_string_setn(json, value, strlen(value));
data/jansson-2.13.1/test/bin/json_process.c:55: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).
    length = strlen(result);
data/jansson-2.13.1/test/suites/api/test_chaos.c:139: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).
    chaos_loop_new_value(json, json_loadb(JSON_LOAD_TXT, strlen(JSON_LOAD_TXT), 0, NULL));
data/jansson-2.13.1/test/suites/api/test_dump.c:286: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).
        psize = strlen(plain) - 2;
data/jansson-2.13.1/test/suites/api/test_dump_callback.c:47:13:  [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).
    s.cap = strlen(dumped_to_string);
data/jansson-2.13.1/test/suites/api/test_load.c:213:9:  [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(error.text) >= JSON_ERROR_TEXT_LENGTH)
data/jansson-2.13.1/test/suites/api/test_load.c:221:9:  [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(error.text) >= JSON_ERROR_TEXT_LENGTH)
data/jansson-2.13.1/test/suites/api/test_load_callback.c:40:13:  [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).
    s.cap = strlen(my_str);
data/jansson-2.13.1/test/suites/api/test_load_callback.c:50:13:  [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).
    s.cap = strlen(my_str) - 1;
data/jansson-2.13.1/test/suites/api/test_loadb.c:16: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).
    size_t len = strlen(str) - strlen("garbage");
data/jansson-2.13.1/test/suites/api/test_loadb.c:16: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).
    size_t len = strlen(str) - strlen("garbage");
data/jansson-2.13.1/test/suites/api/test_object.c:161: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).
    for (i = 0; i < strlen(keys); i++) {

ANALYSIS SUMMARY:

Hits = 111
Lines analyzed = 11278 in approximately 2.63 seconds (4294 lines/second)
Physical Source Lines of Code (SLOC) = 8162
Hits@level = [0]  67 [1]  32 [2]  55 [3]   3 [4]  21 [5]   0
Hits@level+ = [0+] 178 [1+] 111 [2+]  79 [3+]  24 [4+]  21 [5+]   0
Hits/KSLOC@level+ = [0+] 21.8084 [1+] 13.5996 [2+] 9.679 [3+] 2.94046 [4+] 2.5729 [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.