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/volume-key-0.3.12/src/volume_key.c Examining data/volume-key-0.3.12/tests/packet_roundtrips.c Examining data/volume-key-0.3.12/python/python3/volume_key_wrap.c Examining data/volume-key-0.3.12/python/python/volume_key_wrap.c Examining data/volume-key-0.3.12/lib/libvolume_key.h Examining data/volume-key-0.3.12/lib/SSLerrs.h Examining data/volume-key-0.3.12/lib/kmip.c Examining data/volume-key-0.3.12/lib/crypto.c Examining data/volume-key-0.3.12/lib/nss_error.h Examining data/volume-key-0.3.12/lib/volume_luks.h Examining data/volume-key-0.3.12/lib/ui.h Examining data/volume-key-0.3.12/lib/ui.c Examining data/volume-key-0.3.12/lib/SECerrs.h Examining data/volume-key-0.3.12/lib/nss_error.c Examining data/volume-key-0.3.12/lib/volume.h Examining data/volume-key-0.3.12/lib/libvolume_key.c Examining data/volume-key-0.3.12/lib/volume_luks.c Examining data/volume-key-0.3.12/lib/kmip.h Examining data/volume-key-0.3.12/lib/volume.c Examining data/volume-key-0.3.12/lib/crypto.h FINAL RESULTS: data/volume-key-0.3.12/lib/kmip.c:2020:8: [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 (file, \ data/volume-key-0.3.12/python/python/volume_key_wrap.c:676:3: [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(r,name); data/volume-key-0.3.12/python/python/volume_key_wrap.c:816:25: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define PyOS_snprintf _snprintf data/volume-key-0.3.12/python/python/volume_key_wrap.c:818:25: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define PyOS_snprintf snprintf data/volume-key-0.3.12/python/python/volume_key_wrap.c:835:9: [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. res = vsnprintf(buf, sizeof(buf), fmt, ap); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:676:3: [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(r,name); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:816:25: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define PyOS_snprintf _snprintf data/volume-key-0.3.12/python/python3/volume_key_wrap.c:818:25: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define PyOS_snprintf snprintf data/volume-key-0.3.12/python/python3/volume_key_wrap.c:835:9: [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. res = vsnprintf(buf, sizeof(buf), fmt, ap); data/volume-key-0.3.12/src/volume_key.c:55:3: [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. vfprintf (stderr, fmt, ap); data/volume-key-0.3.12/tests/packet_roundtrips.c:114:28: [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. file_name = g_strconcat (getenv ("srcdir"), "/", test_packet, NULL); data/volume-key-0.3.12/lib/crypto.c:223: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 (src_item.data, data, size); data/volume-key-0.3.12/lib/kmip.c:260: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 (kmip->data + kmip->offset, data, size); data/volume-key-0.3.12/lib/kmip.c:400:7: [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 (kmip->data + state->length_pos, &size_be, sizeof (size_be)); data/volume-key-0.3.12/lib/kmip.c:726: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 (&t, kmip->data, sizeof (tag)); data/volume-key-0.3.12/lib/kmip.c:742: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 (data, kmip->data, size); data/volume-key-0.3.12/lib/kmip.c:2002:7: [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 (&(VAR), data, sizeof (VAR)); \ data/volume-key-0.3.12/lib/kmip.c:2134: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 buf[27]; data/volume-key-0.3.12/lib/libvolume_key.c:45: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 magic[11]; /* packet_magic */ data/volume-key-0.3.12/lib/libvolume_key.c:49: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 packet_magic[11] = "\0volume_key"; data/volume-key-0.3.12/lib/libvolume_key.c:66: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 (res, &hdr, sizeof (hdr)); data/volume-key-0.3.12/lib/libvolume_key.c:67: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 ((unsigned char *)res + sizeof (hdr), kmip, kmip_size); data/volume-key-0.3.12/lib/volume_luks.c:241:20: [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 char hex[16] = "0123456789ABCDEF"; data/volume-key-0.3.12/lib/volume_luks.c:826: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 (vol->v.luks->passphrase, key_value->v.bytes.data, data/volume-key-0.3.12/python/python/volume_key_wrap.c:627:16: [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 char hex[17] = "0123456789abcdef"; data/volume-key-0.3.12/python/python/volume_key_wrap.c:788: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(newstr, cstr, len+1); data/volume-key-0.3.12/python/python/volume_key_wrap.c:832: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 buf[SWIG_PYBUFFER_SIZE * 2]; data/volume-key-0.3.12/python/python/volume_key_wrap.c:2022: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 result[SWIG_BUFFER_SIZE]; data/volume-key-0.3.12/python/python/volume_key_wrap.c:2036: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 result[SWIG_BUFFER_SIZE]; data/volume-key-0.3.12/python/python/volume_key_wrap.c:2047: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 result[SWIG_BUFFER_SIZE]; data/volume-key-0.3.12/python/python/volume_key_wrap.c:2189:7: [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(pack, ptr, size); data/volume-key-0.3.12/python/python/volume_key_wrap.c:2207: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(ptr, sobj->pack, size); data/volume-key-0.3.12/python/python/volume_key_wrap.c:2844:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mesg[256]; data/volume-key-0.3.12/python/python/volume_key_wrap.c:3321:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); data/volume-key-0.3.12/python/python/volume_key_wrap.c:3359:27: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:627:16: [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 char hex[17] = "0123456789abcdef"; data/volume-key-0.3.12/python/python3/volume_key_wrap.c:788: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(newstr, cstr, len+1); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:832: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 buf[SWIG_PYBUFFER_SIZE * 2]; data/volume-key-0.3.12/python/python3/volume_key_wrap.c:2022: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 result[SWIG_BUFFER_SIZE]; data/volume-key-0.3.12/python/python3/volume_key_wrap.c:2036: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 result[SWIG_BUFFER_SIZE]; data/volume-key-0.3.12/python/python3/volume_key_wrap.c:2047: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 result[SWIG_BUFFER_SIZE]; data/volume-key-0.3.12/python/python3/volume_key_wrap.c:2189:7: [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(pack, ptr, size); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:2207: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(ptr, sobj->pack, size); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:2844:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mesg[256]; data/volume-key-0.3.12/python/python3/volume_key_wrap.c:3327:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:3365:27: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); data/volume-key-0.3.12/src/volume_key.c:403: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 buf[LINE_MAX], *p; data/volume-key-0.3.12/src/volume_key.c:407: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). tty = fopen ("/dev/tty", "r+"); data/volume-key-0.3.12/src/volume_key.c:773:16: [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 char charset[64] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" data/volume-key-0.3.12/src/volume_key.c:777: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 rnd[20]; data/volume-key-0.3.12/lib/crypto.c:614: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). len = strlen (pw); data/volume-key-0.3.12/lib/kmip.c:1770: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 (KMIP_LIBVK_IDENTIFIER_CERT_ISN_PREFIX), " ", data/volume-key-0.3.12/lib/volume.c:213:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memset (prop->value, 0, strlen (prop->value)); data/volume-key-0.3.12/lib/volume_luks.c:129:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memset (passphrase, 0, strlen (passphrase)); data/volume-key-0.3.12/lib/volume_luks.c:315:17: [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). passphrase, strlen (passphrase)); data/volume-key-0.3.12/lib/volume_luks.c:444: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). strlen (packet->v.luks->passphrase)); data/volume-key-0.3.12/lib/volume_luks.c:535: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 (passphrase)); data/volume-key-0.3.12/lib/volume_luks.c:717: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 (vol->v.luks->passphrase)); data/volume-key-0.3.12/lib/volume_luks.c:880: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). strlen (packet->v.luks->passphrase)); data/volume-key-0.3.12/python/python/volume_key_wrap.c:391: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). const char* te = tb + strlen(tb); data/volume-key-0.3.12/python/python/volume_key_wrap.c:675: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). if (strlen(name) + 1 > (bsz - (r - buff))) return 0; data/volume-key-0.3.12/python/python/volume_key_wrap.c:696:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t lname = (name ? strlen(name) : 0); data/volume-key-0.3.12/python/python/volume_key_wrap.c:701:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(r,name,lname+1); data/volume-key-0.3.12/python/python/volume_key_wrap.c:865:91: [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 PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} data/volume-key-0.3.12/python/python/volume_key_wrap.c:3138:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); data/volume-key-0.3.12/python/python/volume_key_wrap.c:3377:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; data/volume-key-0.3.12/python/python/volume_key_wrap.c:5915:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t size = strlen(name)+1; data/volume-key-0.3.12/python/python/volume_key_wrap.c:5918:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gv->name,name,size); data/volume-key-0.3.12/python/python/volume_key_wrap.c:5982: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). strlen(const_table[j].name)) == 0) { data/volume-key-0.3.12/python/python/volume_key_wrap.c:5993: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). size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; data/volume-key-0.3.12/python/python/volume_key_wrap.c:5997:15: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, methods[i].ml_doc, ldoc); data/volume-key-0.3.12/python/python/volume_key_wrap.c:5999:15: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buff, "swig_ptr: ", 10); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:391: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). const char* te = tb + strlen(tb); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:675: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). if (strlen(name) + 1 > (bsz - (r - buff))) return 0; data/volume-key-0.3.12/python/python3/volume_key_wrap.c:696:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t lname = (name ? strlen(name) : 0); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:701:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(r,name,lname+1); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:865:91: [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 PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} data/volume-key-0.3.12/python/python3/volume_key_wrap.c:3144:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:3383:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; data/volume-key-0.3.12/python/python3/volume_key_wrap.c:5921:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t size = strlen(name)+1; data/volume-key-0.3.12/python/python3/volume_key_wrap.c:5924:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(gv->name,name,size); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:5988: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). strlen(const_table[j].name)) == 0) { data/volume-key-0.3.12/python/python3/volume_key_wrap.c:5999: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). size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; data/volume-key-0.3.12/python/python3/volume_key_wrap.c:6003:15: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, methods[i].ml_doc, ldoc); data/volume-key-0.3.12/python/python3/volume_key_wrap.c:6005:15: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(buff, "swig_ptr: ", 10); data/volume-key-0.3.12/src/volume_key.c:677:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memset (passphrase, 0, strlen (passphrase)); data/volume-key-0.3.12/src/volume_key.c:682:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memset (passphrase2, 0, strlen (passphrase2)); data/volume-key-0.3.12/src/volume_key.c:686: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). memset (passphrase, 0, strlen (passphrase)); data/volume-key-0.3.12/src/volume_key.c:855:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). passphrase_len = strlen (passphrase); data/volume-key-0.3.12/src/volume_key.c:1124:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memset (value, 0, strlen (value)); ANALYSIS SUMMARY: Hits = 90 Lines analyzed = 21567 in approximately 0.55 seconds (39295 lines/second) Physical Source Lines of Code (SLOC) = 17058 Hits@level = [0] 88 [1] 40 [2] 39 [3] 1 [4] 10 [5] 0 Hits@level+ = [0+] 178 [1+] 90 [2+] 50 [3+] 11 [4+] 10 [5+] 0 Hits/KSLOC@level+ = [0+] 10.435 [1+] 5.27612 [2+] 2.93118 [3+] 0.644859 [4+] 0.586235 [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.