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/axc-0.3.3/src/axc.c
Examining data/axc-0.3.3/src/axc.h
Examining data/axc-0.3.3/src/axc_crypto.c
Examining data/axc-0.3.3/src/axc_crypto.h
Examining data/axc-0.3.3/src/axc_store.c
Examining data/axc-0.3.3/src/axc_store.h
Examining data/axc-0.3.3/src/message_client.c
Examining data/axc-0.3.3/test/test_client.c
Examining data/axc-0.3.3/test/test_store.c

FINAL RESULTS:

data/axc-0.3.3/src/axc.c:292:18:  [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_t len = vsnprintf((void *) 0, 0, format, args) + 1;
data/axc-0.3.3/src/axc.c:297:24:  [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_t final_len = vsnprintf(msg, len, format, args_cpy);
data/axc-0.3.3/test/test_client.c:210:24:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  assert_int_not_equal(sprintf(stmt, "SELECT count(*) FROM identity_key_store WHERE name IS '%s';", OWN_PUBLIC_KEY_NAME), 0);
data/axc-0.3.3/test/test_client.c:218:24:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  assert_int_not_equal(sprintf(stmt, "SELECT count(*) FROM identity_key_store WHERE name IS '%s';", OWN_PRIVATE_KEY_NAME), 0);
data/axc-0.3.3/test/test_client.c:224:24:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  assert_int_not_equal(sprintf(stmt, "SELECT count(*) FROM settings WHERE name IS '%s';", REG_ID_NAME), 0);
data/axc-0.3.3/test/test_store.c:84:20:  [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.
  assert_int_equal(access(AXC_DB_DEFAULT_FN, F_OK), 0);
data/axc-0.3.3/test/test_store.c:94:20:  [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.
  assert_int_equal(access(db_filename, F_OK), 0);
data/axc-0.3.3/test/test_store.c:681:24:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  assert_int_not_equal(sprintf(stmt, "DELETE FROM identity_key_store WHERE name IS '%s';", OWN_PRIVATE_KEY_NAME), 0);
data/axc-0.3.3/src/axc.c:295: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[len];
data/axc-0.3.3/src/axc_crypto.c:365: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(pt_p, plaintext_p, plaintext_len);
data/axc-0.3.3/test/test_client.c:209: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 stmt[100];
data/axc-0.3.3/test/test_client.c:230:24:  [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.
  assert_int_not_equal(sprintf(stmt, "SELECT count(*) FROM pre_key_store;"), 0);
data/axc-0.3.3/test/test_client.c:236:24:  [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.
  assert_int_not_equal(sprintf(stmt, "SELECT count(*) FROM signed_pre_key_store;"), 0);
data/axc-0.3.3/test/test_store.c:518: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 stmt[100];
data/axc-0.3.3/test/test_store.c:531:24:  [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.
  assert_int_not_equal(sprintf(stmt, "SELECT count(*) FROM pre_key_store;"), 0);
data/axc-0.3.3/test/test_store.c:544:24:  [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.
  assert_int_not_equal(sprintf(stmt, "SELECT * FROM pre_key_store WHERE id IS %i;", session_pre_key_get_id(pre_key_p)), 0);
data/axc-0.3.3/test/test_store.c:680: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 stmt[100];
data/axc-0.3.3/src/axc.c:956:110:  [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).
  ret_val = signal_protocol_session_get_sub_device_sessions(ctx_p->axolotl_store_context_p, &sess_l_p, name, strlen(name));
data/axc-0.3.3/src/axc.c:1059: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).
  axc_address addr = {.name = user, .name_len = strlen(user), .device_id = device_id};
data/axc-0.3.3/src/axc.c:1186: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).
  axc_address addr = {.name = name, .name_len = strlen(name), .device_id = device_id};
data/axc-0.3.3/src/message_client.c:36: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).
  if (axc_context_set_db_fn(ctx_a_p, db_a_fn, strlen(db_a_fn))) {
data/axc-0.3.3/src/message_client.c:63: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).
  if (axc_context_set_db_fn(ctx_b_p, db_b_fn, strlen(db_b_fn))) {
data/axc-0.3.3/src/message_client.c:133: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).
    axc_buf * msg_p = axc_buf_create((uint8_t *) line, strlen(line) + 1);
data/axc-0.3.3/src/message_client.c:159: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).
    for (size_t i = 0; i < strlen(upper); i++) {
data/axc-0.3.3/src/message_client.c:164:61:  [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).
    axc_buf * upper_buf = axc_buf_create((uint8_t *) upper, strlen(upper) + 1);
data/axc-0.3.3/test/test_client.c:53: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).
  assert_int_equal(axc_context_set_db_fn(ctx_global_p, test_fn, strlen(test_fn)), 0);
data/axc-0.3.3/test/test_client.c:77:57:  [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_int_equal(axc_context_set_db_fn(ctx_a_p, a_fn, strlen(a_fn)), 0);
data/axc-0.3.3/test/test_client.c:78:57:  [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_int_equal(axc_context_set_db_fn(ctx_b_p, b_fn, strlen(b_fn)), 0);
data/axc-0.3.3/test/test_client.c:113: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).
  axc_buf * msg_buf_p = axc_buf_create("hello", strlen("hello") + 1);
data/axc-0.3.3/test/test_client.c:162: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).
  assert_int_equal(axc_context_set_db_fn(ctx_global_p, test_fn, strlen(test_fn)), 0);
data/axc-0.3.3/test/test_client.c:373: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).
  axc_buf * msg_buf_p = axc_buf_create("hello", strlen("hello") + 1);
data/axc-0.3.3/test/test_client.c:438:70:  [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).
  axc_buf * test_msg_data_p = axc_buf_create((uint8_t *) test_msg_p, strlen(test_msg_p) + 1);
data/axc-0.3.3/test/test_client.c:517: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).
  axc_buf * msg_buf_p = axc_buf_create("hello", strlen("hello") + 1);
data/axc-0.3.3/test/test_client.c:528: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).
  axc_address addr_alice = {.name = "alice", .name_len = strlen("alice"), .device_id = alice_id};
data/axc-0.3.3/test/test_client.c:541:43:  [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).
  msg_buf_p = axc_buf_create("hello 234", strlen("hello 234") + 1);
data/axc-0.3.3/test/test_store.c:45:69:  [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_int_equal(axc_context_set_db_fn(ctx_global_p, db_filename, strlen(db_filename)), 0);
data/axc-0.3.3/test/test_store.c:338: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).
  assert_int_equal(sqlite3_column_int(pstmt_p, 1), strlen(addr_alice_42.name));
data/axc-0.3.3/test/test_store.c:395:66:  [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_int_equal(axc_context_set_db_fn(ctx_a_p, a_db_filename, strlen(a_db_filename)), 0);
data/axc-0.3.3/test/test_store.c:396:66:  [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_int_equal(axc_context_set_db_fn(ctx_b_p, b_db_filename, strlen(b_db_filename)), 0);
data/axc-0.3.3/test/test_store.c:421: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).
  axc_buf * msg_buf_p = axc_buf_create("hello", strlen("hello") + 1);
data/axc-0.3.3/test/test_store.c:522:62:  [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_int_equal(axc_context_set_db_fn(ctx_p, db_filename, strlen(db_filename)), 0);
data/axc-0.3.3/test/test_store.c:641:62:  [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_int_equal(axc_context_set_db_fn(ctx_p, db_filename, strlen(db_filename)), 0);
data/axc-0.3.3/test/test_store.c:676:62:  [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_int_equal(axc_context_set_db_fn(ctx_p, db_filename, strlen(db_filename)), 0);

ANALYSIS SUMMARY:

Hits = 43
Lines analyzed = 5174 in approximately 0.15 seconds (35475 lines/second)
Physical Source Lines of Code (SLOC) = 3734
Hits@level = [0]  50 [1]  26 [2]   9 [3]   0 [4]   8 [5]   0
Hits@level+ = [0+]  93 [1+]  43 [2+]  17 [3+]   8 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 24.9063 [1+] 11.5158 [2+] 4.55276 [3+] 2.14247 [4+] 2.14247 [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.