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/zlib-1.2.11.dfsg/crc32.h
Examining data/zlib-1.2.11.dfsg/uncompr.c
Examining data/zlib-1.2.11.dfsg/inftrees.c
Examining data/zlib-1.2.11.dfsg/gzlib.c
Examining data/zlib-1.2.11.dfsg/gzguts.h
Examining data/zlib-1.2.11.dfsg/inflate.h
Examining data/zlib-1.2.11.dfsg/trees.h
Examining data/zlib-1.2.11.dfsg/crc32.c
Examining data/zlib-1.2.11.dfsg/infback.c
Examining data/zlib-1.2.11.dfsg/adler32.c
Examining data/zlib-1.2.11.dfsg/zutil.h
Examining data/zlib-1.2.11.dfsg/gzwrite.c
Examining data/zlib-1.2.11.dfsg/zutil.c
Examining data/zlib-1.2.11.dfsg/inffast.h
Examining data/zlib-1.2.11.dfsg/inflate.c
Examining data/zlib-1.2.11.dfsg/test/example.c
Examining data/zlib-1.2.11.dfsg/test/infcover.c
Examining data/zlib-1.2.11.dfsg/test/minigzip.c
Examining data/zlib-1.2.11.dfsg/trees.c
Examining data/zlib-1.2.11.dfsg/zlib.h
Examining data/zlib-1.2.11.dfsg/zconf.h
Examining data/zlib-1.2.11.dfsg/gzclose.c
Examining data/zlib-1.2.11.dfsg/deflate.c
Examining data/zlib-1.2.11.dfsg/compress.c
Examining data/zlib-1.2.11.dfsg/inffixed.h
Examining data/zlib-1.2.11.dfsg/inffast.c
Examining data/zlib-1.2.11.dfsg/examples/enough.c
Examining data/zlib-1.2.11.dfsg/examples/gzlog.c
Examining data/zlib-1.2.11.dfsg/examples/zran.c
Examining data/zlib-1.2.11.dfsg/examples/fitblk.c
Examining data/zlib-1.2.11.dfsg/examples/zpipe.c
Examining data/zlib-1.2.11.dfsg/examples/gzlog.h
Examining data/zlib-1.2.11.dfsg/examples/gun.c
Examining data/zlib-1.2.11.dfsg/examples/gzjoin.c
Examining data/zlib-1.2.11.dfsg/examples/gzappend.c
Examining data/zlib-1.2.11.dfsg/contrib/testzlib/testzlib.c
Examining data/zlib-1.2.11.dfsg/contrib/minizip/iowin32.h
Examining data/zlib-1.2.11.dfsg/contrib/minizip/mztools.h
Examining data/zlib-1.2.11.dfsg/contrib/minizip/zip.c
Examining data/zlib-1.2.11.dfsg/contrib/minizip/unzip.c
Examining data/zlib-1.2.11.dfsg/contrib/minizip/crypt.h
Examining data/zlib-1.2.11.dfsg/contrib/minizip/ioapi.c
Examining data/zlib-1.2.11.dfsg/contrib/minizip/iowin32.c
Examining data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c
Examining data/zlib-1.2.11.dfsg/contrib/minizip/unzip.h
Examining data/zlib-1.2.11.dfsg/contrib/minizip/ioapi.h
Examining data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c
Examining data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c
Examining data/zlib-1.2.11.dfsg/contrib/minizip/zip.h
Examining data/zlib-1.2.11.dfsg/deflate.h
Examining data/zlib-1.2.11.dfsg/gzread.c
Examining data/zlib-1.2.11.dfsg/inftrees.h

FINAL RESULTS:

data/zlib-1.2.11.dfsg/examples/gun.c:527:11:  [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(to, was.st_mode & 07777);
data/zlib-1.2.11.dfsg/examples/gun.c:530:11:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    (void)chown(to, was.st_uid, was.st_gid);
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:154: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(buffer,newdir);
data/zlib-1.2.11.dfsg/examples/gzlog.c:586:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(dest, log->path);
data/zlib-1.2.11.dfsg/examples/gzlog.c:878:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(log->id, LOGID);
data/zlib-1.2.11.dfsg/examples/gzlog.c:888:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(log->path, path);
data/zlib-1.2.11.dfsg/examples/zran.c:75:8:  [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.
struct access {
data/zlib-1.2.11.dfsg/examples/zran.c:82:30:  [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.
local void free_index(struct access *index)
data/zlib-1.2.11.dfsg/examples/zran.c:92:14:  [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.
local struct access *addpoint(struct access *index, int bits,
data/zlib-1.2.11.dfsg/examples/zran.c:92:38:  [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.
local struct access *addpoint(struct access *index, int bits,
data/zlib-1.2.11.dfsg/examples/zran.c:99:38:  [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.
        index = malloc(sizeof(struct access));
data/zlib-1.2.11.dfsg/examples/zran.c:144:52:  [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.
local int build_index(FILE *in, off_t span, struct access **built)
data/zlib-1.2.11.dfsg/examples/zran.c:149:12:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    struct access *index;       /* access points being generated */
data/zlib-1.2.11.dfsg/examples/zran.c:249:36:  [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.
local int extract(FILE *in, struct access *index, off_t offset,
data/zlib-1.2.11.dfsg/examples/zran.c:359:12:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    struct access *index = NULL;
data/zlib-1.2.11.dfsg/gzguts.h:86:18:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    if !defined(vsnprintf) && !defined(NO_vsnprintf)
data/zlib-1.2.11.dfsg/gzguts.h:88:18:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#         define vsnprintf _vsnprintf
data/zlib-1.2.11.dfsg/gzguts.h:110:11:  [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/zlib-1.2.11.dfsg/gzguts.h:110:20:  [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/zlib-1.2.11.dfsg/gzlib.c:216:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(state->path, path);
data/zlib-1.2.11.dfsg/gzlib.c:614:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(state->msg, state->path);
data/zlib-1.2.11.dfsg/gzlib.c:616:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(state->msg, msg);
data/zlib-1.2.11.dfsg/gzwrite.c:417:11:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    (void)vsprintf(next, format, va);
data/zlib-1.2.11.dfsg/gzwrite.c:421:11:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    len = vsprintf(next, format, va);
data/zlib-1.2.11.dfsg/gzwrite.c:425:11:  [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.
    (void)vsnprintf(next, state->size, format, va);
data/zlib-1.2.11.dfsg/gzwrite.c:428:11:  [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.
    len = vsnprintf(next, state->size, format, va);
data/zlib-1.2.11.dfsg/gzwrite.c:511:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12,
data/zlib-1.2.11.dfsg/gzwrite.c:517:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11,
data/zlib-1.2.11.dfsg/gzwrite.c:522:5:  [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(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9,
data/zlib-1.2.11.dfsg/gzwrite.c:526:11:  [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.
    len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8,
data/zlib-1.2.11.dfsg/test/infcover.c:529:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(prefix, id);
data/zlib-1.2.11.dfsg/test/infcover.c:555:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(prefix, id);
data/zlib-1.2.11.dfsg/test/minigzip.c:44:11:  [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/zlib-1.2.11.dfsg/test/minigzip.c:44:20:  [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/zlib-1.2.11.dfsg/test/minigzip.c:473:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(outfile, file);
data/zlib-1.2.11.dfsg/test/minigzip.c:474:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(outfile, GZ_SUFFIX);
data/zlib-1.2.11.dfsg/test/minigzip.c:513:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(buf, file);
data/zlib-1.2.11.dfsg/test/minigzip.c:526:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(infile, GZ_SUFFIX);
data/zlib-1.2.11.dfsg/zutil.h:242:39:  [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.
#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
data/zlib-1.2.11.dfsg/zutil.h:243:39:  [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.
#  define Tracev(x) {if (z_verbose>0) fprintf x ;}
data/zlib-1.2.11.dfsg/zutil.h:244:40:  [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.
#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
data/zlib-1.2.11.dfsg/zutil.h:245:48:  [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.
#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
data/zlib-1.2.11.dfsg/zutil.h:246:49:  [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.
#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
data/zlib-1.2.11.dfsg/contrib/minizip/crypt.h:112:9:  [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)(time(NULL) ^ ZCR_SEED2));
data/zlib-1.2.11.dfsg/contrib/minizip/crypt.h:100: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 header[RAND_HEAD_LEN-2]; /* random header */
data/zlib-1.2.11.dfsg/contrib/minizip/ioapi.c:19:36:  [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).
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
data/zlib-1.2.11.dfsg/contrib/minizip/ioapi.c:109:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        file = fopen(filename, mode_fopen);
data/zlib-1.2.11.dfsg/contrib/minizip/ioapi.h:49:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define fopen64 fopen
data/zlib-1.2.11.dfsg/contrib/minizip/ioapi.h:54:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define fopen64 fopen
data/zlib-1.2.11.dfsg/contrib/minizip/ioapi.h:59:18:  [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).
 #define fopen64 fopen
data/zlib-1.2.11.dfsg/contrib/minizip/iowin32.c:112:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200);
data/zlib-1.2.11.dfsg/contrib/minizip/iowin32.c:137:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200);
data/zlib-1.2.11.dfsg/contrib/minizip/iowin32.c:185:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
        MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200);
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:32:36:  [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).
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:209: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 number[21];
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:248:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char filename_inzip[256];
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:318: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 filename_inzip[256];
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:386:21:  [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 answer[128];
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:541: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 filename_try[MAXFILENAME+16] = "";
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:621:13:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            strcat(filename_try,".zip");
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:33:36:  [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).
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:110: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 name[MAXFILENAME+1];
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:255: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 filename_try[MAXFILENAME+16];
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:334:13:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            strcat(filename_try,".zip");
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:349:21:  [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 answer[128];
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:38:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE* fpZip = fopen(file, "rb");
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:39:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE* fpOut = fopen(fileOut, "wb");
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:40:19:  [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* fpOutCD = fopen(fileOutTmp, "wb");
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:44: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 header[30];
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:45: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 filename[1024];
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.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 extra[1024];
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:149: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.
          char header[46];
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:224:7:  [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 header[22];
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:257:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      fpOutCD = fopen(fileOutTmp, "rb");
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:260:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[8192];
data/zlib-1.2.11.dfsg/contrib/minizip/unzip.c:1266:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
data/zlib-1.2.11.dfsg/contrib/minizip/unzip.c:1482: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 source[12];
data/zlib-1.2.11.dfsg/contrib/minizip/zip.c:120: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 data[SIZEDATA_INDATABLOCK];
data/zlib-1.2.11.dfsg/contrib/minizip/zip.c:289:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[8];
data/zlib-1.2.11.dfsg/contrib/minizip/zip.c:1246:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char bufHead[RAND_HEAD_LEN];
data/zlib-1.2.11.dfsg/contrib/minizip/zip.c:1980: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(pTmp, p, dataSize + 4);
data/zlib-1.2.11.dfsg/contrib/minizip/zip.c:1994: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(pData, pNewHeader, size);
data/zlib-1.2.11.dfsg/contrib/testzlib/testzlib.c:124:12:  [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).
    stream=fopen(filename, "rb");
data/zlib-1.2.11.dfsg/contrib/testzlib/testzlib.c:175:27:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        BlockSizeCompress=atol(argv[2]);
data/zlib-1.2.11.dfsg/contrib/testzlib/testzlib.c:178:29:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        BlockSizeUncompress=atol(argv[3]);
data/zlib-1.2.11.dfsg/contrib/testzlib/testzlib.c:181:23:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        cprLevel=(int)atol(argv[4]);
data/zlib-1.2.11.dfsg/crc32.c:143: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).
        out = fopen("crc32.h", "w");
data/zlib-1.2.11.dfsg/examples/enough.c:476:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        syms = atoi(argv[1]);
data/zlib-1.2.11.dfsg/examples/enough.c:478:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            root = atoi(argv[2]);
data/zlib-1.2.11.dfsg/examples/enough.c:480:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                max = atoi(argv[3]);
data/zlib-1.2.11.dfsg/examples/fitblk.c:76: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 raw[RAWLEN];
data/zlib-1.2.11.dfsg/examples/fitblk.c:99: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 raw[RAWLEN];
data/zlib-1.2.11.dfsg/examples/gun.c:161:10:  [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 inbuf[SIZE];              /* input buffer */
data/zlib-1.2.11.dfsg/examples/gun.c:162:10:  [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 outbuf[SIZE];             /* output buffer */
data/zlib-1.2.11.dfsg/examples/gun.c:164:10:  [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 suffix[65536];            /* one-character LZW suffix */
data/zlib-1.2.11.dfsg/examples/gun.c:165:10:  [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 match[65280 + 2];         /* buffer for reversed match or gzip
data/zlib-1.2.11.dfsg/examples/gun.c:559:18:  [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).
        infile = open(inname, O_RDONLY, 0);
data/zlib-1.2.11.dfsg/examples/gun.c:572:19:  [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).
        outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666);
data/zlib-1.2.11.dfsg/examples/gun.c:689:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(outname, *argv, len);
data/zlib-1.2.11.dfsg/examples/gzappend.c:140:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(list, list + 1, len - 1);
data/zlib-1.2.11.dfsg/examples/gzappend.c:270:13:  [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).
    gz.fd = open(name, O_RDWR, 0);
data/zlib-1.2.11.dfsg/examples/gzappend.c:397:14:  [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(name, O_RDONLY, 0);
data/zlib-1.2.11.dfsg/examples/gzjoin.c:108:14:  [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).
    in->fd = open(name, O_RDONLY, 0);
data/zlib-1.2.11.dfsg/examples/gzlog.c:290: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 id[4];     /* contains LOGID to detect inadvertent overwrites */
data/zlib-1.2.11.dfsg/examples/gzlog.c:353:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".lock");
data/zlib-1.2.11.dfsg/examples/gzlog.c:354:18:  [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).
    while ((fd = open(log->path, O_CREAT | O_EXCL, 0644)) < 0) {
data/zlib-1.2.11.dfsg/examples/gzlog.c:376:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".lock");
data/zlib-1.2.11.dfsg/examples/gzlog.c:388:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".lock");
data/zlib-1.2.11.dfsg/examples/gzlog.c:400:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".lock");
data/zlib-1.2.11.dfsg/examples/gzlog.c:413:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[HEAD + EXTRA];
data/zlib-1.2.11.dfsg/examples/gzlog.c:440: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 ext[EXTRA];
data/zlib-1.2.11.dfsg/examples/gzlog.c:465:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[6];
data/zlib-1.2.11.dfsg/examples/gzlog.c:505:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[8];
data/zlib-1.2.11.dfsg/examples/gzlog.c:559:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".add");
data/zlib-1.2.11.dfsg/examples/gzlog.c:577:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".add");
data/zlib-1.2.11.dfsg/examples/gzlog.c:582:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".dict");
data/zlib-1.2.11.dfsg/examples/gzlog.c:587:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".temp");
data/zlib-1.2.11.dfsg/examples/gzlog.c:615:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[DICT];
data/zlib-1.2.11.dfsg/examples/gzlog.c:628:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(log->end, ".dict");
data/zlib-1.2.11.dfsg/examples/gzlog.c:629:14:  [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(log->path, O_RDONLY, 0);
data/zlib-1.2.11.dfsg/examples/gzlog.c:724:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".repairs");
data/zlib-1.2.11.dfsg/examples/gzlog.c:725: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).
    rec = fopen(log->path, "a");
data/zlib-1.2.11.dfsg/examples/gzlog.c:750:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(log->end, ".add");
data/zlib-1.2.11.dfsg/examples/gzlog.c:758:23:  [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(log->path, O_RDONLY, 0)) < 0) {
data/zlib-1.2.11.dfsg/examples/gzlog.c:828:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".gz");
data/zlib-1.2.11.dfsg/examples/gzlog.c:829: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).
    log->fd = open(log->path, O_RDWR | O_CREAT, 0644);
data/zlib-1.2.11.dfsg/examples/gzlog.c:843:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(log->end, ".dict");
data/zlib-1.2.11.dfsg/examples/gzlog.c:913: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 *data, buf[5];
data/zlib-1.2.11.dfsg/examples/gzlog.c:952:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(log->end, ".add");
data/zlib-1.2.11.dfsg/examples/gzlog.c:953:14:  [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(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
data/zlib-1.2.11.dfsg/examples/gzlog.c:962:9:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        strcpy(log->end, ".temp");
data/zlib-1.2.11.dfsg/examples/gzlog.c:963:14:  [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(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
data/zlib-1.2.11.dfsg/examples/gzlog.c:1013:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->end, ".add");
data/zlib-1.2.11.dfsg/examples/gzlog.c:1014:10:  [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(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
data/zlib-1.2.11.dfsg/examples/gzlog.c:1056:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(log->id, "bad");
data/zlib-1.2.11.dfsg/examples/zpipe.c:41: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 in[CHUNK];
data/zlib-1.2.11.dfsg/examples/zpipe.c:42: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 out[CHUNK];
data/zlib-1.2.11.dfsg/examples/zpipe.c:97: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 in[CHUNK];
data/zlib-1.2.11.dfsg/examples/zpipe.c:98: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 out[CHUNK];
data/zlib-1.2.11.dfsg/examples/zran.c:71:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char window[WINSIZE];  /* preceding 32K of uncompressed data */
data/zlib-1.2.11.dfsg/examples/zran.c:127:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(next->window, window + WINSIZE - left, left);
data/zlib-1.2.11.dfsg/examples/zran.c:129:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(next->window + left, window, WINSIZE - left);
data/zlib-1.2.11.dfsg/examples/zran.c:151: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 input[CHUNK];
data/zlib-1.2.11.dfsg/examples/zran.c:152: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 window[WINSIZE];
data/zlib-1.2.11.dfsg/examples/zran.c:255: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 input[CHUNK];
data/zlib-1.2.11.dfsg/examples/zran.c:256: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 discard[WINSIZE];
data/zlib-1.2.11.dfsg/examples/zran.c:360:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[CHUNK];
data/zlib-1.2.11.dfsg/examples/zran.c:367:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    in = fopen(argv[1], "rb");
data/zlib-1.2.11.dfsg/gzguts.h:47: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).
#  define open _open
data/zlib-1.2.11.dfsg/gzlib.c:36:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char buf[1024];
data/zlib-1.2.11.dfsg/gzlib.c:65:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "unknown win32 error (%ld)", error);
data/zlib-1.2.11.dfsg/gzlib.c:245:9:  [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).
        open((const char *)path, oflag, 0666));
data/zlib-1.2.11.dfsg/gzlib.c:298:5:  [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(path, "<fd:%d>", fd);   /* for debugging */
data/zlib-1.2.11.dfsg/gzlib.c:615:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    strcat(state->msg, ": ");
data/zlib-1.2.11.dfsg/gzread.c:161:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(state->x.next, strm->next_in, strm->avail_in);
data/zlib-1.2.11.dfsg/gzread.c:325:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buf, state->x.next, n);
data/zlib-1.2.11.dfsg/gzread.c:451:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[1];
data/zlib-1.2.11.dfsg/gzread.c:591:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(buf, state->x.next, n);
data/zlib-1.2.11.dfsg/gzwrite.c:213:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(state->in + have, buf, copy);
data/zlib-1.2.11.dfsg/gzwrite.c:309:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[1];
data/zlib-1.2.11.dfsg/gzwrite.c:444:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(state->in, state->in + state->size, left);
data/zlib-1.2.11.dfsg/gzwrite.c:543:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(state->in, state->in + state->size, left);
data/zlib-1.2.11.dfsg/inflate.c:640: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 hbuf[4];      /* buffer for gzip header crc calculation */
data/zlib-1.2.11.dfsg/inflate.c:1405:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[4];       /* to restore bit buffer to byte string */
data/zlib-1.2.11.dfsg/test/example.c:98:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy((char*)uncompr, "garbage");
data/zlib-1.2.11.dfsg/test/example.c:149:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy((char*)uncompr, "garbage");
data/zlib-1.2.11.dfsg/test/example.c:245:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy((char*)uncompr, "garbage");
data/zlib-1.2.11.dfsg/test/example.c:341:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy((char*)uncompr, "garbage");
data/zlib-1.2.11.dfsg/test/example.c:420:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy((char*)uncompr, "garbage");
data/zlib-1.2.11.dfsg/test/example.c:501:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy((char*)uncompr, "garbage");
data/zlib-1.2.11.dfsg/test/infcover.c:392: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 dict[257];
data/zlib-1.2.11.dfsg/test/infcover.c:474: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 win[32768];
data/zlib-1.2.11.dfsg/test/infcover.c:530:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
    strcat(prefix, "-late");
data/zlib-1.2.11.dfsg/test/infcover.c:556:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
        strcat(prefix, "-back");
data/zlib-1.2.11.dfsg/test/minigzip.c:83:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char buf[1024];
data/zlib-1.2.11.dfsg/test/minigzip.c:112:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "unknown win32 error (%ld)", error);
data/zlib-1.2.11.dfsg/test/minigzip.c:223:31:  [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).
                              fopen(path, gz->write ? "wb" : "rb");
data/zlib-1.2.11.dfsg/test/minigzip.c:242: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 out[BUFLEN];
data/zlib-1.2.11.dfsg/test/minigzip.c:267: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 in[1];
data/zlib-1.2.11.dfsg/test/minigzip.c:301: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 out[BUFLEN];
data/zlib-1.2.11.dfsg/test/minigzip.c:366: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.
    local char buf[BUFLEN];
data/zlib-1.2.11.dfsg/test/minigzip.c:434: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.
    local char buf[BUFLEN];
data/zlib-1.2.11.dfsg/test/minigzip.c:461: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.
    local char outfile[MAX_NAME_LEN];
data/zlib-1.2.11.dfsg/test/minigzip.c:477:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    in = fopen(file, "rb");
data/zlib-1.2.11.dfsg/test/minigzip.c:499: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.
    local char buf[MAX_NAME_LEN];
data/zlib-1.2.11.dfsg/test/minigzip.c:534: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).
    out = fopen(outfile, "wb");
data/zlib-1.2.11.dfsg/test/minigzip.c:563: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 *bname, outmode[20];
data/zlib-1.2.11.dfsg/test/minigzip.c:568:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(outmode, "wb6 ");
data/zlib-1.2.11.dfsg/test/minigzip.c:633:33:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                    FILE * in = fopen(*argv, "rb");
data/zlib-1.2.11.dfsg/trees.c:328:20:  [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 *header = fopen("trees.h", "w");
data/zlib-1.2.11.dfsg/zutil.c:13:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
z_const char * const z_errmsg[10] = {
data/zlib-1.2.11.dfsg/zutil.h:49: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.
extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
data/zlib-1.2.11.dfsg/zutil.h:109:6:  [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).
     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
data/zlib-1.2.11.dfsg/zutil.h:202:30:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#  define F_OPEN(name, mode) fopen((name), (mode))
data/zlib-1.2.11.dfsg/zutil.h:226:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#    define zmemcpy memcpy
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:143:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int  len = (int)strlen(newdir);
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:390:27:  [1] (buffer) scanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                    ret = scanf("%1s",answer);
data/zlib-1.2.11.dfsg/contrib/minizip/miniunz.c:609:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(filename_try, zipfilename,MAXFILENAME-1);
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:111:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen(f);
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:115:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(name, f,MAXFILENAME-1);
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:324:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(filename_try, argv[zipfilenamearg],MAXFILENAME-1);
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:328: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).
        len=(int)strlen(filename_try);
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:352:27:  [1] (buffer) scanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
                    ret = scanf("%1s",answer);
data/zlib-1.2.11.dfsg/contrib/minizip/minizip.c:396: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).
                  (strlen(argv[i]) == 2)))
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:151:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          int comsize = (int) strlen(comment);
data/zlib-1.2.11.dfsg/contrib/minizip/mztools.c:226:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      int comsize = (int) strlen(comment);
data/zlib-1.2.11.dfsg/contrib/minizip/unzip.c:1249: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(szFileName)>=UNZ_MAXFILENAMEINZIP)
data/zlib-1.2.11.dfsg/contrib/minizip/zip.c:962: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).
  uInt size_filename = (uInt)strlen(filename);
data/zlib-1.2.11.dfsg/contrib/minizip/zip.c:1101: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).
        size_comment = (uInt)strlen(comment);
data/zlib-1.2.11.dfsg/contrib/minizip/zip.c:1103: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_filename = (uInt)strlen(filename);
data/zlib-1.2.11.dfsg/contrib/minizip/zip.c:1870:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_global_comment = (uInt)strlen(global_comment);
data/zlib-1.2.11.dfsg/examples/gun.c:103:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ret = (int)read(me->infile, next, ret);
data/zlib-1.2.11.dfsg/examples/gun.c:669: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).
                len = (int)strlen(*argv);
data/zlib-1.2.11.dfsg/examples/gzappend.c:184:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    len = read(in->fd, in->buf, 1 << in->size);
data/zlib-1.2.11.dfsg/examples/gzappend.c:356:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name);
data/zlib-1.2.11.dfsg/examples/gzappend.c:375:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name);
data/zlib-1.2.11.dfsg/examples/gzappend.c:411:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len = read(fd, in, CHUNK);
data/zlib-1.2.11.dfsg/examples/gzjoin.c:131:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left);
data/zlib-1.2.11.dfsg/examples/gzjoin.c:183:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(in->fd, in->buf, 1) != 1)
data/zlib-1.2.11.dfsg/examples/gzlog.c:416:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(log->fd, buf, HEAD + EXTRA) != HEAD + EXTRA ||
data/zlib-1.2.11.dfsg/examples/gzlog.c:477:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                      read(log->fd, buf, 1) != 1))
data/zlib-1.2.11.dfsg/examples/gzlog.c:583:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    dest = malloc(strlen(log->path) + 1);
data/zlib-1.2.11.dfsg/examples/gzlog.c:631:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            dict = read(fd, buf, DICT);
data/zlib-1.2.11.dfsg/examples/gzlog.c:646:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read(log->fd, buf, 1) != 1 || lseek(log->fd, -1, SEEK_CUR) < 0) {
data/zlib-1.2.11.dfsg/examples/gzlog.c:678:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read(log->fd, buf, 1) != 1)
data/zlib-1.2.11.dfsg/examples/gzlog.c:762:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ret = (size_t)read(fd, data, len) != len;
data/zlib-1.2.11.dfsg/examples/gzlog.c:882: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).
    n = strlen(path);
data/zlib-1.2.11.dfsg/examples/gzlog.c:939:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(log->fd, buf, 5) != 5)
data/zlib-1.2.11.dfsg/examples/gzlog.c:943:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                read(log->fd, (char *)data + next, block) != block)
data/zlib-1.2.11.dfsg/examples/zran.c:281:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ret = getc(in);
data/zlib-1.2.11.dfsg/gzguts.h:48:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#  define read _read
data/zlib-1.2.11.dfsg/gzlib.c:199:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen((const char *)path);
data/zlib-1.2.11.dfsg/gzlib.c:605: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).
    if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) ==
data/zlib-1.2.11.dfsg/gzlib.c:605: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 ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) ==
data/zlib-1.2.11.dfsg/gzlib.c:611: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).
    (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
data/zlib-1.2.11.dfsg/gzlib.c:611:54:  [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).
    (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
data/zlib-1.2.11.dfsg/gzread.c:35:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ret = read(state->fd, buf + *have, get);
data/zlib-1.2.11.dfsg/gzwrite.c:370: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(str);
data/zlib-1.2.11.dfsg/gzwrite.c:426: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(next);
data/zlib-1.2.11.dfsg/gzwrite.c:524: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(next);
data/zlib-1.2.11.dfsg/test/example.c:93: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).
    uLong len = (uLong)strlen(hello)+1;
data/zlib-1.2.11.dfsg/test/example.c:123:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = (int)strlen(hello)+1;
data/zlib-1.2.11.dfsg/test/example.c:180: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((char*)uncompr) != 7) { /* " hello!" */
data/zlib-1.2.11.dfsg/test/example.c:206: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).
    uLong len = (uLong)strlen(hello)+1;
data/zlib-1.2.11.dfsg/test/example.c:381: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).
    uInt len = (uInt)strlen(hello)+1;
data/zlib-1.2.11.dfsg/test/example.c:480: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).
    c_stream.avail_in = (uInt)strlen(hello)+1;
data/zlib-1.2.11.dfsg/test/infcover.c:250: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).
    in = malloc((strlen(hex) + 1) >> 1);
data/zlib-1.2.11.dfsg/test/infcover.c:525: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 = malloc(strlen(id) + 6);
data/zlib-1.2.11.dfsg/test/minigzip.c:465: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(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) {
data/zlib-1.2.11.dfsg/test/minigzip.c:465:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) {
data/zlib-1.2.11.dfsg/test/minigzip.c:503: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).
    unsigned len = strlen(file);
data/zlib-1.2.11.dfsg/test/minigzip.c:505: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).
    if (len + strlen(GZ_SUFFIX) >= sizeof(buf)) {

ANALYSIS SUMMARY:

Hits = 252
Lines analyzed = 27390 in approximately 0.82 seconds (33283 lines/second)
Physical Source Lines of Code (SLOC) = 18021
Hits@level = [0] 204 [1]  57 [2] 151 [3]   1 [4]  41 [5]   2
Hits@level+ = [0+] 456 [1+] 252 [2+] 195 [3+]  44 [4+]  43 [5+]   2
Hits/KSLOC@level+ = [0+] 25.3038 [1+] 13.9837 [2+] 10.8207 [3+] 2.4416 [4+] 2.38611 [5+] 0.110982
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.