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/libmaxminddb-1.3.2/bin/mmdblookup.c
Examining data/libmaxminddb-1.3.2/include/maxminddb.h
Examining data/libmaxminddb-1.3.2/projects/VS12/maxminddb_config.h
Examining data/libmaxminddb-1.3.2/src/data-pool.c
Examining data/libmaxminddb-1.3.2/src/data-pool.h
Examining data/libmaxminddb-1.3.2/src/maxminddb-compat-util.h
Examining data/libmaxminddb-1.3.2/src/maxminddb.c
Examining data/libmaxminddb-1.3.2/t/bad_databases_t.c
Examining data/libmaxminddb-1.3.2/t/bad_pointers_t.c
Examining data/libmaxminddb-1.3.2/t/basic_lookup_t.c
Examining data/libmaxminddb-1.3.2/t/data-pool-t.c
Examining data/libmaxminddb-1.3.2/t/data_entry_list_t.c
Examining data/libmaxminddb-1.3.2/t/data_types_t.c
Examining data/libmaxminddb-1.3.2/t/dump_t.c
Examining data/libmaxminddb-1.3.2/t/get_value_pointer_bug_t.c
Examining data/libmaxminddb-1.3.2/t/get_value_t.c
Examining data/libmaxminddb-1.3.2/t/ipv4_start_cache_t.c
Examining data/libmaxminddb-1.3.2/t/ipv6_lookup_in_ipv4_t.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/cmp_mem.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/cmpok.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/diag.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/diesok.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/is.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/like.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/simple.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/skip.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/synopsis.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/test.c
Examining data/libmaxminddb-1.3.2/t/libtap/t/todo.c
Examining data/libmaxminddb-1.3.2/t/libtap/tap.c
Examining data/libmaxminddb-1.3.2/t/libtap/tap.h
Examining data/libmaxminddb-1.3.2/t/maxminddb_test_helper.c
Examining data/libmaxminddb-1.3.2/t/maxminddb_test_helper.h
Examining data/libmaxminddb-1.3.2/t/metadata_pointers_t.c
Examining data/libmaxminddb-1.3.2/t/metadata_t.c
Examining data/libmaxminddb-1.3.2/t/no_map_get_value_t.c
Examining data/libmaxminddb-1.3.2/t/read_node_t.c
Examining data/libmaxminddb-1.3.2/t/threads_t.c
Examining data/libmaxminddb-1.3.2/t/version_t.c

FINAL RESULTS:

data/libmaxminddb-1.3.2/bin/mmdblookup.c:18: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/libmaxminddb-1.3.2/bin/mmdblookup.c:18: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/libmaxminddb-1.3.2/bin/mmdblookup.c:174:5:  [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(stdout, usage, program);
data/libmaxminddb-1.3.2/bin/mmdblookup.c:314:5:  [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(stdout, meta_dump,
data/libmaxminddb-1.3.2/src/maxminddb.c:32:24:  [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.
#define DEBUG_MSG(msg) fprintf(stderr, msg "\n")
data/libmaxminddb-1.3.2/src/maxminddb.c:33:30:  [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.
#define DEBUG_MSGF(fmt, ...) fprintf(stderr, fmt "\n", __VA_ARGS__)
data/libmaxminddb-1.3.2/src/maxminddb.c:41:9:  [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 "\n", binary);                      \
data/libmaxminddb-1.3.2/t/libtap/t/test.c:20:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        system(command);
data/libmaxminddb-1.3.2/t/libtap/t/test.c:22:22:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        int retval = system(command);
data/libmaxminddb-1.3.2/t/libtap/tap.c:28:12:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    size = vsnprintf(NULL, 0, fmt, args2) + 2;
data/libmaxminddb-1.3.2/t/libtap/tap.c:34:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(str, fmt, args);
data/libmaxminddb-1.3.2/t/libtap/tap.c:261:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(fmt, args);
data/libmaxminddb-1.3.2/t/maxminddb_test_helper.c:52: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.
        snprintf(filename, 500, filename_fmt, size);
data/libmaxminddb-1.3.2/t/maxminddb_test_helper.c:102:14:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (0 != access(db_file, R_OK)) {
data/libmaxminddb-1.3.2/t/maxminddb_test_helper.h:28: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/libmaxminddb-1.3.2/t/maxminddb_test_helper.h:28: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/libmaxminddb-1.3.2/bin/mmdblookup.c:109:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand( time(NULL) );
data/libmaxminddb-1.3.2/bin/mmdblookup.c:214:24:  [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.
        int opt_char = getopt_long(argc, argv, optstring, options,
data/libmaxminddb-1.3.2/bin/mmdblookup.c:310: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 date[40];
data/libmaxminddb-1.3.2/bin/mmdblookup.c:357:22:  [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 *const fh = fopen(ip_file, "r");
data/libmaxminddb-1.3.2/bin/mmdblookup.c:364: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[1024] = { 0 };
data/libmaxminddb-1.3.2/bin/mmdblookup.c:506: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 ip_address[16];
data/libmaxminddb-1.3.2/bin/mmdblookup.c:684: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 ip_address[16] = { 0 };
data/libmaxminddb-1.3.2/src/maxminddb-compat-util.h:150:2:  [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(copy, str, len);
data/libmaxminddb-1.3.2/src/maxminddb-compat-util.h:163:2:  [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(copy, str, len);
data/libmaxminddb-1.3.2/src/maxminddb.c:382:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int fd = open(mmdb->filename, flags);
data/libmaxminddb-1.3.2/src/maxminddb.c:891:13:  [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(address + 12,
data/libmaxminddb-1.3.2/src/maxminddb.c:1297: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(entry_data, &value, sizeof(MMDB_entry_data_s));
data/libmaxminddb-1.3.2/src/maxminddb.c:1325:13:  [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(entry_data, &value, sizeof(MMDB_entry_data_s));
data/libmaxminddb-1.3.2/src/maxminddb.c:1569:13:  [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(entry_data->uint128 + 16 - size, &mem[offset], size);
data/libmaxminddb-1.3.2/src/maxminddb.c:1800: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(q, p, 4);
data/libmaxminddb-1.3.2/src/maxminddb.c:1819: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(q, p, 8);
data/libmaxminddb-1.3.2/src/maxminddb.c:2121: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[1024];
data/libmaxminddb-1.3.2/src/maxminddb.c:2139:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(hex_string + (2 * i), "%02X", bytes[i]);
data/libmaxminddb-1.3.2/t/bad_databases_t.c:53: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 cwd[500];
data/libmaxminddb-1.3.2/t/basic_lookup_t.c:72: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 desc_suffix[500];
data/libmaxminddb-1.3.2/t/basic_lookup_t.c:109: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.
    const char *pairs[9][2] = {
data/libmaxminddb-1.3.2/t/basic_lookup_t.c:121: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.
    const char *missing[1] = { "2.3.4.5" };
data/libmaxminddb-1.3.2/t/basic_lookup_t.c:129: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.
    const char *pairs[9][2] = {
data/libmaxminddb-1.3.2/t/basic_lookup_t.c:141: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.
    const char *missing[2] = { "2.3.4.5", "::abcd" };
data/libmaxminddb-1.3.2/t/data_entry_list_t.c:53: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(bytes, value->entry_data.bytes, value->entry_data.data_size);
data/libmaxminddb-1.3.2/t/data_entry_list_t.c:260: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 expect[19] =
data/libmaxminddb-1.3.2/t/data_types_t.c:7: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:16: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 expect[19] =
data/libmaxminddb-1.3.2/t/data_types_t.c:25: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:35: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:45: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:56: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:66: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:76: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:87: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:98: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:116: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:126: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:153: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:213: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:224: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:234: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:244: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:256: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:266: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:276: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:287: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:297: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:314: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:324: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 description[500];
data/libmaxminddb-1.3.2/t/data_types_t.c:333: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 description[500];
data/libmaxminddb-1.3.2/t/libtap/t/test.c:18: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 command[1024];
data/libmaxminddb-1.3.2/t/libtap/tap.c:201:49:  [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.
        diag("         got: 0x%02x", ((unsigned char *)got)[offset]);
data/libmaxminddb-1.3.2/t/libtap/tap.c:202:49:  [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.
        diag("    expected: 0x%02x", ((unsigned char *)expected)[offset]);
data/libmaxminddb-1.3.2/t/libtap/tap.c:330: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 errbuf[256];
data/libmaxminddb-1.3.2/t/maxminddb_test_helper.c:38:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  return (char *) memcpy (result, s, len);
data/libmaxminddb-1.3.2/t/maxminddb_test_helper.c:51: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 filename[500];
data/libmaxminddb-1.3.2/t/maxminddb_test_helper.c:54: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 description[14];
data/libmaxminddb-1.3.2/t/maxminddb_test_helper.c:68: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 cwd[500];
data/libmaxminddb-1.3.2/t/threads_t.c:163: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.
    const char *pairs[18][2] = {
data/libmaxminddb-1.3.2/bin/mmdblookup.c:241:28:  [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 *program = alloca(strlen(argv[0]));
data/libmaxminddb-1.3.2/bin/mmdblookup.c:243:53:  [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).
    _splitpath(argv[0], NULL, NULL, NULL, program + strlen(program));
data/libmaxminddb-1.3.2/bin/mmdblookup.c:389: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).
        if (strlen(buf) == 0) {
data/libmaxminddb-1.3.2/src/maxminddb-compat-util.h:147:8:  [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).
	len = strlen(str) + 1;
data/libmaxminddb-1.3.2/src/maxminddb.c:1307:28:  [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 path_elem_len = strlen(path_elem);
data/libmaxminddb-1.3.2/t/basic_lookup_t.c:30: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).
        real_expect = strndup(expect, strlen(expect));
data/libmaxminddb-1.3.2/t/basic_lookup_t.c:34:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int maxlen = strlen(expect) + 3;
data/libmaxminddb-1.3.2/t/maxminddb_test_helper.c:28: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 (s);

ANALYSIS SUMMARY:

Hits = 84
Lines analyzed = 7197 in approximately 0.21 seconds (33871 lines/second)
Physical Source Lines of Code (SLOC) = 5798
Hits@level = [0] 116 [1]   8 [2]  58 [3]   2 [4]  16 [5]   0
Hits@level+ = [0+] 200 [1+]  84 [2+]  76 [3+]  18 [4+]  16 [5+]   0
Hits/KSLOC@level+ = [0+] 34.4947 [1+] 14.4878 [2+] 13.108 [3+] 3.10452 [4+] 2.75957 [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.