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/libengine-gost-openssl1.1-1.1.0.3/e_gost_err.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/e_gost_err.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost.ec
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost89.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost89.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_ameth.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_asn1.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_ctl.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_ec_keyx.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_ec_sign.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_eng.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_core.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_core.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_defines.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_defines.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_galois_precompiled.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_mac.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_mac.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_math.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_precompiled.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_precompiled.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_keywrap.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_keywrap.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_lcl.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_md.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_md2012.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_params.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gost_pmeth.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gosthash.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gosthash.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.c
Examining data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012_const.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012_precalc.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012_ref.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012_sse2.h
Examining data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c

FINAL RESULTS:

data/libengine-gost-openssl1.1-1.1.0.3/gost.ec:4:13:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
L NONE    		crypt.h    			NONE
data/libengine-gost-openssl1.1-1.1.0.3/gost_md2012.c:144: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(*((char **)ptr), micalg_256);
data/libengine-gost-openssl1.1-1.1.0.3/gost_md2012.c:161: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(*((char **)ptr), micalg_512);
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:83:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt(argc, argv, "bxlvc::")) != -1) {
data/libengine-gost-openssl1.1-1.1.0.3/gost_ctl.c:61:11:  [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.
    tmp = getenv(gost_envnames[param]);
data/libengine-gost-openssl1.1-1.1.0.3/gost_ctl.c:75:11:  [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.
    tmp = getenv(gost_envnames[param]);
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:50:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt(argc, argv, "bc::tv")) != -1) {
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:99: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).
                check_file = fopen(optarg, "r");
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:114: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 inhash[MAX_HASH_SIZE + 1], calcsum[MAX_HASH_SIZE + 1],
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:118:26:  [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).
            check_file = fopen(argv[optind], "r");
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:158: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 sum[65];
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:159:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char filename[PATH_MAX + 1], *end;
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:174: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 sum[65];
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:188:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char sum[65];
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:202:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open(filename, mode)) < 0) {
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:216:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buffer[BUF_SIZE];
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:229: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(sum + 2 * i, "%02x", buffer[i]);
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:255: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(hash, filename, hashstrlen);
data/libengine-gost-openssl1.1-1.1.0.3/gost89.c:406: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(cur_iv, iv, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost89.c:424: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(cur_iv, iv, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost89.c:554: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(buf2, data + i, data_len - i);
data/libengine-gost-openssl1.1-1.1.0.3/gost89.c:574: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, iv, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost89.c:579: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(buf2, data + i, data_len - i);
data/libengine-gost-openssl1.1-1.1.0.3/gost89.c:594:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char newkey[32], newiv[8];
data/libengine-gost-openssl1.1-1.1.0.3/gost89.c:602: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, newiv, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:380: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((unsigned char *)EVP_CIPHER_CTX_original_iv(ctx), iv,
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.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(EVP_CIPHER_CTX_iv_noconst(ctx),
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:400: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((unsigned char *)EVP_CIPHER_CTX_original_iv(ctx), iv,
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:403: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(EVP_CIPHER_CTX_iv_noconst(ctx),
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:456:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf1[8];
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:464: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(buf1, iv, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:481: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, buf1, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:490:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char b[8];
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:503: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(iv, out_ptr, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:514: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(iv, in_ptr, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:544: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(iv, buf + 8, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:564: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(iv, in_ptr, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:571: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(iv, out_ptr, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:577: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(buf + 8, in_ptr, inl - i);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:583: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(buf + 8, out_ptr, j);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:831: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((unsigned char *)EVP_CIPHER_CTX_original_iv(ctx), gcp->iv->data,
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:865:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buffer[8];
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:905: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(c->partial_block, p, bytes);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:919:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char buffer[8];
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:995: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(EVP_MD_CTX_md_data(to), EVP_MD_CTX_md_data(from),
data/libengine-gost-openssl1.1-1.1.0.3/gost_ctl.c:17:8:  [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 *gost_params[GOST_PARAM_MAX + 1] = { NULL };
data/libengine-gost-openssl1.1-1.1.0.3/gost_ec_keyx.c:162:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char ukm[8], shared_key[32], crypted_key[44];
data/libengine-gost-openssl1.1-1.1.0.3/gost_ec_keyx.c:168: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(ukm, data->shared_ukm, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_ec_keyx.c:272:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char wrappedKey[44];
data/libengine-gost-openssl1.1-1.1.0.3/gost_ec_keyx.c:273:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char sharedKey[32];
data/libengine-gost-openssl1.1-1.1.0.3/gost_ec_keyx.c:319: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(wrappedKey, gkt->key_agreement_info->eph_iv->data, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_ec_keyx.c:321: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(wrappedKey + 8, gkt->key_info->encrypted_key->data, 32);
data/libengine-gost-openssl1.1-1.1.0.3/gost_ec_keyx.c:323: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(wrappedKey + 40, gkt->key_info->imit->data, 4);
data/libengine-gost-openssl1.1-1.1.0.3/gost_ec_sign.c:29:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[64];
data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.c:158: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((unsigned char*) EVP_CIPHER_CTX_original_iv(ctx), iv,
data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.c:162: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(EVP_CIPHER_CTX_iv_noconst(ctx),
data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.c:353: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->buffer1, iv, 16);
data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.c:355: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, buf, 16);
data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.c:440: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(iv, buf + GRASSHOPPER_BLOCK_SIZE, GRASSHOPPER_BLOCK_SIZE);
data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.c:462: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(iv, in_ptr, GRASSHOPPER_BLOCK_SIZE);
data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.c:470: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(iv, out_ptr, GRASSHOPPER_BLOCK_SIZE);
data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.c:479: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(buf + GRASSHOPPER_BLOCK_SIZE, in_ptr, inl - i);
data/libengine-gost-openssl1.1-1.1.0.3/gost_grasshopper_cipher.c:486: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(buf + GRASSHOPPER_BLOCK_SIZE, out_ptr, j);
data/libengine-gost-openssl1.1-1.1.0.3/gost_keywrap.c:29:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char S[8];
data/libengine-gost-openssl1.1-1.1.0.3/gost_keywrap.c:30: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(outputKey, inputKey, 32);
data/libengine-gost-openssl1.1-1.1.0.3/gost_keywrap.c:71:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char kek_ukm[32];
data/libengine-gost-openssl1.1-1.1.0.3/gost_keywrap.c:74: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(wrappedKey, ukm, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gost_keywrap.c:95:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char kek_ukm[32], cek_mac[4];
data/libengine-gost-openssl1.1-1.1.0.3/gost_lcl.h:78:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char key[32];
data/libengine-gost-openssl1.1-1.1.0.3/gost_lcl.h:83:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char key[32];
data/libengine-gost-openssl1.1-1.1.0.3/gost_lcl.h:196:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buffer[8];
data/libengine-gost-openssl1.1-1.1.0.3/gost_lcl.h:197:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char partial_block[8];
data/libengine-gost-openssl1.1-1.1.0.3/gost_md.c:78: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(EVP_MD_CTX_md_data(to), EVP_MD_CTX_md_data(from),
data/libengine-gost-openssl1.1-1.1.0.3/gost_md2012.c:123: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(EVP_MD_CTX_md_data(to), EVP_MD_CTX_md_data(from),
data/libengine-gost-openssl1.1-1.1.0.3/gost_pmeth.c:153: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(pctx->shared_ukm, p2, (int)p1);
data/libengine-gost-openssl1.1-1.1.0.3/gost_pmeth.c:549: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(data->key, p2, 32);
data/libengine-gost-openssl1.1-1.1.0.3/gost_pmeth.c:666: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(keydata->key, data->key, 32);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash.c:46:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, w, 8);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash.c:146: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(H, S, 32);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash.c:210: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(&(ctx->remainder[ctx->left]), block, add_bytes);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash.c:231: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(ctx->remainder, block, ctx->left = length);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash.c:248: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(H, ctx->H, 32);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash.c:249:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(S, ctx->S, 32);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash.c:252:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf, ctx->remainder, ctx->left);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash.c:268: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(hashval, H, 32);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.c:46:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[64];
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.c:52: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, CTX->buffer, CTX->bufsize);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.c:55: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->buffer, &buf, sizeof buf);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.c:171: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, &(CTX->buffer), CTX->bufsize);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.c:172: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->buffer), &buf, sizeof(uint512_u));
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.c:192: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->hash), &(CTX->h), sizeof(uint512_u));
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.c:216: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(&CTX->buffer[CTX->bufsize], data, chunksize);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.c:242: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(digest, &(CTX->hash.QWORD[4]), 32);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.c:244: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(digest, &(CTX->hash.QWORD[0]), 64);
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012.h:53:24:  [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.
    ALIGN(16) unsigned char buffer[64];
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012_const.h:308:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char Tau[64] = {
data/libengine-gost-openssl1.1-1.1.0.3/gosthash2012_const.h:319:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char Pi[256] = {
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:63: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).
                check_file = fopen(optarg, "r");
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:79: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 inhash[65], calcsum[65], filename[PATH_MAX];
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:82:26:  [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).
            check_file = fopen(argv[optind], "r");
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:123: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 sum[65];
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:137: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 sum[65];
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:150:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd = open(filename, mode)) < 0) {
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:164:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buffer[BUF_SIZE];
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:176: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(sum + 2 * i, "%02x", buffer[31 - i]);
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:221:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((bytes = read(fd, buffer, BUF_SIZE)) > 0) {
data/libengine-gost-openssl1.1-1.1.0.3/gost12sum.c:241: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).
        len = strlen(filename);
data/libengine-gost-openssl1.1-1.1.0.3/gost_crypt.c:323: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).
        if (!params || !strlen(params)) {
data/libengine-gost-openssl1.1-1.1.0.3/gost_md2012.c:142: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).
            *((char **)ptr) = OPENSSL_malloc(strlen(micalg_256) + 1);
data/libengine-gost-openssl1.1-1.1.0.3/gost_md2012.c:159: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).
            *((char **)ptr) = OPENSSL_malloc(strlen(micalg_512) + 1);
data/libengine-gost-openssl1.1-1.1.0.3/gost_pmeth.c:178:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(value) == 1) {
data/libengine-gost-openssl1.1-1.1.0.3/gost_pmeth.c:195: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).
        } else if ((strlen(value) == 2)
data/libengine-gost-openssl1.1-1.1.0.3/gost_pmeth.c:241:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(value) == 1) {
data/libengine-gost-openssl1.1-1.1.0.3/gost_pmeth.c:600:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(value) != 32) {
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:168:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((bytes = read(fd, buffer, BUF_SIZE)) > 0) {
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:194:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (fgetc(f) != ' ') {
data/libengine-gost-openssl1.1-1.1.0.3/gostsum.c:198: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).
    i = strlen(fgets(filename, PATH_MAX, f));

ANALYSIS SUMMARY:

Hits = 117
Lines analyzed = 47439 in approximately 1.68 seconds (28311 lines/second)
Physical Source Lines of Code (SLOC) = 45565
Hits@level = [0]  47 [1]  12 [2]  98 [3]   4 [4]   3 [5]   0
Hits@level+ = [0+] 164 [1+] 117 [2+] 105 [3+]   7 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 3.59925 [1+] 2.56776 [2+] 2.3044 [3+] 0.153627 [4+] 0.06584 [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.