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/dislocker-0.7.1/include/dislocker/accesses/accesses.h Examining data/dislocker-0.7.1/include/dislocker/accesses/bek/bekfile.h Examining data/dislocker-0.7.1/include/dislocker/accesses/rp/recovery_password.h Examining data/dislocker-0.7.1/include/dislocker/accesses/stretch_key.h Examining data/dislocker-0.7.1/include/dislocker/accesses/user_pass/user_pass.h Examining data/dislocker-0.7.1/include/dislocker/common.h Examining data/dislocker-0.7.1/include/dislocker/config.h Examining data/dislocker-0.7.1/include/dislocker/config.priv.h Examining data/dislocker-0.7.1/include/dislocker/dislocker.h Examining data/dislocker-0.7.1/include/dislocker/dislocker.priv.h Examining data/dislocker-0.7.1/include/dislocker/encryption/aes-xts.h Examining data/dislocker-0.7.1/include/dislocker/encryption/crc32.h Examining data/dislocker-0.7.1/include/dislocker/encryption/decrypt.h Examining data/dislocker-0.7.1/include/dislocker/encryption/diffuser.h Examining data/dislocker-0.7.1/include/dislocker/encryption/encommon.h Examining data/dislocker-0.7.1/include/dislocker/encryption/encommon.priv.h Examining data/dislocker-0.7.1/include/dislocker/encryption/encrypt.h Examining data/dislocker-0.7.1/include/dislocker/inouts/inouts.h Examining data/dislocker-0.7.1/include/dislocker/inouts/inouts.priv.h Examining data/dislocker-0.7.1/include/dislocker/inouts/prepare.h Examining data/dislocker-0.7.1/include/dislocker/inouts/sectors.h Examining data/dislocker-0.7.1/include/dislocker/metadata/extended_info.h Examining data/dislocker-0.7.1/include/dislocker/metadata/fvek.h Examining data/dislocker-0.7.1/include/dislocker/metadata/guid.h Examining data/dislocker-0.7.1/include/dislocker/metadata/metadata.h Examining data/dislocker-0.7.1/include/dislocker/metadata/metadata.priv.h Examining data/dislocker-0.7.1/include/dislocker/metadata/metadata_config.h Examining data/dislocker-0.7.1/include/dislocker/metadata/print_metadata.h Examining data/dislocker-0.7.1/include/dislocker/metadata/vmk.h Examining data/dislocker-0.7.1/include/dislocker/metadata/datums.h Examining data/dislocker-0.7.1/include/dislocker/ntfs/clock.h Examining data/dislocker-0.7.1/include/dislocker/ntfs/encoding.h Examining data/dislocker-0.7.1/include/dislocker/return_values.h Examining data/dislocker-0.7.1/include/dislocker/ruby.h Examining data/dislocker-0.7.1/include/dislocker/xstd/xstdio.h Examining data/dislocker-0.7.1/include/dislocker/xstd/xstdlib.h Examining data/dislocker-0.7.1/include/dislocker/xstd/xsys_select.h Examining data/dislocker-0.7.1/src/accesses/accesses.c Examining data/dislocker-0.7.1/src/accesses/bek/bekfile.c Examining data/dislocker-0.7.1/src/accesses/rp/main.c Examining data/dislocker-0.7.1/src/accesses/rp/recovery_password.c Examining data/dislocker-0.7.1/src/accesses/stretch_key.c Examining data/dislocker-0.7.1/src/accesses/user_pass/check_user_pass.c Examining data/dislocker-0.7.1/src/accesses/user_pass/main.c Examining data/dislocker-0.7.1/src/accesses/user_pass/user_pass.c Examining data/dislocker-0.7.1/src/common.c Examining data/dislocker-0.7.1/src/dislocker-bek.c Examining data/dislocker-0.7.1/src/dislocker-file.c Examining data/dislocker-0.7.1/src/dislocker-fuse.c Examining data/dislocker-0.7.1/src/dislocker-metadata.c Examining data/dislocker-0.7.1/src/dislocker.c Examining data/dislocker-0.7.1/src/encryption/aes-xts.c Examining data/dislocker-0.7.1/src/encryption/crc32.c Examining data/dislocker-0.7.1/src/encryption/decrypt.c Examining data/dislocker-0.7.1/src/encryption/diffuser.c Examining data/dislocker-0.7.1/src/encryption/encommon.c Examining data/dislocker-0.7.1/src/encryption/encrypt.c Examining data/dislocker-0.7.1/src/inouts/sectors.c Examining data/dislocker-0.7.1/src/inouts/inouts.c Examining data/dislocker-0.7.1/src/inouts/prepare.c Examining data/dislocker-0.7.1/src/logs/event_descriptors.c Examining data/dislocker-0.7.1/src/logs/event_descriptors.h Examining data/dislocker-0.7.1/src/metadata/extended_info.c Examining data/dislocker-0.7.1/src/metadata/fvek.c Examining data/dislocker-0.7.1/src/metadata/guid.c Examining data/dislocker-0.7.1/src/metadata/vmk.c Examining data/dislocker-0.7.1/src/metadata/print_metadata.c Examining data/dislocker-0.7.1/src/metadata/datums.c Examining data/dislocker-0.7.1/src/metadata/metadata.c Examining data/dislocker-0.7.1/src/ntfs/clock.c Examining data/dislocker-0.7.1/src/ntfs/encoding.c Examining data/dislocker-0.7.1/src/ruby.c Examining data/dislocker-0.7.1/src/xstd/xstdio.c Examining data/dislocker-0.7.1/src/xstd/xstdlib.c Examining data/dislocker-0.7.1/src/config.c FINAL RESULTS: data/dislocker-0.7.1/include/dislocker/encryption/decrypt.h:74:32: [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. int decrypt_sector(dis_crypt_t crypt, uint8_t* sector, off_t sector_address, uint8_t* buffer); data/dislocker-0.7.1/include/dislocker/encryption/encommon.h:73:38: [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. int dis_crypt_set_fvekey(dis_crypt_t crypt, uint16_t algorithm, uint8_t* fvekey); data/dislocker-0.7.1/include/dislocker/encryption/encommon.h:75:36: [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. void dis_crypt_destroy(dis_crypt_t crypt); data/dislocker-0.7.1/include/dislocker/encryption/encrypt.h:59:32: [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. int encrypt_sector(dis_crypt_t crypt, uint8_t* sector, off_t sector_address, uint8_t* buffer); data/dislocker-0.7.1/include/dislocker/inouts/inouts.priv.h:70:17: [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. dis_crypt_t crypt; data/dislocker-0.7.1/include/dislocker/inouts/prepare.h:39:76: [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. int init_keys(bitlocker_dataset_t* dataset, datum_key_t* fvek, dis_crypt_t crypt); data/dislocker-0.7.1/src/common.c:71:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf( data/dislocker-0.7.1/src/config.c:162:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/dislocker-0.7.1/src/dislocker-bek.c:46:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, USAGE, prog); data/dislocker-0.7.1/src/dislocker-file.c:193:5: [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(ntfs_file, F_OK) == 0) data/dislocker-0.7.1/src/dislocker.c:236:21: [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. dis_ctx->io_data.crypt) != DIS_RET_SUCCESS) data/dislocker-0.7.1/src/dislocker.c:682:37: [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. dis_crypt_destroy(dis_ctx->io_data.crypt); data/dislocker-0.7.1/src/encryption/decrypt.c:394:32: [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. int decrypt_sector(dis_crypt_t crypt, uint8_t* sector, off_t sector_address, uint8_t* buffer) data/dislocker-0.7.1/src/encryption/decrypt.c:397:6: [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. if(!crypt || !sector || !buffer) data/dislocker-0.7.1/src/encryption/encommon.c:46:9: [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. memset(crypt, 0, sizeof(struct _dis_crypt)); data/dislocker-0.7.1/src/encryption/encommon.c:66:9: [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. return crypt; data/dislocker-0.7.1/src/encryption/encommon.c:69:38: [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. int dis_crypt_set_fvekey(dis_crypt_t crypt, uint16_t algorithm, uint8_t* fvekey) data/dislocker-0.7.1/src/encryption/encommon.c:71:6: [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. if(!crypt || !fvekey) data/dislocker-0.7.1/src/encryption/encommon.c:116:36: [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. void dis_crypt_destroy(dis_crypt_t crypt) data/dislocker-0.7.1/src/encryption/encommon.c:118:5: [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. if(crypt) data/dislocker-0.7.1/src/encryption/encommon.c:119:12: [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. dis_free(crypt); data/dislocker-0.7.1/src/encryption/encrypt.c:41:32: [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. int encrypt_sector(dis_crypt_t crypt, uint8_t* sector, off_t sector_address, uint8_t* buffer) data/dislocker-0.7.1/src/encryption/encrypt.c:44:6: [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. if(!crypt || !sector || !buffer) data/dislocker-0.7.1/src/inouts/prepare.c:44:34: [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. dis_crypt_t crypt) data/dislocker-0.7.1/src/inouts/prepare.c:47:33: [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. if(!dataset || !fvek_datum || !crypt) data/dislocker-0.7.1/src/inouts/prepare.c:74:27: [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. if(dis_crypt_set_fvekey(crypt, *palgo, fvek) == DIS_RET_SUCCESS) data/dislocker-0.7.1/src/inouts/sectors.c:403:14: [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. io_data->crypt, data/dislocker-0.7.1/src/inouts/sectors.c:483:14: [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. io_data->crypt, data/dislocker-0.7.1/src/inouts/sectors.c:560: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. io_data->crypt, data/dislocker-0.7.1/src/ruby.c:35: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. written = vsnprintf(cstr, len, fmt, ap); data/dislocker-0.7.1/src/xstd/xstdio.c:251:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. return vfprintf(fds[level], format, ap); data/dislocker-0.7.1/src/accesses/rp/main.c:56:19: [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((optchar = getopt(argc, argv, "p:h")) != -1) data/dislocker-0.7.1/src/accesses/user_pass/main.c:58:19: [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((optchar = getopt(argc, argv, "u:h")) != -1) data/dislocker-0.7.1/src/config.c:274:19: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((optchar = getopt_long(argc, argv, short_opts, long_opts, NULL)) != -1) data/dislocker-0.7.1/src/dislocker-bek.c:61:13: [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, "hf:")) != -1) data/dislocker-0.7.1/src/dislocker-metadata.c:85:19: [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((optchar = getopt(argc, argv, "o:V:hv")) != -1) data/dislocker-0.7.1/src/accesses/bek/bekfile.c:81:2: [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 rec_id[37] = {0,}; data/dislocker-0.7.1/src/accesses/bek/bekfile.c:159:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(key_guid, datum_exte->guid, 16); data/dislocker-0.7.1/src/accesses/bek/bekfile.c:300:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*bek_dataset, &dataset, sizeof(bitlocker_dataset_t)); data/dislocker-0.7.1/src/accesses/rp/recovery_password.c:130:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(salt, ((datum_stretch_key_t*) stretch_datum)->salt, 16); data/dislocker-0.7.1/src/accesses/rp/recovery_password.c:307:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(digits, rp, NB_DIGIT_BLOC); data/dislocker-0.7.1/src/accesses/rp/recovery_password.c:386:2: [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 s[NB_RP_BLOCS*2 * 5 + 1] = {0,}; data/dislocker-0.7.1/src/accesses/rp/recovery_password.c:587:2: [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 s[32*3 + 1] = {0,}; data/dislocker-0.7.1/src/accesses/stretch_key.c:77:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ch->salt, salt, SALT_LENGTH); data/dislocker-0.7.1/src/accesses/stretch_key.c:115:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ch.password_hash, user_hash, SHA256_DIGEST_LENGTH); data/dislocker-0.7.1/src/accesses/stretch_key.c:116:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ch.salt, salt, SALT_LENGTH); data/dislocker-0.7.1/src/accesses/stretch_key.c:156:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result, ch->updated_hash, SHA256_DIGEST_LENGTH); data/dislocker-0.7.1/src/accesses/user_pass/user_pass.c:134:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(salt, ((datum_stretch_key_t*) stretch_datum)->salt, 16); data/dislocker-0.7.1/src/common.c:55:11: [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(file, flags)) < 0) data/dislocker-0.7.1/src/common.c:57:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char err_string[DIS_XOPEN_FAIL_LEN + DIS_XOPEN_ARBITRARY_VALUE + 4] = {0,}; data/dislocker-0.7.1/src/common.c:58:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file_truncated[DIS_XOPEN_ARBITRARY_VALUE] = {0,}; data/dislocker-0.7.1/src/common.c:183:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(old_buf, (char*) buf + (offset - new_offset), old_count); data/dislocker-0.7.1/src/common.c:270:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[512] = {0,}; data/dislocker-0.7.1/src/common.c:328:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[512] = {0,}; data/dislocker-0.7.1/src/dislocker-file.c:65:11: [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(file, flags, mode)) < 0) data/dislocker-0.7.1/src/dislocker-fuse.c:256:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*new_argv, argv[0], lg); data/dislocker-0.7.1/src/dislocker-fuse.c:264:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*(new_argv + loop), argv[(size_t)param_idx + loop - 1], lg); data/dislocker-0.7.1/src/dislocker.c:419:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, buf + (offset % sector_size), size); data/dislocker-0.7.1/src/dislocker.c:638:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + (offset % sector_size), buffer, size); data/dislocker-0.7.1/src/encryption/aes-xts.c:104: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. typedef unsigned char be128[16]; data/dislocker-0.7.1/src/encryption/aes-xts.c:250:4: [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( cts_scratch.u8, (uint8_t*)&outbuf[nb_blocks], remaining ); data/dislocker-0.7.1/src/encryption/aes-xts.c:251:4: [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( cts_scratch.u8 + remaining, ((uint8_t*)&outbuf[nb_blocks - 1]) + remaining, 16 - remaining ); data/dislocker-0.7.1/src/encryption/aes-xts.c:252:4: [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( (uint8_t*)&outbuf[nb_blocks], (uint8_t*)&outbuf[nb_blocks - 1], remaining ); data/dislocker-0.7.1/src/encryption/aes-xts.c:286:4: [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( (uint8_t*)&outbuf[nb_blocks - 1], (uint8_t*)&outbuf[nb_blocks], remaining ); data/dislocker-0.7.1/src/encryption/aes-xts.c:287:4: [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( (uint8_t*)&outbuf[nb_blocks - 1] + remaining, cts_scratch.u8, 16 - remaining ); data/dislocker-0.7.1/src/encryption/aes-xts.c:288:4: [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( (uint8_t*)&outbuf[nb_blocks], cts_scratch.u8, remaining ); data/dislocker-0.7.1/src/encryption/decrypt.c:91:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mac_first, mac, AUTHENTICATOR_LENGTH); data/dislocker-0.7.1/src/encryption/decrypt.c:195:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char iv[16]; data/dislocker-0.7.1/src/encryption/decrypt.c:197:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char tmp_buf[16] = {0,}; data/dislocker-0.7.1/src/encryption/decrypt.c:214:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(iv + 1, nonce, (nonce_length % sizeof(iv))); data/dislocker-0.7.1/src/encryption/decrypt.c:317:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char iv[AUTHENTICATOR_LENGTH]; data/dislocker-0.7.1/src/encryption/decrypt.c:326:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(iv + 1, nonce, (nonce_length % AUTHENTICATOR_LENGTH)); data/dislocker-0.7.1/src/encryption/decrypt.c:372:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mac, iv, AUTHENTICATOR_LENGTH); data/dislocker-0.7.1/src/encryption/decrypt.c:425: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. unsigned char multi[16]; data/dislocker-0.7.1/src/encryption/decrypt.c:511: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. unsigned char multi[16]; data/dislocker-0.7.1/src/encryption/diffuser.c:52:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, sector, sector_size); data/dislocker-0.7.1/src/encryption/diffuser.c:89:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, sector, sector_size); data/dislocker-0.7.1/src/encryption/diffuser.c:128:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, sector, sector_size); data/dislocker-0.7.1/src/encryption/diffuser.c:164:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, sector, sector_size); data/dislocker-0.7.1/src/encryption/encrypt.c:73: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. unsigned char multi[16]; data/dislocker-0.7.1/src/encryption/encrypt.c:118:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, sector, sector_size); data/dislocker-0.7.1/src/encryption/encrypt.c:158: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. unsigned char multi[16]; data/dislocker-0.7.1/src/inouts/sectors.c:376:4: [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(loop_output, loop_input, sector_size); data/dislocker-0.7.1/src/inouts/sectors.c:396: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(loop_output, loop_input, sector_size); data/dislocker-0.7.1/src/inouts/sectors.c:473: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(loop_output, loop_input, sector_size); data/dislocker-0.7.1/src/inouts/sectors.c:478:4: [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(loop_output, loop_input, sector_size); data/dislocker-0.7.1/src/inouts/sectors.c:555:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(output, input, io_data->sector_size); data/dislocker-0.7.1/src/inouts/sectors.c:587:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(output, input, io_data->sector_size); data/dislocker-0.7.1/src/inouts/sectors.c:611:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(output, input, io_data->sector_size); data/dislocker-0.7.1/src/metadata/datums.c:155:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, value, len); data/dislocker-0.7.1/src/metadata/datums.c:179:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, value_type_str[value_type], len); data/dislocker-0.7.1/src/metadata/datums.c:199:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(header, data, sizeof(datum_header_safe_t)); data/dislocker-0.7.1/src/metadata/datums.c:243:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*payload, data + size_header, *size_payload); data/dislocker-0.7.1/src/metadata/datums.c:429:2: [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 extkey_id[37]; data/dislocker-0.7.1/src/metadata/datums.c:462:2: [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 extkey_id[37]; data/dislocker-0.7.1/src/metadata/datums.c:538:2: [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 s[12*3 + 1] = {0,}; data/dislocker-0.7.1/src/metadata/datums.c:556:2: [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 s[16*3 + 1] = {0,}; data/dislocker-0.7.1/src/metadata/datums.c:838:2: [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 s[16*3 + 1] = {0,}; data/dislocker-0.7.1/src/metadata/datums.c:852:2: [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 s[12*3 + 1] = {0,}; data/dislocker-0.7.1/src/metadata/datums.c:1103:2: [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 extkey_id[37]; data/dislocker-0.7.1/src/metadata/datums.c:1150:2: [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 extkey_id[37]; data/dislocker-0.7.1/src/metadata/fvek.c:167:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char multi[2]; data/dislocker-0.7.1/src/metadata/fvek.c:171:2: [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 fvek_keys[64] = {0,}; data/dislocker-0.7.1/src/metadata/fvek.c:230:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char*) *fvek_datum + sizeof(datum_key_t), fvek_keys, sizeof(fvek_keys)); data/dislocker-0.7.1/src/metadata/guid.c:58:3: [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(&formated_guid[j], "%.2X", raw_guid[i]); data/dislocker-0.7.1/src/metadata/guid.c:63:3: [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(&formated_guid[j], "%.2X", raw_guid[i]); data/dislocker-0.7.1/src/metadata/guid.c:68:3: [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(&formated_guid[j], "%.2X", raw_guid[i]); data/dislocker-0.7.1/src/metadata/guid.c:73:3: [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(&formated_guid[j], "%.2X", raw_guid[i]); data/dislocker-0.7.1/src/metadata/guid.c:78:3: [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(&formated_guid[j], "%.2X", raw_guid[i]); data/dislocker-0.7.1/src/metadata/guid.c:118:2: [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 formated_guid[37]; data/dislocker-0.7.1/src/metadata/metadata.c:382:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(volume_guid, volume_header->guid, sizeof(guid_t)); data/dislocker-0.7.1/src/metadata/metadata.c:387:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(volume_guid, volume_header->bltg_guid, sizeof(guid_t)); data/dislocker-0.7.1/src/metadata/metadata.c:734:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*metadata, &information, sizeof(bitlocker_information_t)); data/dislocker-0.7.1/src/metadata/metadata.c:837:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*eow_infos, &eow_infos_hdr, sizeof(bitlocker_eow_infos_t)); data/dislocker-0.7.1/src/metadata/metadata.c:1140:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(volume_header->signature, NTFS_SIGNATURE, NTFS_SIGNATURE_SIZE); data/dislocker-0.7.1/src/metadata/metadata.c:1155:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( data/dislocker-0.7.1/src/metadata/metadata.c:1372:7: [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). fd = open(StringValuePtr(argv[0]), O_RDWR|O_LARGEFILE); data/dislocker-0.7.1/src/metadata/print_metadata.c:57:2: [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 rec_id[37]; data/dislocker-0.7.1/src/metadata/print_metadata.c:155:2: [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 formated_guid[37]; data/dislocker-0.7.1/src/metadata/vmk.c:285:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&datum_range, &((*(datum_vmk_t**)vmk_datum)->nonce[10]), 2); data/dislocker-0.7.1/src/ruby.c:33:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cstr[len]; data/dislocker-0.7.1/src/xstd/xstdio.c:77:9: [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). log = fopen(file, LOG_MODE); data/dislocker-0.7.1/src/xstd/xstdio.c:131:16: [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 ((tty_fd = open("/dev/tty", O_RDONLY | O_NONBLOCK)) < 0) data/dislocker-0.7.1/include/dislocker/common.h:43: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). #define BITLOCKER_SIGNATURE_SIZE strlen(BITLOCKER_SIGNATURE) data/dislocker-0.7.1/include/dislocker/common.h:47: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). #define NTFS_SIGNATURE_SIZE strlen(NTFS_SIGNATURE) data/dislocker-0.7.1/include/dislocker/common.h:51: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). #define BITLOCKER_TO_GO_SIGNATURE_SIZE strlen(BITLOCKER_TO_GO_SIGNATURE) data/dislocker-0.7.1/src/accesses/accesses.c:79:7: [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*) dis_ctx->cfg.user_password) data/dislocker-0.7.1/src/accesses/accesses.c:102:7: [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*) dis_ctx->cfg.recovery_password) data/dislocker-0.7.1/src/accesses/rp/recovery_password.c:289:5: [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((char*)recovery_password) != 48+7) data/dislocker-0.7.1/src/accesses/rp/recovery_password.c:476:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(in, &c, 1) <= 0) data/dislocker-0.7.1/src/accesses/user_pass/check_user_pass.c:45:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t ck_password_len = strlen(ck_password); data/dislocker-0.7.1/src/accesses/user_pass/user_pass.c:99: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). memclean((char*) user_password, strlen((char*) user_password)); data/dislocker-0.7.1/src/accesses/user_pass/user_pass.c:127: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). memclean( (char*) user_password, strlen((char*) user_password)); data/dislocker-0.7.1/src/accesses/user_pass/user_pass.c:152: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). memclean((char*) user_password, strlen((char*) user_password)); data/dislocker-0.7.1/src/accesses/user_pass/user_pass.c:166: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). memclean((char*) user_password, strlen((char*) user_password)); data/dislocker-0.7.1/src/accesses/user_pass/user_pass.c:260: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). utf16_length = (strlen((char*) user_password)+1) * sizeof(uint16_t); data/dislocker-0.7.1/src/common.c:64: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). if(DIS_XOPEN_ARBITRARY_VALUE < strlen(file)) data/dislocker-0.7.1/src/common.c:175:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if((res = read(fd, buf, count)) < 0) data/dislocker-0.7.1/src/config.c:46: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). size_t len = strlen(opt); data/dislocker-0.7.1/src/config.c:218: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). opt_len = strlen(dis_opt[i].opt.name); data/dislocker-0.7.1/src/config.c:690: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((char*)cfg->recovery_password) + sizeof(char)); data/dislocker-0.7.1/src/config.c:694: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((char*)cfg->user_password) + sizeof(char)); data/dislocker-0.7.1/src/config.c:697: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). memclean(cfg->bek_file, strlen(cfg->bek_file) + sizeof(char)); data/dislocker-0.7.1/src/config.c:700: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). memclean(cfg->fvek_file, strlen(cfg->fvek_file) + sizeof(char)); data/dislocker-0.7.1/src/dislocker-file.c:69: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). size_t len = DIS_FILE_OPEN_FAIL_LEN + strlen(file) + 4; data/dislocker-0.7.1/src/dislocker-fuse.c:254: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). size_t lg = strlen(argv[0]) + 1; data/dislocker-0.7.1/src/dislocker-fuse.c:262:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lg = strlen(argv[(size_t)param_idx + loop - 1]) + 1; data/dislocker-0.7.1/src/metadata/datums.c:152:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(value) + 1; data/dislocker-0.7.1/src/metadata/datums.c:176: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). size_t len = strlen(value_type_str[value_type]) + 1; data/dislocker-0.7.1/src/metadata/guid.c:61:2: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(&formated_guid[j], "-"); j++; data/dislocker-0.7.1/src/metadata/guid.c:66:2: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(&formated_guid[j], "-"); j++; data/dislocker-0.7.1/src/metadata/guid.c:71:2: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(&formated_guid[j], "-"); j++; data/dislocker-0.7.1/src/metadata/guid.c:76:2: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. sprintf(&formated_guid[j], "-"); j++; data/dislocker-0.7.1/src/ntfs/encoding.c:67: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). size_t len = strlen((char*)ascii); data/dislocker-0.7.1/src/xstd/xstdio.c:177: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). size_t len = strlen(string); ANALYSIS SUMMARY: Hits = 155 Lines analyzed = 14947 in approximately 0.42 seconds (35881 lines/second) Physical Source Lines of Code (SLOC) = 8529 Hits@level = [0] 38 [1] 32 [2] 87 [3] 5 [4] 31 [5] 0 Hits@level+ = [0+] 193 [1+] 155 [2+] 123 [3+] 36 [4+] 31 [5+] 0 Hits/KSLOC@level+ = [0+] 22.6287 [1+] 18.1733 [2+] 14.4214 [3+] 4.22089 [4+] 3.63466 [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.