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/libzip-1.7.3/examples/in-memory.c
Examining data/libzip-1.7.3/examples/windows-open.c
Examining data/libzip-1.7.3/lib/compat.h
Examining data/libzip-1.7.3/lib/zip_add.c
Examining data/libzip-1.7.3/lib/zip_add_dir.c
Examining data/libzip-1.7.3/lib/zip_add_entry.c
Examining data/libzip-1.7.3/lib/zip_algorithm_bzip2.c
Examining data/libzip-1.7.3/lib/zip_algorithm_deflate.c
Examining data/libzip-1.7.3/lib/zip_algorithm_xz.c
Examining data/libzip-1.7.3/lib/zip_buffer.c
Examining data/libzip-1.7.3/lib/zip_close.c
Examining data/libzip-1.7.3/lib/zip_crypto.h
Examining data/libzip-1.7.3/lib/zip_crypto_commoncrypto.c
Examining data/libzip-1.7.3/lib/zip_crypto_commoncrypto.h
Examining data/libzip-1.7.3/lib/zip_crypto_gnutls.c
Examining data/libzip-1.7.3/lib/zip_crypto_gnutls.h
Examining data/libzip-1.7.3/lib/zip_crypto_mbedtls.c
Examining data/libzip-1.7.3/lib/zip_crypto_mbedtls.h
Examining data/libzip-1.7.3/lib/zip_crypto_openssl.c
Examining data/libzip-1.7.3/lib/zip_crypto_openssl.h
Examining data/libzip-1.7.3/lib/zip_crypto_win.c
Examining data/libzip-1.7.3/lib/zip_crypto_win.h
Examining data/libzip-1.7.3/lib/zip_delete.c
Examining data/libzip-1.7.3/lib/zip_dir_add.c
Examining data/libzip-1.7.3/lib/zip_dirent.c
Examining data/libzip-1.7.3/lib/zip_discard.c
Examining data/libzip-1.7.3/lib/zip_entry.c
Examining data/libzip-1.7.3/lib/zip_error.c
Examining data/libzip-1.7.3/lib/zip_error_clear.c
Examining data/libzip-1.7.3/lib/zip_error_get.c
Examining data/libzip-1.7.3/lib/zip_error_get_sys_type.c
Examining data/libzip-1.7.3/lib/zip_error_strerror.c
Examining data/libzip-1.7.3/lib/zip_error_to_str.c
Examining data/libzip-1.7.3/lib/zip_extra_field.c
Examining data/libzip-1.7.3/lib/zip_extra_field_api.c
Examining data/libzip-1.7.3/lib/zip_fclose.c
Examining data/libzip-1.7.3/lib/zip_fdopen.c
Examining data/libzip-1.7.3/lib/zip_file_add.c
Examining data/libzip-1.7.3/lib/zip_file_error_clear.c
Examining data/libzip-1.7.3/lib/zip_file_error_get.c
Examining data/libzip-1.7.3/lib/zip_file_get_comment.c
Examining data/libzip-1.7.3/lib/zip_file_get_external_attributes.c
Examining data/libzip-1.7.3/lib/zip_file_get_offset.c
Examining data/libzip-1.7.3/lib/zip_file_rename.c
Examining data/libzip-1.7.3/lib/zip_file_replace.c
Examining data/libzip-1.7.3/lib/zip_file_set_comment.c
Examining data/libzip-1.7.3/lib/zip_file_set_encryption.c
Examining data/libzip-1.7.3/lib/zip_file_set_external_attributes.c
Examining data/libzip-1.7.3/lib/zip_file_set_mtime.c
Examining data/libzip-1.7.3/lib/zip_file_strerror.c
Examining data/libzip-1.7.3/lib/zip_fopen.c
Examining data/libzip-1.7.3/lib/zip_fopen_encrypted.c
Examining data/libzip-1.7.3/lib/zip_fopen_index.c
Examining data/libzip-1.7.3/lib/zip_fopen_index_encrypted.c
Examining data/libzip-1.7.3/lib/zip_fread.c
Examining data/libzip-1.7.3/lib/zip_fseek.c
Examining data/libzip-1.7.3/lib/zip_ftell.c
Examining data/libzip-1.7.3/lib/zip_get_archive_comment.c
Examining data/libzip-1.7.3/lib/zip_get_archive_flag.c
Examining data/libzip-1.7.3/lib/zip_get_encryption_implementation.c
Examining data/libzip-1.7.3/lib/zip_get_file_comment.c
Examining data/libzip-1.7.3/lib/zip_get_name.c
Examining data/libzip-1.7.3/lib/zip_get_num_entries.c
Examining data/libzip-1.7.3/lib/zip_get_num_files.c
Examining data/libzip-1.7.3/lib/zip_hash.c
Examining data/libzip-1.7.3/lib/zip_io_util.c
Examining data/libzip-1.7.3/lib/zip_libzip_version.c
Examining data/libzip-1.7.3/lib/zip_memdup.c
Examining data/libzip-1.7.3/lib/zip_mkstempm.c
Examining data/libzip-1.7.3/lib/zip_name_locate.c
Examining data/libzip-1.7.3/lib/zip_new.c
Examining data/libzip-1.7.3/lib/zip_pkware.c
Examining data/libzip-1.7.3/lib/zip_progress.c
Examining data/libzip-1.7.3/lib/zip_random_unix.c
Examining data/libzip-1.7.3/lib/zip_random_uwp.c
Examining data/libzip-1.7.3/lib/zip_random_win32.c
Examining data/libzip-1.7.3/lib/zip_rename.c
Examining data/libzip-1.7.3/lib/zip_replace.c
Examining data/libzip-1.7.3/lib/zip_set_archive_comment.c
Examining data/libzip-1.7.3/lib/zip_set_archive_flag.c
Examining data/libzip-1.7.3/lib/zip_set_default_password.c
Examining data/libzip-1.7.3/lib/zip_set_file_comment.c
Examining data/libzip-1.7.3/lib/zip_set_file_compression.c
Examining data/libzip-1.7.3/lib/zip_set_name.c
Examining data/libzip-1.7.3/lib/zip_source_accept_empty.c
Examining data/libzip-1.7.3/lib/zip_source_begin_write.c
Examining data/libzip-1.7.3/lib/zip_source_begin_write_cloning.c
Examining data/libzip-1.7.3/lib/zip_source_buffer.c
Examining data/libzip-1.7.3/lib/zip_source_call.c
Examining data/libzip-1.7.3/lib/zip_source_close.c
Examining data/libzip-1.7.3/lib/zip_source_commit_write.c
Examining data/libzip-1.7.3/lib/zip_source_compress.c
Examining data/libzip-1.7.3/lib/zip_source_crc.c
Examining data/libzip-1.7.3/lib/zip_source_error.c
Examining data/libzip-1.7.3/lib/zip_source_file.h
Examining data/libzip-1.7.3/lib/zip_source_file_common.c
Examining data/libzip-1.7.3/lib/zip_source_file_stdio.c
Examining data/libzip-1.7.3/lib/zip_source_file_stdio.h
Examining data/libzip-1.7.3/lib/zip_source_file_stdio_named.c
Examining data/libzip-1.7.3/lib/zip_source_file_win32.c
Examining data/libzip-1.7.3/lib/zip_source_file_win32.h
Examining data/libzip-1.7.3/lib/zip_source_file_win32_ansi.c
Examining data/libzip-1.7.3/lib/zip_source_file_win32_named.c
Examining data/libzip-1.7.3/lib/zip_source_file_win32_utf16.c
Examining data/libzip-1.7.3/lib/zip_source_file_win32_utf8.c
Examining data/libzip-1.7.3/lib/zip_source_free.c
Examining data/libzip-1.7.3/lib/zip_source_function.c
Examining data/libzip-1.7.3/lib/zip_source_get_file_attributes.c
Examining data/libzip-1.7.3/lib/zip_source_is_deleted.c
Examining data/libzip-1.7.3/lib/zip_source_layered.c
Examining data/libzip-1.7.3/lib/zip_source_open.c
Examining data/libzip-1.7.3/lib/zip_source_pkware_decode.c
Examining data/libzip-1.7.3/lib/zip_source_pkware_encode.c
Examining data/libzip-1.7.3/lib/zip_source_read.c
Examining data/libzip-1.7.3/lib/zip_source_remove.c
Examining data/libzip-1.7.3/lib/zip_source_rollback_write.c
Examining data/libzip-1.7.3/lib/zip_source_seek.c
Examining data/libzip-1.7.3/lib/zip_source_seek_write.c
Examining data/libzip-1.7.3/lib/zip_source_stat.c
Examining data/libzip-1.7.3/lib/zip_source_supports.c
Examining data/libzip-1.7.3/lib/zip_source_tell.c
Examining data/libzip-1.7.3/lib/zip_source_tell_write.c
Examining data/libzip-1.7.3/lib/zip_source_window.c
Examining data/libzip-1.7.3/lib/zip_source_winzip_aes_decode.c
Examining data/libzip-1.7.3/lib/zip_source_winzip_aes_encode.c
Examining data/libzip-1.7.3/lib/zip_source_write.c
Examining data/libzip-1.7.3/lib/zip_source_zip.c
Examining data/libzip-1.7.3/lib/zip_source_zip_new.c
Examining data/libzip-1.7.3/lib/zip_stat.c
Examining data/libzip-1.7.3/lib/zip_stat_index.c
Examining data/libzip-1.7.3/lib/zip_stat_init.c
Examining data/libzip-1.7.3/lib/zip_strerror.c
Examining data/libzip-1.7.3/lib/zip_string.c
Examining data/libzip-1.7.3/lib/zip_unchange.c
Examining data/libzip-1.7.3/lib/zip_unchange_all.c
Examining data/libzip-1.7.3/lib/zip_unchange_archive.c
Examining data/libzip-1.7.3/lib/zip_unchange_data.c
Examining data/libzip-1.7.3/lib/zip_utf-8.c
Examining data/libzip-1.7.3/lib/zip_winzip_aes.c
Examining data/libzip-1.7.3/lib/zipint.h
Examining data/libzip-1.7.3/lib/zip.h
Examining data/libzip-1.7.3/lib/zip_open.c
Examining data/libzip-1.7.3/regress/add_from_filep.c
Examining data/libzip-1.7.3/regress/can_clone_file.c
Examining data/libzip-1.7.3/regress/fopen_unchanged.c
Examining data/libzip-1.7.3/regress/fread.c
Examining data/libzip-1.7.3/regress/fseek.c
Examining data/libzip-1.7.3/regress/fuzz_main.c
Examining data/libzip-1.7.3/regress/hole.c
Examining data/libzip-1.7.3/regress/malloc.c
Examining data/libzip-1.7.3/regress/nonrandomopen.c
Examining data/libzip-1.7.3/regress/nonrandomopentest.c
Examining data/libzip-1.7.3/regress/source_hole.c
Examining data/libzip-1.7.3/regress/tryopen.c
Examining data/libzip-1.7.3/regress/zip_read_fuzzer.cc
Examining data/libzip-1.7.3/regress/ziptool_regress.c
Examining data/libzip-1.7.3/src/getopt.c
Examining data/libzip-1.7.3/src/getopt.h
Examining data/libzip-1.7.3/src/zipcmp.c
Examining data/libzip-1.7.3/src/zipmerge.c
Examining data/libzip-1.7.3/src/ziptool.c

FINAL RESULTS:

data/libzip-1.7.3/lib/zip_mkstempm.c:85:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		(void)chmod(path, (mode_t)mode);
data/libzip-1.7.3/lib/compat.h:98:9:  [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 snprintf _snprintf
data/libzip-1.7.3/lib/compat.h:98:18:  [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 snprintf _snprintf
data/libzip-1.7.3/lib/zip_dir_add.c:68:2:  [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(s, name);
data/libzip-1.7.3/lib/zip_error_strerror.c:78:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(s, "%s%s%s", (zs ? zs : ""), (zs ? ": " : ""), ss);
data/libzip-1.7.3/lib/zip_source_file_stdio_named.c:144:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(temp, "%s.XXXXXX", ctx->fname);
data/libzip-1.7.3/lib/zip_source_file_stdio_named.c:181:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(temp, "%s.XXXXXX", ctx->fname);
data/libzip-1.7.3/lib/zip_source_file_stdio_named.c:186:9:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
    if (mktemp(temp) == NULL) {
data/libzip-1.7.3/lib/zip_source_file_win32.h:52:61:  [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.
    HANDLE (__stdcall *create_file)(const void *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file);
data/libzip-1.7.3/lib/zip_source_file_win32_named.c:259:44:  [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.
    HANDLE h = file_ops->create_file(name, access, share_mode, security_attributes, creation_disposition, file_attributes, NULL);
data/libzip-1.7.3/lib/zip_source_file_win32_utf16.c:37:67:  [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.
static HANDLE __stdcall utf16_create_file(const char *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file);
data/libzip-1.7.3/lib/zip_source_file_win32_utf16.c:82:43:  [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.
utf16_create_file(const char *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file) {
data/libzip-1.7.3/lib/zip_source_file_win32_utf16.c:92:47:  [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.
    return CreateFile2((const wchar_t *)name, access, share_mode, creation_disposition, &extParams);
data/libzip-1.7.3/lib/zip_source_file_win32_utf16.c:94:47:  [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.
    return CreateFileW((const wchar_t *)name, access, share_mode, security_attributes, creation_disposition, file_attributes, template_file);
data/libzip-1.7.3/regress/fread.c:77:6:  [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, progname);
data/libzip-1.7.3/regress/fread.c:84: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, progname);
data/libzip-1.7.3/regress/fseek.c:54: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, progname);
data/libzip-1.7.3/regress/tryopen.c:77:6:  [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, TRYOPEN_USAGE, argv[0]);
data/libzip-1.7.3/src/zipcmp.c:167:6:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    printf(USAGE, progname);
data/libzip-1.7.3/src/zipcmp.c:175:6:  [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, progname);
data/libzip-1.7.3/src/zipcmp.c:181: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, progname);
data/libzip-1.7.3/src/zipmerge.c:121:6:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    printf(USAGE, progname);
data/libzip-1.7.3/src/zipmerge.c:129:6:  [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, progname);
data/libzip-1.7.3/src/zipmerge.c:135: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, progname);
data/libzip-1.7.3/lib/zip_random_unix.c:97:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom((unsigned int)time(NULL));
data/libzip-1.7.3/lib/zip_random_unix.c:100:26:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    return (zip_uint32_t)random();
data/libzip-1.7.3/lib/zip_random_uwp.c:77:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand((unsigned int)time(NULL));
data/libzip-1.7.3/lib/zip_random_win32.c:76:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand((unsigned int)time(NULL));
data/libzip-1.7.3/regress/fread.c:70: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, "v")) != -1) {
data/libzip-1.7.3/regress/hole.c:148: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, "du")) != -1) {
data/libzip-1.7.3/regress/malloc.c:85:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((foo = getenv("MALLOC_MAX_COUNT")) != NULL)
data/libzip-1.7.3/regress/malloc.c:87:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((foo = getenv("MALLOC_MIN_SIZE")) != NULL)
data/libzip-1.7.3/regress/tryopen.c:61: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, "cent")) != -1) {
data/libzip-1.7.3/src/getopt.c:59:1:  [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.
getopt(int nargc, char *const *nargv, const char *ostr) {
data/libzip-1.7.3/src/getopt.h:45:12:  [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.
extern int getopt(int, char *const *, const char *);
data/libzip-1.7.3/src/zipcmp.c:147: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, OPTIONS)) != -1) {
data/libzip-1.7.3/src/zipmerge.c:99: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, OPTIONS)) != -1) {
data/libzip-1.7.3/src/ziptool.c:875: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, "ceghl:no:rst" OPTIONS_REGRESS)) != -1) {
data/libzip-1.7.3/examples/in-memory.c:48:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(archive, "rb")) == NULL) {
data/libzip-1.7.3/examples/in-memory.c:105:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(archive, "wb")) == NULL) {
data/libzip-1.7.3/lib/zip_buffer.c:139:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(data, _zip_buffer_get(buffer, length), length);
data/libzip-1.7.3/lib/zip_buffer.c:224: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(dst, src, length);
data/libzip-1.7.3/lib/zip_crypto_win.c:255: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(U, pbSalt, cbSalt);
data/libzip-1.7.3/lib/zip_crypto_win.c:263: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(U, V, DIGEST_SIZE);
data/libzip-1.7.3/lib/zip_crypto_win.c:275:6:  [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(&pbDerivedKey[(i - 1) * DIGEST_SIZE], Ti, DIGEST_SIZE);
data/libzip-1.7.3/lib/zip_crypto_win.c:279:6:  [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(&pbDerivedKey[(i - 1) * DIGEST_SIZE], Ti, r);
data/libzip-1.7.3/lib/zip_dirent.c:222: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(tde, sde, sizeof(*sde));
data/libzip-1.7.3/lib/zip_error_strerror.c:46: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 buf[128], *s;
data/libzip-1.7.3/lib/zip_error_strerror.c:51:2:  [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(buf, "Unknown error %d", err->zip_err);
data/libzip-1.7.3/lib/zip_extra_field.c:353: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[4];
data/libzip-1.7.3/lib/zip_io_util.c:84: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(r, data, length);
data/libzip-1.7.3/lib/zip_memdup.c:53: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(ret, mem, len);
data/libzip-1.7.3/lib/zip_mkstempm.c:82:12:  [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(path, O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC, mode == -1 ? 0666 : (mode_t)mode)) >= 0) {
data/libzip-1.7.3/lib/zip_random_unix.c:69: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("/dev/urandom", O_RDONLY)) < 0) {
data/libzip-1.7.3/lib/zip_source_buffer.c:229: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, &ctx->attributes, sizeof(ctx->attributes));
data/libzip-1.7.3/lib/zip_source_buffer.c:527: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 + n, buffer->fragments[i].data + fragment_offset, left);
data/libzip-1.7.3/lib/zip_source_buffer.c:604: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->fragments[i].data + fragment_offset, data + n, left);
data/libzip-1.7.3/lib/zip_source_compress.c:240: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, ctx->buffer, ctx->size);
data/libzip-1.7.3/lib/zip_source_file.h:79:12:  [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).
    bool (*open)(zip_source_file_context_t *ctx);
data/libzip-1.7.3/lib/zip_source_file_common.c:265: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, &ctx->attributes, sizeof(ctx->attributes));
data/libzip-1.7.3/lib/zip_source_file_common.c:270:20:  [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 (ctx->ops->open(ctx) == false) {
data/libzip-1.7.3/lib/zip_source_file_common.c:358: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, &ctx->st, sizeof(ctx->st));
data/libzip-1.7.3/lib/zip_source_file_stdio.c:201: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(name, flags, 0666)) < 0) {
data/libzip-1.7.3/lib/zip_source_file_stdio_named.c:216:12:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	if ((fd = mkstemp(temp)) < 0) {
data/libzip-1.7.3/lib/zip_source_file_win32_utf8.c:58:12:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    size = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, fname, -1, NULL, 0);
data/libzip-1.7.3/lib/zip_source_file_win32_utf8.c:67:5:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, fname, -1, wfname, size);
data/libzip-1.7.3/lib/zip_source_window.c:245: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, &ctx->attributes, sizeof(ctx->attributes));
data/libzip-1.7.3/lib/zip_source_winzip_aes_decode.c:134: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 computed[SHA1_LENGTH], from_file[HMAC_LENGTH];
data/libzip-1.7.3/lib/zip_string.c:153: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->raw, raw, length);
data/libzip-1.7.3/lib/zip_winzip_aes.c:128: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(password_verify, buffer + (2 * key_size / 8), WINZIP_AES_PASSWORD_VERIFY_LENGTH);
data/libzip-1.7.3/regress/add_from_filep.c:71:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(file, "rb")) == NULL) {
data/libzip-1.7.3/regress/can_clone_file.c:89: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 namea[32] = "a.fioclone.XXXXXX";
data/libzip-1.7.3/regress/can_clone_file.c:90: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 nameb[32] = "b.fioclone.XXXXXX";
data/libzip-1.7.3/regress/can_clone_file.c:94:16:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    if ((fda = mkstemp(namea)) < 0) {
data/libzip-1.7.3/regress/can_clone_file.c:98:16:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    if ((fdb = mkstemp(nameb)) < 0) {
data/libzip-1.7.3/regress/fread.c:174: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 b[8192];
data/libzip-1.7.3/regress/fseek.c:49: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 b[1024];
data/libzip-1.7.3/regress/fuzz_main.c:18: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).
    f = fopen(argv[1], "rb");
data/libzip-1.7.3/regress/source_hole.c:133:11:  [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).
	if ((f = fopen(fname, "rb")) == NULL) {
data/libzip-1.7.3/regress/source_hole.c:191:6:  [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 + n, buffer->fragment[i] + fragment_offset, left);
data/libzip-1.7.3/regress/source_hole.c:292:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(fname, "wb");
data/libzip-1.7.3/regress/source_hole.c:381:6:  [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->fragment[idx] + fragment_offset, data + n, left);
data/libzip-1.7.3/regress/zip_read_fuzzer.cc:11: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 buf[32768];
data/libzip-1.7.3/regress/ziptool_regress.c:156:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(archive, "rb")) == NULL) {
data/libzip-1.7.3/regress/ziptool_regress.c:373:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen(archive, "wb")) == NULL) {
data/libzip-1.7.3/src/zipcmp.c:116:150:  [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 int compare_list(char *const name[], const void *l[], const zip_uint64_t n[], int size, int (*cmp)(const void *, const void *), int (*checks)(char *const name[2], const void *, const void *), void (*print)(const void *));
data/libzip-1.7.3/src/zipcmp.c:118: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 int ef_compare(char *const name[2], const struct entry *e1, const struct entry *e2);
data/libzip-1.7.3/src/zipcmp.c:123:34:  [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 int entry_paranoia_checks(char *const name[2], const void *p1, const void *p2);
data/libzip-1.7.3/src/zipcmp.c:274:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((f = fopen(fname, "rb")) == NULL) {
data/libzip-1.7.3/src/zipcmp.c:315:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char *const names[2] = {(char *)name, NULL};
data/libzip-1.7.3/src/zipcmp.c:459: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.
compare_list(char *const name[2], const void *l[2], const zip_uint64_t n[2], int size, int (*cmp)(const void *, const void *), int (*check)(char *const name[2], const void *, const void *), void (*print)(const void *)) {
data/libzip-1.7.3/src/zipcmp.c:459:141:  [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.
compare_list(char *const name[2], const void *l[2], const zip_uint64_t n[2], int size, int (*cmp)(const void *, const void *), int (*check)(char *const name[2], const void *, const void *), void (*print)(const void *)) {
data/libzip-1.7.3/src/zipcmp.c:464:40:  [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.
#define INC(k) (i[k]++, l[k] = ((const char *)l[k]) + size)
data/libzip-1.7.3/src/zipcmp.c:546: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.
ef_compare(char *const name[2], const struct entry *e1, const struct entry *e2) {
data/libzip-1.7.3/src/zipcmp.c:613: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.
entry_paranoia_checks(char *const name[2], const void *p1, const void *p2) {
data/libzip-1.7.3/src/zipcmp.c:670: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 buf[8192];
data/libzip-1.7.3/src/zipmerge.c:175: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 line[1024];
data/libzip-1.7.3/src/ziptool.c:175: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 buf[8192];
data/libzip-1.7.3/src/ziptool.c:570: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 buf[100];
data/libzip-1.7.3/src/ziptool.c:912:6:  [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 reason[128];
data/libzip-1.7.3/lib/zip_crypto_mbedtls.c:151:87:  [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 (mbedtls_ctr_drbg_seed(&ctx->ctr_drbg, mbedtls_entropy_func, &ctx->entropy, pers, strlen(pers)) != 0) {
data/libzip-1.7.3/lib/zip_dir_add.c:61:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(name);
data/libzip-1.7.3/lib/zip_dirent.c:249:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    _zip_crypto_clear(zde->password, strlen(zde->password));
data/libzip-1.7.3/lib/zip_error_strerror.c:75: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).
	if ((s = (char *)malloc(strlen(ss) + (zs ? strlen(zs) + 2 : 0) + 1)) == NULL)
data/libzip-1.7.3/lib/zip_error_strerror.c:75:45:  [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 ((s = (char *)malloc(strlen(ss) + (zs ? strlen(zs) + 2 : 0) + 1)) == NULL)
data/libzip-1.7.3/lib/zip_file_rename.c:45:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (idx >= za->nentry || (name != NULL && strlen(name) > ZIP_UINT16_MAX)) {
data/libzip-1.7.3/lib/zip_file_rename.c:58: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).
    new_is_dir = (name != NULL && name[strlen(name) - 1] == '/');
data/libzip-1.7.3/lib/zip_file_rename.c:59: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).
    old_is_dir = (old_name[strlen(old_name) - 1] == '/');
data/libzip-1.7.3/lib/zip_file_set_encryption.c:67:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		_zip_crypto_clear(e->changes->password, strlen(e->changes->password));
data/libzip-1.7.3/lib/zip_file_set_encryption.c:91:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    _zip_crypto_clear(our_password, strlen(our_password));
data/libzip-1.7.3/lib/zip_file_set_encryption.c:107:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		_zip_crypto_clear(e->changes->password, strlen(e->changes->password));
data/libzip-1.7.3/lib/zip_mkstempm.c:52:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    end = path + strlen(path);
data/libzip-1.7.3/lib/zip_random_unix.c:73:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, buffer, length) != length) {
data/libzip-1.7.3/lib/zip_set_name.c:62:70:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((str = _zip_string_new((const zip_uint8_t *)name, (zip_uint16_t)strlen(name), flags, &za->error)) == NULL)
data/libzip-1.7.3/lib/zip_source_file.h:80:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    zip_int64_t (*read)(zip_source_file_context_t *ctx, void *buf, zip_uint64_t len);
data/libzip-1.7.3/lib/zip_source_file_common.c:295:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((i = ctx->ops->read(ctx, buf, n)) < 0) {
data/libzip-1.7.3/lib/zip_source_file_stdio_named.c:132:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((temp = (char *)malloc(strlen(ctx->fname) + 8)) == NULL) {
data/libzip-1.7.3/lib/zip_source_file_stdio_named.c:177:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((temp = (char *)malloc(strlen(ctx->fname) + 8)) == NULL) {
data/libzip-1.7.3/lib/zip_source_file_win32_ansi.c:73:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    *lengthp = strlen(name) + extra_chars;
data/libzip-1.7.3/lib/zip_source_file_win32_utf16.c:76:16:  [1] (buffer) wcslen:
  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).
    *lengthp = wcslen((const wchar_t *)name) + extra_chars;
data/libzip-1.7.3/lib/zip_source_pkware_decode.c:143:76:  [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).
	_zip_pkware_decrypt(&ctx->keys, NULL, (const zip_uint8_t *)ctx->password, strlen(ctx->password));
data/libzip-1.7.3/lib/zip_source_pkware_encode.c:132:76:  [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).
	_zip_pkware_encrypt(&ctx->keys, NULL, (const zip_uint8_t *)ctx->password, strlen(ctx->password));
data/libzip-1.7.3/lib/zip_source_winzip_aes_decode.c:119:75:  [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 ((ctx->aes_ctx = _zip_winzip_aes_new((zip_uint8_t *)ctx->password, strlen(ctx->password), header, ctx->encryption_method, password_verification, &ctx->error)) == NULL) {
data/libzip-1.7.3/lib/zip_source_winzip_aes_decode.c:236:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    _zip_crypto_clear(ctx->password, strlen(ctx->password));
data/libzip-1.7.3/lib/zip_source_winzip_aes_encode.c:91:75:  [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 ((ctx->aes_ctx = _zip_winzip_aes_new((zip_uint8_t *)ctx->password, strlen(ctx->password), ctx->data, ctx->encryption_method, ctx->data + salt_length, &ctx->error)) == NULL) {
data/libzip-1.7.3/lib/zip_source_winzip_aes_encode.c:222:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    _zip_crypto_clear(ctx->password, strlen(ctx->password));
data/libzip-1.7.3/regress/fopen_unchanged.c:66: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).
    if ((zs = zip_source_buffer(za, teststr, strlen(teststr), 0)) == NULL) {
data/libzip-1.7.3/src/zipcmp.c:322: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).
    prefix_length = strlen(name) + 1;
data/libzip-1.7.3/src/ziptool.c:87: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).
    if ((zs = zip_source_buffer(za, argv[1], strlen(argv[1]), 0)) == NULL) {
data/libzip-1.7.3/src/ziptool.c:428:45:  [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 ((s = zip_source_buffer(za, content, strlen(content), 0)) == NULL || zip_file_replace(za, idx, s, 0) < 0) {
data/libzip-1.7.3/src/ziptool.c:447:77:  [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 ((zip_file_extra_field_set(za, idx, eid, eidx, efdata, (zip_uint16_t)strlen((const char *)efdata), geflags)) < 0) {
data/libzip-1.7.3/src/ziptool.c:456:60:  [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 (zip_set_archive_comment(za, argv[0], (zip_uint16_t)strlen(argv[0])) < 0) {
data/libzip-1.7.3/src/ziptool.c:467:62:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (zip_file_set_comment(za, idx, argv[1], (zip_uint16_t)strlen(argv[1]), 0) < 0) {
data/libzip-1.7.3/src/ziptool.c:497: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(password) == 0) {

ANALYSIS SUMMARY:

Hits = 134
Lines analyzed = 23940 in approximately 0.79 seconds (30376 lines/second)
Physical Source Lines of Code (SLOC) = 14443
Hits@level = [0] 228 [1]  34 [2]  62 [3]  14 [4]  23 [5]   1
Hits@level+ = [0+] 362 [1+] 134 [2+] 100 [3+]  38 [4+]  24 [5+]   1
Hits/KSLOC@level+ = [0+] 25.064 [1+] 9.27785 [2+] 6.92377 [3+] 2.63103 [4+] 1.6617 [5+] 0.0692377
Dot directories skipped = 2 (--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.