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/libstorj-1.0.3/src/bip39.c
Examining data/libstorj-1.0.3/src/bip39.h
Examining data/libstorj-1.0.3/src/bip39_english.h
Examining data/libstorj-1.0.3/src/cli.c
Examining data/libstorj-1.0.3/src/crypto.c
Examining data/libstorj-1.0.3/src/crypto.h
Examining data/libstorj-1.0.3/src/downloader.c
Examining data/libstorj-1.0.3/src/downloader.h
Examining data/libstorj-1.0.3/src/http.c
Examining data/libstorj-1.0.3/src/http.h
Examining data/libstorj-1.0.3/src/rs.c
Examining data/libstorj-1.0.3/src/rs.h
Examining data/libstorj-1.0.3/src/storj.c
Examining data/libstorj-1.0.3/src/storj.h
Examining data/libstorj-1.0.3/src/uploader.c
Examining data/libstorj-1.0.3/src/uploader.h
Examining data/libstorj-1.0.3/src/utils.c
Examining data/libstorj-1.0.3/src/utils.h
Examining data/libstorj-1.0.3/test/mockbridge.c
Examining data/libstorj-1.0.3/test/mockfarmer.c
Examining data/libstorj-1.0.3/test/storjtests.h
Examining data/libstorj-1.0.3/test/tests.c
Examining data/libstorj-1.0.3/test/tests_rs.c

FINAL RESULTS:

data/libstorj-1.0.3/src/bip39.c:78:9:  [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(p, wordlist[idx]);
data/libstorj-1.0.3/src/bip39.c:89:5:  [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(*buffer, mnemo);
data/libstorj-1.0.3/src/cli.c:157:5:  [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(*root_dir, home_dir);
data/libstorj-1.0.3/src/cli.c:166:5:  [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(*user_file, *root_dir);
data/libstorj-1.0.3/src/cli.c:167:5:  [4] (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).
    strcat(*user_file, host);
data/libstorj-1.0.3/src/cli.c:480:12:  [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(access(path, F_OK) != -1 ) {
data/libstorj-1.0.3/src/cli.c:1009:9:  [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 (access(user_file, F_OK) != -1) {
data/libstorj-1.0.3/src/cli.c:1096:17:  [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.
                printf(CLI_VERSION "\n\n");
data/libstorj-1.0.3/src/cli.c:1100:17:  [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.
                printf(HELP_TEXT);
data/libstorj-1.0.3/src/cli.c:1115:9:  [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.
        printf(HELP_TEXT);
data/libstorj-1.0.3/src/cli.c:1255:46:  [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 ((!user || !pass || !mnemonic) && access(user_file, F_OK) != -1) {
data/libstorj-1.0.3/src/cli.c:1263:17:  [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(key, keypass);
data/libstorj-1.0.3/src/downloader.c:101:5:  [4] (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).
    strcat(path, req->bucket_id);
data/libstorj-1.0.3/src/downloader.c:103:5:  [4] (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).
    strcat(path, req->file_id);
data/libstorj-1.0.3/src/downloader.c:104:5:  [4] (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).
    strcat(path, query_args);
data/libstorj-1.0.3/src/downloader.c:500:17:  [4] (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).
                strcat(state->excluded_farmer_ids, pointer->farmer_id);
data/libstorj-1.0.3/src/downloader.c:510:17:  [4] (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).
                strcat(state->excluded_farmer_ids, pointer->farmer_id);
data/libstorj-1.0.3/src/downloader.c:588:5:  [4] (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).
    strcat(path, state->bucket_id);
data/libstorj-1.0.3/src/downloader.c:590:5:  [4] (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).
    strcat(path, state->file_id);
data/libstorj-1.0.3/src/downloader.c:591:5:  [4] (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).
    strcat(path, query_args);
data/libstorj-1.0.3/src/downloader.c:1194:5:  [4] (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).
    strcat(path, req->bucket_id);
data/libstorj-1.0.3/src/downloader.c:1196:5:  [4] (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).
    strcat(path, req->file_id);
data/libstorj-1.0.3/src/http.c:593:9:  [4] (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).
        strcat(user_pass, options->user);
data/libstorj-1.0.3/src/http.c:595:9:  [4] (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).
        strcat(user_pass, pass);
data/libstorj-1.0.3/src/storj.c:428: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.
    int length = vsnprintf(0, 0, format, args_cpy);
data/libstorj-1.0.3/src/storj.c:433:13:  [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 (vsnprintf(message, length + 1, format, args)) {
data/libstorj-1.0.3/src/uploader.c:427:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s%s%s%c", "/buckets/", state->bucket_id, "/files", '\0');
data/libstorj-1.0.3/src/uploader.c:638:17:  [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(state->exclude, shard->pointer->farmer_node_id);
data/libstorj-1.0.3/src/uploader.c:643:17:  [4] (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).
                strcat(state->exclude, shard->pointer->farmer_node_id);
data/libstorj-1.0.3/src/uploader.c:992:5:  [4] (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).
    strcat(resource, state->frame_id);
data/libstorj-1.0.3/src/uploader.c:1043:9:  [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(exclude_list, state->exclude);
data/libstorj-1.0.3/src/uploader.c:1740:5:  [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(req->frame_id, frame_id_str);
data/libstorj-1.0.3/src/uploader.c:2600:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path,
data/libstorj-1.0.3/src/utils.c:76:9:  [4] (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).
        strcat(combined, item);
data/libstorj-1.0.3/test/tests.c:472:9:  [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.
        printf(KRED "Could not create upload file: %s\n" RESET, filepath);
data/libstorj-1.0.3/test/tests.c:502:5:  [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(file, folder);
data/libstorj-1.0.3/test/tests.c:503:5:  [4] (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).
    strcat(file, file_name);
data/libstorj-1.0.3/test/tests.c:552:5:  [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(file, folder);
data/libstorj-1.0.3/test/tests.c:553:5:  [4] (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).
    strcat(file, file_name);
data/libstorj-1.0.3/test/tests.c:617:5:  [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(download_file, folder);
data/libstorj-1.0.3/test/tests.c:660:5:  [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(download_file, folder);
data/libstorj-1.0.3/test/tests.c:1331:5:  [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(test_file, folder);
data/libstorj-1.0.3/test/tests.c:1333:9:  [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 (access(test_file, F_OK) != -1) {
data/libstorj-1.0.3/test/tests.c:1436:5:  [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(file, folder);
data/libstorj-1.0.3/test/tests.c:1437:5:  [4] (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).
    strcat(file, file_name);
data/libstorj-1.0.3/test/tests.c:1586:5:  [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.
    printf(KGRN "\nPASSED: %i" RESET, test_status);
data/libstorj-1.0.3/test/tests.c:1588:9:  [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.
        printf(KRED " FAILED: %i" RESET, num_failed);
data/libstorj-1.0.3/test/tests_rs.c:44:9:  [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.
        printf(fmt, buf[i]);
data/libstorj-1.0.3/src/cli.c:82:12:  [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.
    return getenv("USERPROFILE");
data/libstorj-1.0.3/src/cli.c:84:12:  [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.
    return getenv("HOME");
data/libstorj-1.0.3/src/cli.c:395:33:  [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.
    char *prepare_frame_limit = getenv("STORJ_PREPARE_FRAME_LIMIT");
data/libstorj-1.0.3/src/cli.c:396:30:  [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.
    char *push_frame_limit = getenv("STORJ_PUSH_FRAME_LIMIT");
data/libstorj-1.0.3/src/cli.c:397:30:  [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.
    char *push_shard_limit = getenv("STORJ_PUSH_SHARD_LIMIT");
data/libstorj-1.0.3/src/cli.c:398:16:  [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.
    char *rs = getenv("STORJ_REED_SOLOMON");
data/libstorj-1.0.3/src/cli.c:1066:10:  [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("UV_THREADPOOL_SIZE")) {
data/libstorj-1.0.3/src/cli.c:1073:26:  [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.
    char *storj_bridge = getenv("STORJ_BRIDGE");
data/libstorj-1.0.3/src/cli.c:1077: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.
    char *proxy = getenv("STORJ_PROXY");
data/libstorj-1.0.3/src/cli.c:1243:16:  [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.
        user = getenv("STORJ_BRIDGE_USER") ?
data/libstorj-1.0.3/src/cli.c:1244:20:  [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.
            strdup(getenv("STORJ_BRIDGE_USER")) : NULL;
data/libstorj-1.0.3/src/cli.c:1246:16:  [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.
        pass = getenv("STORJ_BRIDGE_PASS") ?
data/libstorj-1.0.3/src/cli.c:1247:20:  [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.
            strdup(getenv("STORJ_BRIDGE_PASS")) : NULL;
data/libstorj-1.0.3/src/cli.c:1249:20:  [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.
        mnemonic = getenv("STORJ_ENCRYPTION_KEY") ?
data/libstorj-1.0.3/src/cli.c:1250:20:  [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.
            strdup(getenv("STORJ_ENCRYPTION_KEY")) : NULL;
data/libstorj-1.0.3/src/cli.c:1252:25:  [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.
        char *keypass = getenv("STORJ_KEYPASS");
data/libstorj-1.0.3/src/storj.c:630:16:  [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.
    } else if (getenv("STORJ_TEMP") &&
data/libstorj-1.0.3/src/storj.c:631: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.
               stat(getenv("STORJ_TEMP"), &sb) == 0 &&
data/libstorj-1.0.3/src/storj.c:633:32:  [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.
        env->tmp_path = strdup(getenv("STORJ_TEMP"));
data/libstorj-1.0.3/src/storj.c:635:16:  [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.
    } else if (getenv("TEMP") &&
data/libstorj-1.0.3/src/storj.c:636: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.
               stat(getenv("TEMP"), &sb) == 0 &&
data/libstorj-1.0.3/src/storj.c:638:32:  [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.
        env->tmp_path = strdup(getenv("TEMP"));
data/libstorj-1.0.3/test/tests.c:1528:14:  [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.
    folder = getenv("TMPDIR");
data/libstorj-1.0.3/test/tests_rs.c:173: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(seed);
data/libstorj-1.0.3/test/tests_rs.c:765: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(seed);
data/libstorj-1.0.3/src/bip39.c:64: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(bits, data, len);
data/libstorj-1.0.3/src/bip39.c:67: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.
    static char mnemo[24 * 10];
data/libstorj-1.0.3/src/bip39.c:106: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(bits, data, len);
data/libstorj-1.0.3/src/bip39.c:147: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 current_word[10];
data/libstorj-1.0.3/src/bip39.c:202: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(salt, "mnemonic", 8);
data/libstorj-1.0.3/src/bip39.c:203: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(salt + 8, passphrase, passphraselen);
data/libstorj-1.0.3/src/bip39.c:217:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(*buffer, sha512_str, SHA512_DIGEST_SIZE*2);
data/libstorj-1.0.3/src/cli.c:158:5:  [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(*root_dir, "/.storj/");
data/libstorj-1.0.3/src/cli.c:168:5:  [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(*user_file, ".json");
data/libstorj-1.0.3/src/cli.c:207:24:  [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).
            strength = atoi(strength_str);
data/libstorj-1.0.3/src/cli.c:246: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 (&terminal, &prev_terminal, sizeof(struct termios));
data/libstorj-1.0.3/src/cli.c:297: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 first_password[BUFSIZ];
data/libstorj-1.0.3/src/cli.c:301: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 second_password[BUFSIZ];
data/libstorj-1.0.3/src/cli.c:382: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 *fd = fopen(file_path, "r");
data/libstorj-1.0.3/src/cli.c:401:56:  [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).
        .prepare_frame_limit = (prepare_frame_limit) ? atoi(prepare_frame_limit) : 1,
data/libstorj-1.0.3/src/cli.c:402:50:  [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).
        .push_frame_limit = (push_frame_limit) ? atoi(push_frame_limit) : 64,
data/libstorj-1.0.3/src/cli.c:403:50:  [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).
        .push_shard_limit = (push_shard_limit) ? atoi(push_shard_limit) : 64,
data/libstorj-1.0.3/src/cli.c:477: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 user_input[BUFSIZ];
data/libstorj-1.0.3/src/cli.c:497: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).
        fd = fopen(path, "w+");
data/libstorj-1.0.3/src/cli.c:641: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(user, user_input, num_chars * sizeof(char));
data/libstorj-1.0.3/src/cli.c:685: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(mnemonic, mnemonic_input, num_chars * sizeof(char));
data/libstorj-1.0.3/src/cli.c:1089: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).
                log_level = atoi(optarg);
data/libstorj-1.0.3/src/cli.c:1124: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 proto[6];
data/libstorj-1.0.3/src/cli.c:1125: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 host[100];
data/libstorj-1.0.3/src/cli.c:1322: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(user, user_input, num_chars);
data/libstorj-1.0.3/src/cli.c:1348: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(mnemonic, mnemonic_input, num_chars);
data/libstorj-1.0.3/src/crypto.c:18: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(digest, ripemd160_str, RIPEMD160_DIGEST_SIZE * 2);
data/libstorj-1.0.3/src/crypto.c:37: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(digest, ripemd160_digest, RIPEMD160_DIGEST_SIZE);
data/libstorj-1.0.3/src/crypto.c:59: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(digest, second_ripemd160_digest, RIPEMD160_DIGEST_SIZE);
data/libstorj-1.0.3/src/crypto.c:85: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(*digest, ripemd160_str, RIPEMD160_DIGEST_SIZE * 2);
data/libstorj-1.0.3/src/crypto.c:154: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(sha512input, key, key_len);
data/libstorj-1.0.3/src/crypto.c:155: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(sha512input + key_len, id, strlen(id));
data/libstorj-1.0.3/src/crypto.c:175:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(*buffer, sha512_str, DETERMINISTIC_KEY_SIZE);
data/libstorj-1.0.3/src/crypto.c:294: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(&digest, enc, GCM_DIGEST_SIZE);
data/libstorj-1.0.3/src/crypto.c:295: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(&data_iv, enc + GCM_DIGEST_SIZE, SHA256_DIGEST_SIZE);
data/libstorj-1.0.3/src/crypto.c:296: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(&cipher_text, enc + GCM_DIGEST_SIZE + SHA256_DIGEST_SIZE, data_size);
data/libstorj-1.0.3/src/crypto.c:382:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer, digest, GCM_DIGEST_SIZE);
data/libstorj-1.0.3/src/crypto.c:383:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer + GCM_DIGEST_SIZE, data_iv, SHA256_DIGEST_SIZE);
data/libstorj-1.0.3/src/crypto.c:384:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer + GCM_DIGEST_SIZE + SHA256_DIGEST_SIZE,
data/libstorj-1.0.3/src/crypto.c:428:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, digest, GCM_DIGEST_SIZE);
data/libstorj-1.0.3/src/crypto.c:429:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf + GCM_DIGEST_SIZE, encrypt_iv, SHA256_DIGEST_SIZE);
data/libstorj-1.0.3/src/crypto.c:430:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf + GCM_DIGEST_SIZE + SHA256_DIGEST_SIZE, &cipher_text, length);
data/libstorj-1.0.3/src/crypto.c:486: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(&digest, buffer, GCM_DIGEST_SIZE);
data/libstorj-1.0.3/src/crypto.c:487: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(&iv, buffer + GCM_DIGEST_SIZE, SHA256_DIGEST_SIZE);
data/libstorj-1.0.3/src/crypto.c:488: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(&cipher_text, buffer + GCM_DIGEST_SIZE + SHA256_DIGEST_SIZE, length);
data/libstorj-1.0.3/src/crypto.c:522: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(*filemeta, &clear_text, length);
data/libstorj-1.0.3/src/downloader.c:85: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 query_args[BUFSIZ];
data/libstorj-1.0.3/src/downloader.c:100:5:  [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(path, "/buckets/");
data/libstorj-1.0.3/src/downloader.c:102:5:  [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(path, "/files/");
data/libstorj-1.0.3/src/downloader.c:575: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 query_args[BUFSIZ];
data/libstorj-1.0.3/src/downloader.c:587:5:  [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(path, "/buckets/");
data/libstorj-1.0.3/src/downloader.c:589:5:  [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(path, "/files/");
data/libstorj-1.0.3/src/downloader.c:1052: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(decrypt_ctr, index, AES_BLOCK_SIZE);
data/libstorj-1.0.3/src/downloader.c:1108: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(decrypt_ctr, file_id_hash, AES_BLOCK_SIZE);
data/libstorj-1.0.3/src/downloader.c:1193:5:  [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(path, "/buckets/");
data/libstorj-1.0.3/src/downloader.c:1195:5:  [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(path, "/files/");
data/libstorj-1.0.3/src/downloader.c:1197:5:  [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(path, "/info");
data/libstorj-1.0.3/src/downloader.c:1722: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(req->decrypt_key, state->decrypt_key, SHA256_DIGEST_SIZE);
data/libstorj-1.0.3/src/downloader.c:1723: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(req->decrypt_ctr, state->decrypt_ctr, AES_BLOCK_SIZE);
data/libstorj-1.0.3/src/http.c:41: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(buffer, clr_txt, read_bytes);
data/libstorj-1.0.3/src/http.c:94: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 query_args[80];
data/libstorj-1.0.3/src/http.c:132:5:  [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(header, "x-storj-node-id: ");
data/libstorj-1.0.3/src/http.c:233: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(body->tail + body->tail_position, buffer, buflen);
data/libstorj-1.0.3/src/http.c:267: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(&tmp, body->tail + writelen, tailing_size);
data/libstorj-1.0.3/src/http.c:268: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(body->tail, &tmp, tailing_size);
data/libstorj-1.0.3/src/http.c:315: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 query_args[80];
data/libstorj-1.0.3/src/http.c:341:5:  [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(header, "x-storj-node-id: ");
data/libstorj-1.0.3/src/http.c:434: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(&hash[i*2], "%02x", hash_rmd160[i]);
data/libstorj-1.0.3/src/http.c:472: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(buffer, body->pnt, buflen);
data/libstorj-1.0.3/src/http.c:492: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(&(body->data[body->length]), buffer, buflen);
data/libstorj-1.0.3/src/http.c:583:13:  [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(&pass[i*2], "%02x", pass_hash[i]);
data/libstorj-1.0.3/src/storj.c:432: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 message[length + 1];
data/libstorj-1.0.3/src/storj.c:544: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((char *)bo->pass, options->pass, pass_len);
data/libstorj-1.0.3/src/storj.c:555: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((char *)bo->pass, options->pass, pass_len);
data/libstorj-1.0.3/src/storj.c:599: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((char *)eo->mnemonic, encrypt_options->mnemonic, mnemonic_len);
data/libstorj-1.0.3/src/storj.c:610: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((char *)eo->mnemonic, encrypt_options->mnemonic, mnemonic_len);
data/libstorj-1.0.3/src/storj.c:822:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(*buffer, body_str, strlen(body_str) + 1);
data/libstorj-1.0.3/src/storj.c:838: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(filepath, "w");
data/libstorj-1.0.3/src/storj.c:914: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(filepath, "r");
data/libstorj-1.0.3/src/storj.h:423: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 *challenges_as_str[STORJ_SHARD_CHALLENGES][64 + 1];
data/libstorj-1.0.3/src/storj.h:425: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 *tree[2 * STORJ_SHARD_CHALLENGES - 1][20 * 2 + 1];
data/libstorj-1.0.3/src/uploader.c:183: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(ctx->encryption_ctr, ctr, AES_BLOCK_SIZE);
data/libstorj-1.0.3/src/uploader.c:690:32:  [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).
                               atoi(shard->pointer->farmer_port),
data/libstorj-1.0.3/src/uploader.c:895: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(p->token, pointer->token, strlen(pointer->token));
data/libstorj-1.0.3/src/uploader.c:904: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(p->farmer_user_agent, pointer->farmer_user_agent,
data/libstorj-1.0.3/src/uploader.c:914: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(p->farmer_address, pointer->farmer_address,
data/libstorj-1.0.3/src/uploader.c:923: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(p->farmer_port, pointer->farmer_port,
data/libstorj-1.0.3/src/uploader.c:933: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(p->farmer_protocol, pointer->farmer_protocol,
data/libstorj-1.0.3/src/uploader.c:943: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(p->farmer_node_id, pointer->farmer_node_id,
data/libstorj-1.0.3/src/uploader.c:989: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 resource[strlen(state->frame_id) + 9];
data/libstorj-1.0.3/src/uploader.c:991:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(resource, "/frames/");
data/libstorj-1.0.3/src/uploader.c:1143: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(req->farmer_pointer->token, token, strlen(token));
data/libstorj-1.0.3/src/uploader.c:1154: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(req->farmer_pointer->farmer_user_agent,
data/libstorj-1.0.3/src/uploader.c:1166: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(req->farmer_pointer->farmer_protocol,
data/libstorj-1.0.3/src/uploader.c:1178: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(req->farmer_pointer->farmer_address,
data/libstorj-1.0.3/src/uploader.c:1189: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(req->farmer_pointer->farmer_port, farmer_port, strlen(farmer_port));
data/libstorj-1.0.3/src/uploader.c:1199: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(req->farmer_pointer->farmer_node_id,
data/libstorj-1.0.3/src/uploader.c:1272: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(state->shard[req->shard_meta_index].meta->hash,
data/libstorj-1.0.3/src/uploader.c:1286: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(state->shard[req->shard_meta_index].meta->challenges_as_str[i],
data/libstorj-1.0.3/src/uploader.c:1303: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(state->shard[req->shard_meta_index].meta->tree[i],
data/libstorj-1.0.3/src/uploader.c:1346: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(shard_meta->challenges[i], buff, 32);
data/libstorj-1.0.3/src/uploader.c:1354: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(shard_meta->challenges_as_str[i], challenge_as_str, strlen(challenge_as_str));
data/libstorj-1.0.3/src/uploader.c:1397: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 read_data[AES_BLOCK_SIZE * 256];
data/libstorj-1.0.3/src/uploader.c:1428: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(cphr_txt, read_data, AES_BLOCK_SIZE*256);
data/libstorj-1.0.3/src/uploader.c:1456: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(shard_meta->hash, hash, strlen(hash));
data/libstorj-1.0.3/src/uploader.c:1463: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 leaf[RIPEMD160_DIGEST_SIZE*2 +1];
data/libstorj-1.0.3/src/uploader.c:1475: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(shard_meta->tree[i], leaf, RIPEMD160_DIGEST_SIZE*2 + 1);
data/libstorj-1.0.3/src/uploader.c:1534:33:  [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).
        state->encrypted_file = fopen(state->encrypted_file_path, "r");
data/libstorj-1.0.3/src/uploader.c:1565: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 read_data[AES_BLOCK_SIZE * 256];
data/libstorj-1.0.3/src/uploader.c:1571:28:  [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 *encrypted_file = fopen(state->encrypted_file_path, "w+");
data/libstorj-1.0.3/src/uploader.c:1787:30:  [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).
        state->parity_file = fopen(state->parity_file_path, "r");
data/libstorj-1.0.3/src/uploader.c:1818:28:  [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 *encrypted_file = fopen(state->encrypted_file_path, "r");
data/libstorj-1.0.3/src/uploader.c:1847:25:  [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 *parity_file = fopen(state->parity_file_path, "w+");
data/libstorj-1.0.3/src/uploader.c:2553: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(encryption_ctr, index, AES_BLOCK_SIZE);
data/libstorj-1.0.3/src/utils.c:95:17:  [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).
        frand = fopen("/dev/urandom", "r");
data/libstorj-1.0.3/test/mockbridge.c:229: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(page_cpy, page, page_len);
data/libstorj-1.0.3/test/mockfarmer.c:230: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(page, data + shard_bytes * 0, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:234: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(page, data + shard_bytes * 1, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:238: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(page, data + shard_bytes * 2, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:242: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(page, data + shard_bytes * 3, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:252:17:  [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(page, data + shard_bytes * 4, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:258: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(page, data + shard_bytes * 5, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:262: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(page, data + shard_bytes * 6, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:266: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(page, data + shard_bytes * 7, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:270: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(page, data + shard_bytes * 8, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:274: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(page, data + shard_bytes * 9, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:278: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(page, data + shard_bytes * 10, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:282: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(page, data + shard_bytes * 11, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:286: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(page, data + shard_bytes * 12, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:290: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(page, data + shard_bytes * 13, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:295: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(page, data + shard_bytes * 15, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:299: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(page, data + shard_bytes * 16, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:303: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(page, data + shard_bytes * 17, shard_bytes);
data/libstorj-1.0.3/test/mockfarmer.c:313: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(sent_page, page, shard_bytes_sent);
data/libstorj-1.0.3/test/mockfarmer.c:317: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(sent_page, "Not Found");
data/libstorj-1.0.3/test/tests.c:469: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(filepath, "w+");
data/libstorj-1.0.3/test/tests.c:513: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).
        .fd = fopen(file, "r"),
data/libstorj-1.0.3/test/tests.c:563: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).
        .fd = fopen(file, "r")
data/libstorj-1.0.3/test/tests.c:618:5:  [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(download_file, "storj-test-download.data");
data/libstorj-1.0.3/test/tests.c:619:25:  [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 *download_fp = fopen(download_file, "w+");
data/libstorj-1.0.3/test/tests.c:661:5:  [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(download_file, "storj-test-download-canceled.data");
data/libstorj-1.0.3/test/tests.c:662:25:  [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 *download_fp = fopen(download_file, "w+");
data/libstorj-1.0.3/test/tests.c:1330: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 test_file[1024];
data/libstorj-1.0.3/test/tests.c:1332:5:  [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(test_file, "storj-test-user.json");
data/libstorj-1.0.3/test/tests.c:1442: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 *fp = fopen(file, "r+");
data/libstorj-1.0.3/test/tests.c:1477:17:  [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 *fp2 = fopen(file, "r+");
data/libstorj-1.0.3/test/tests_rs.c:304: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(origin, data, data_size);
data/libstorj-1.0.3/test/tests_rs.c:453: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(origin, data, data_size);
data/libstorj-1.0.3/test/tests_rs.c:655: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(output, text, nrDataBlocks);
data/libstorj-1.0.3/test/tests_rs.c:713: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(output, text, nrDataBlocks*block_size);
data/libstorj-1.0.3/test/tests_rs.c:784: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(data, origin, size);
data/libstorj-1.0.3/src/bip39.c:79: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).
        p += strlen(wordlist[idx]);
data/libstorj-1.0.3/src/bip39.c:84: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).
    *buffer = calloc(strlen(mnemo) + 1, sizeof(char));
data/libstorj-1.0.3/src/bip39.c:193:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int passphraselen = strlen(passphrase);
data/libstorj-1.0.3/src/bip39.c:206: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).
        strlen(mnemonic),
data/libstorj-1.0.3/src/bip39.c:209: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).
        strlen((char *)salt), salt,
data/libstorj-1.0.3/src/cli.c:151:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(home_dir) + strlen("/.storj/");
data/libstorj-1.0.3/src/cli.c:151: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).
    int len = strlen(home_dir) + strlen("/.storj/");
data/libstorj-1.0.3/src/cli.c:160:11:  [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(*root_dir) + strlen(host) + strlen(".json");
data/libstorj-1.0.3/src/cli.c:160:31:  [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(*root_dir) + strlen(host) + strlen(".json");
data/libstorj-1.0.3/src/cli.c:160: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).
    len = strlen(*root_dir) + strlen(host) + strlen(".json");
data/libstorj-1.0.3/src/cli.c:178:19:  [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 len = strlen(line);
data/libstorj-1.0.3/src/cli.c:265:18:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (((c = fgetc(stdin)) != '\n' && c != EOF && idx < max_pass_len - 1) ||
data/libstorj-1.0.3/src/cli.c:305:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(password, first_password, BUFSIZ);
data/libstorj-1.0.3/src/cli.c:635: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).
        num_chars = strlen(user_input);
data/libstorj-1.0.3/src/cli.c:668: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).
        num_chars = strlen(mnemonic_input);
data/libstorj-1.0.3/src/cli.c:1259: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).
                key = calloc(strlen(keypass) + 1, sizeof(char));
data/libstorj-1.0.3/src/cli.c:1317: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).
            int num_chars = strlen(user_input);
data/libstorj-1.0.3/src/cli.c:1343: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).
            int num_chars = strlen(mnemonic_input);
data/libstorj-1.0.3/src/crypto.c:147:31:  [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 input_len = key_len + strlen(id);
data/libstorj-1.0.3/src/crypto.c:155: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).
    memcpy(sha512input + key_len, id, strlen(id));
data/libstorj-1.0.3/src/crypto.c:254: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).
    uint8_t passphrase_len = strlen(passphrase);
data/libstorj-1.0.3/src/crypto.c:255:24:  [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).
    uint8_t salt_len = strlen(salt);
data/libstorj-1.0.3/src/crypto.c:277:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(data);
data/libstorj-1.0.3/src/crypto.c:339:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint8_t data_size = strlen(data);
data/libstorj-1.0.3/src/crypto.c:409:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t length = strlen(filemeta);
data/libstorj-1.0.3/src/crypto.c:452: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).
    uint32_t buffer_len = BASE64_DECODE_LENGTH(strlen(buffer_base64));
data/libstorj-1.0.3/src/crypto.c:463:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                              strlen(buffer_base64), (uint8_t *)buffer_base64)) {
data/libstorj-1.0.3/src/downloader.c:84: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).
    int excluded_farmer_ids_len = (req->excluded_farmer_ids) ? strlen(req->excluded_farmer_ids) : 0;
data/libstorj-1.0.3/src/downloader.c:92:24:  [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 path_len = 9 + strlen(req->bucket_id) + 7 +
data/libstorj-1.0.3/src/downloader.c:93: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).
        strlen(req->file_id) + strlen(query_args);
data/libstorj-1.0.3/src/downloader.c:93: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).
        strlen(req->file_id) + strlen(query_args);
data/libstorj-1.0.3/src/downloader.c:504: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).
                            strlen(state->excluded_farmer_ids) + 42);
data/libstorj-1.0.3/src/downloader.c:509:17:  [1] (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 character.
                strcat(state->excluded_farmer_ids, ",");
data/libstorj-1.0.3/src/downloader.c:579:24:  [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 path_len = 9 + strlen(state->bucket_id) + 7 +
data/libstorj-1.0.3/src/downloader.c:580: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).
        strlen(state->file_id) + strlen(query_args);
data/libstorj-1.0.3/src/downloader.c:580: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).
        strlen(state->file_id) + strlen(query_args);
data/libstorj-1.0.3/src/downloader.c:1032: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).
    uint8_t *decrypt_key = str2hex(strlen(file_key_as_str), file_key_as_str);
data/libstorj-1.0.3/src/downloader.c:1040: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).
    index = str2hex(strlen(state->info->index), (char *)state->info->index);
data/libstorj-1.0.3/src/downloader.c:1100: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).
                     strlen(state->file_id), file_id_hash);
data/libstorj-1.0.3/src/downloader.c:1186:24:  [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 path_len = 9 + strlen(req->bucket_id) + 7 + strlen(req->file_id) + 5;
data/libstorj-1.0.3/src/downloader.c:1186: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).
    int path_len = 9 + strlen(req->bucket_id) + 7 + strlen(req->file_id) + 5;
data/libstorj-1.0.3/src/downloader.c:1372: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).
            strlen(pointer->shard_hash) != RIPEMD160_DIGEST_SIZE * 2) {
data/libstorj-1.0.3/src/http.c:97:19:  [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 url_len = strlen(proto) + 3 + strlen(host) + 1 + 10 + 8
data/libstorj-1.0.3/src/http.c:97: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).
    int url_len = strlen(proto) + 3 + strlen(host) + 1 + 10 + 8
data/libstorj-1.0.3/src/http.c:98:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        + strlen(shard_hash) + strlen(query_args);
data/libstorj-1.0.3/src/http.c:98: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).
        + strlen(shard_hash) + strlen(query_args);
data/libstorj-1.0.3/src/http.c:133:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(header, farmer_id, 40);
data/libstorj-1.0.3/src/http.c:317:19:  [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 url_len = strlen(proto) + 3 + strlen(host) + 1 + 10
data/libstorj-1.0.3/src/http.c:317: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).
    int url_len = strlen(proto) + 3 + strlen(host) + 1 + 10
data/libstorj-1.0.3/src/http.c:318:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        + 8 + strlen(shard_hash) + strlen(query_args);
data/libstorj-1.0.3/src/http.c:318: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).
        + 8 + strlen(shard_hash) + strlen(query_args);
data/libstorj-1.0.3/src/http.c:342:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(header, farmer_id, 40);
data/libstorj-1.0.3/src/http.c:519:19:  [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 url_len = strlen(options->proto) + 3 + strlen(options->host) +
data/libstorj-1.0.3/src/http.c:519: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).
    int url_len = strlen(options->proto) + 3 + strlen(options->host) +
data/libstorj-1.0.3/src/http.c:520: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).
        1 + 10 + strlen(path);
data/libstorj-1.0.3/src/http.c:580: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).
        sha256_update(&ctx, strlen(options->pass), (uint8_t *)options->pass);
data/libstorj-1.0.3/src/http.c:588: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).
        int user_pass_len = strlen(options->user) + 1 + strlen(pass);
data/libstorj-1.0.3/src/http.c:588: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).
        int user_pass_len = strlen(options->user) + 1 + strlen(pass);
data/libstorj-1.0.3/src/http.c:594:9:  [1] (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 character.
        strcat(user_pass, ":");
data/libstorj-1.0.3/src/http.c:621: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).
        post_body->remain = strlen(req_buf);
data/libstorj-1.0.3/src/http.c:625:71:  [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).
        curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, (uint64_t)strlen(req_buf));
data/libstorj-1.0.3/src/storj.c:31: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).
    uint8_t *bucket_key = str2hex(strlen(bucket_key_as_str), bucket_key_as_str);
data/libstorj-1.0.3/src/storj.c:49:31:  [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).
    hmac_sha512_update(&ctx2, strlen(req->bucket_name),
data/libstorj-1.0.3/src/storj.c:113: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).
    uint8_t *bucket_key = str2hex(strlen(bucket_key_as_str), bucket_key_as_str);
data/libstorj-1.0.3/src/storj.c:197: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).
    uint8_t *bucket_key = str2hex(strlen(bucket_key_as_str), bucket_key_as_str);
data/libstorj-1.0.3/src/storj.c:524:24:  [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 pass_len = strlen(options->pass);
data/libstorj-1.0.3/src/storj.c:549:24:  [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 pass_len = strlen(options->pass);
data/libstorj-1.0.3/src/storj.c:578: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).
        int mnemonic_len = strlen(encrypt_options->mnemonic);
data/libstorj-1.0.3/src/storj.c:604: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).
        int mnemonic_len = strlen(encrypt_options->mnemonic);
data/libstorj-1.0.3/src/storj.c:714: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).
        unsigned int pass_len = strlen(env->bridge_options->pass);
data/libstorj-1.0.3/src/storj.c:738: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).
        unsigned int mnemonic_len = strlen(env->encrypt_options->mnemonic);
data/libstorj-1.0.3/src/storj.c:794:23:  [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 pass_length = strlen(bridge_pass);
data/libstorj-1.0.3/src/storj.c:802:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int mnemonic_length = strlen(mnemonic);
data/libstorj-1.0.3/src/storj.c:821: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).
    *buffer = calloc(strlen(body_str) + 1, sizeof(char));
data/libstorj-1.0.3/src/storj.c:822:31:  [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).
    memcpy(*buffer, body_str, strlen(body_str) + 1);
data/libstorj-1.0.3/src/storj.c:850:20:  [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).
    fwrite(buffer, strlen(buffer), sizeof(char), fp);
data/libstorj-1.0.3/src/storj.c:1380: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).
    sha256_of_str((uint8_t *)password, strlen(password), sha256_digest);
data/libstorj-1.0.3/src/uploader.c:421:20:  [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 path_len = strlen(state->bucket_id) + 16;
data/libstorj-1.0.3/src/uploader.c:471: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).
            strlen(shard->meta->hash) != RIPEMD160_DIGEST_SIZE * 2) {
data/libstorj-1.0.3/src/uploader.c:633: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).
                state->exclude = calloc(strlen(shard->pointer->farmer_node_id) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:640:31:  [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 new_len = strlen(state->exclude) + strlen(shard->pointer->farmer_node_id) + 1;
data/libstorj-1.0.3/src/uploader.c:640: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).
                int new_len = strlen(state->exclude) + strlen(shard->pointer->farmer_node_id) + 1;
data/libstorj-1.0.3/src/uploader.c:642:17:  [1] (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 character.
                strcat(state->exclude, ",");
data/libstorj-1.0.3/src/uploader.c:890:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        p->token = calloc(strlen(pointer->token) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:895: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).
        memcpy(p->token, pointer->token, strlen(pointer->token));
data/libstorj-1.0.3/src/uploader.c:898: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).
        p->farmer_user_agent = calloc(strlen(pointer->farmer_user_agent) + 1,
data/libstorj-1.0.3/src/uploader.c:905: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).
               strlen(pointer->farmer_user_agent));
data/libstorj-1.0.3/src/uploader.c:908: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).
        p->farmer_address = calloc(strlen(pointer->farmer_address) + 1,
data/libstorj-1.0.3/src/uploader.c:915: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).
               strlen(pointer->farmer_address));
data/libstorj-1.0.3/src/uploader.c:918: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).
        p->farmer_port = calloc(strlen(pointer->farmer_port) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:924: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).
               strlen(pointer->farmer_port));
data/libstorj-1.0.3/src/uploader.c:927: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).
        p->farmer_protocol = calloc(strlen(pointer->farmer_protocol) + 1,
data/libstorj-1.0.3/src/uploader.c:934: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).
               strlen(pointer->farmer_protocol));
data/libstorj-1.0.3/src/uploader.c:937: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).
        p->farmer_node_id = calloc(strlen(pointer->farmer_node_id) + 1,
data/libstorj-1.0.3/src/uploader.c:944: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).
               strlen(pointer->farmer_node_id));
data/libstorj-1.0.3/src/uploader.c:989:19:  [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 resource[strlen(state->frame_id) + 9];
data/libstorj-1.0.3/src/uploader.c:990: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).
    memset(resource, '\0', strlen(state->frame_id) + 9);
data/libstorj-1.0.3/src/uploader.c:1038: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).
        char *exclude_list = calloc(strlen(state->exclude) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:1138: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).
    req->farmer_pointer->token = calloc(strlen(token) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:1143: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).
    memcpy(req->farmer_pointer->token, token, strlen(token));
data/libstorj-1.0.3/src/uploader.c:1149: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).
        calloc(strlen(farmer_user_agent) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:1156: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).
           strlen(farmer_user_agent));
data/libstorj-1.0.3/src/uploader.c:1161: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).
        calloc(strlen(farmer_protocol) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:1168: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).
           strlen(farmer_protocol));
data/libstorj-1.0.3/src/uploader.c:1173: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).
        calloc(strlen(farmer_address) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:1180: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).
           strlen(farmer_address));
data/libstorj-1.0.3/src/uploader.c:1184: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).
    req->farmer_pointer->farmer_port = calloc(strlen(farmer_port) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:1189:59:  [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).
    memcpy(req->farmer_pointer->farmer_port, farmer_port, strlen(farmer_port));
data/libstorj-1.0.3/src/uploader.c:1194: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).
        calloc(strlen(farmer_node_id) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:1201: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).
           strlen(farmer_node_id));
data/libstorj-1.0.3/src/uploader.c:1354:68:  [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).
        memcpy(shard_meta->challenges_as_str[i], challenge_as_str, strlen(challenge_as_str));
data/libstorj-1.0.3/src/uploader.c:1456: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).
    memcpy(shard_meta->hash, hash, strlen(hash));
data/libstorj-1.0.3/src/uploader.c:1734: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).
    req->frame_id = calloc(strlen(frame_id_str) + 1, sizeof(char));
data/libstorj-1.0.3/src/uploader.c:2204: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).
                                     strlen(state->encrypted_file_name));
data/libstorj-1.0.3/src/uploader.c:2460: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).
    uint8_t *bucket_key = str2hex(strlen(bucket_key_as_str), bucket_key_as_str);
data/libstorj-1.0.3/src/uploader.c:2478:31:  [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).
    hmac_sha512_update(&ctx2, strlen(state->bucket_id),
data/libstorj-1.0.3/src/uploader.c:2480:31:  [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).
    hmac_sha512_update(&ctx2, strlen(state->file_name),
data/libstorj-1.0.3/src/uploader.c:2496:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        index = str2hex(strlen(state->index), (char *)state->index);
data/libstorj-1.0.3/src/uploader.c:2541: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).
    uint8_t *encryption_key = str2hex(strlen(key_as_str), key_as_str);
data/libstorj-1.0.3/src/uploader.c:2577:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int file_name_len = strlen(state->encrypted_file_name);
data/libstorj-1.0.3/src/uploader.c:2578:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int extension_len = strlen(extension);
data/libstorj-1.0.3/src/uploader.c:2579: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).
    int tmp_folder_len = strlen(tmp_folder);
data/libstorj-1.0.3/src/uploader.c:2648:24:  [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 (opts->index && strlen(opts->index) == 64) {
data/libstorj-1.0.3/src/utils.c:64:19:  [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(item);
data/libstorj-1.0.3/test/mockbridge.c:33: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).
        stringlen = strlen(json);
data/libstorj-1.0.3/test/mockbridge.c:227:24:  [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 page_len = strlen(page);
data/libstorj-1.0.3/test/mockfarmer.c:37:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for (int i = 0; i < strlen(bytes); i++) {
data/libstorj-1.0.3/test/mockfarmer.c:202: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).
        response = MHD_create_response_from_buffer(strlen(page),
data/libstorj-1.0.3/test/tests.c:478:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for (int i = 0; i < strlen(bytes); i++) {
data/libstorj-1.0.3/test/tests.c:500:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(folder) + strlen(file_name);
data/libstorj-1.0.3/test/tests.c:500: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).
    int len = strlen(folder) + strlen(file_name);
data/libstorj-1.0.3/test/tests.c:550:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(folder) + strlen(file_name);
data/libstorj-1.0.3/test/tests.c:550: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).
    int len = strlen(folder) + strlen(file_name);
data/libstorj-1.0.3/test/tests.c:616: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).
    char *download_file = calloc(strlen(folder) + 24 + 1, sizeof(char));
data/libstorj-1.0.3/test/tests.c:659: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).
    char *download_file = calloc(strlen(folder) + 33 + 1, sizeof(char));
data/libstorj-1.0.3/test/tests.c:1434:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(folder) + strlen(file_name);
data/libstorj-1.0.3/test/tests.c:1434: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).
    int len = strlen(folder) + strlen(file_name);
data/libstorj-1.0.3/test/tests_rs.c:633: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).
    int data_size = strlen(text);
data/libstorj-1.0.3/test/tests_rs.c:690: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).
    int data_size = strlen(text);

ANALYSIS SUMMARY:

Hits = 363
Lines analyzed = 17353 in approximately 0.42 seconds (41238 lines/second)
Physical Source Lines of Code (SLOC) = 13444
Hits@level = [0] 262 [1] 139 [2] 151 [3]  25 [4]  48 [5]   0
Hits@level+ = [0+] 625 [1+] 363 [2+] 224 [3+]  73 [4+]  48 [5+]   0
Hits/KSLOC@level+ = [0+] 46.4891 [1+] 27.0009 [2+] 16.6617 [3+] 5.42993 [4+] 3.57037 [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.