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/critcl-3.1.18.1+dfsg/examples/queue/util.h Examining data/critcl-3.1.18.1+dfsg/examples/stack/cstack.c Examining data/critcl-3.1.18.1+dfsg/examples/stack/cstack.h Examining data/critcl-3.1.18.1+dfsg/examples/stack/cstackInt.h Examining data/critcl-3.1.18.1+dfsg/examples/stack/stackc/m.c Examining data/critcl-3.1.18.1+dfsg/examples/stack/stackc/m.h Examining data/critcl-3.1.18.1+dfsg/examples/stack/stackc/util.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/adler32.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/compress.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/blast/blast.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/blast/blast.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/infback9/infback9.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/infback9/infback9.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/infback9/inffix9.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/infback9/inflate9.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/infback9/inftree9.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/infback9/inftree9.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/inflate86/inffas86.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/test.cpp Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.cpp Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream_test.cpp Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/test.cc Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/masmx64/inffas8664.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/crypt.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/ioapi.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/ioapi.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/iowin32.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/iowin32.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/mztools.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/mztools.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/unzip.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/unzip.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/zip.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/zip.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/puff/puff.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/puff/puff.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/testzlib/testzlib.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/crc32.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/crc32.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/deflate.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/deflate.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/enough.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/fitblk.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gun.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzappend.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzjoin.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zpipe.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzclose.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzguts.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzread.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/infback.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/inffast.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/inffast.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/inffixed.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/inflate.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/inflate.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/inftrees.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/inftrees.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/trees.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/trees.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/uncompr.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zconf.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zlib.h Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.c Examining data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl-callback/c/callback.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl-callback/c/callback.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl-callback/c/callback_int.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl-class/class.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/allocs/critcl_alloc.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/asserts/critcl_assert.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/trace/critcl_trace.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/trace/trace.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl-md5c/md5c_c/md5.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl-md5c/md5c_c/md5.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/cdata.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/header.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/pkginit.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/pkginitend.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/pkginittk.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/preload.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/storageclass.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/stubs.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/stubs_e.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/X.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/Xatom.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/Xfuncproto.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/Xlib.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/Xutil.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/cursorfont.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/keysym.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/keysymdef.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/tkIntXlibDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/tcl.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/tclDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/tclPlatDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/tk.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/tkDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/tkPlatDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/X.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/Xatom.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/Xfuncproto.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/Xlib.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/Xutil.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/cursorfont.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/keysym.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/keysymdef.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/tkIntXlibDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/tcl.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/tclDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/tclPlatDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/tk.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/tkDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/tkPlatDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/X.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/Xatom.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/Xfuncproto.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/Xlib.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/Xutil.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/cursorfont.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/keysym.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/keysymdef.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/tkIntXlibDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/tcl.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/tclDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/tclPlatDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/tk.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/tkDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/tkPlatDecls.h Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tclAppInit.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tkstubs.c Examining data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tkstubs_noconst.c Examining data/critcl-3.1.18.1+dfsg/lib/critclf/pkg_wrap.c FINAL RESULTS: data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:32:13: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. # define chmod(path,mode) _chmod(path,mode) data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:277:7: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(item->fname,item->mode); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gun.c:526: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gun.c:529: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c:141: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:31:13: [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. # define access(path,mode) _access(path,mode) data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:137: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,arcname); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:142:8: [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+origlen,TGZsuffix[i]); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:143: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. if (access(buffer,F_OK) == 0) data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:158:5: [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,(TGZsuffix[i+1]) ? "%s%s, " : "or %s%s\n", data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:877: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:887: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:70: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:77: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:87: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:87: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:94: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:139: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:144: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:244: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:354: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzguts.h:36: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. # define vsnprintf _vsnprintf data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:156: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->path, path); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:514: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:516: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:319:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. (void)vsprintf(state->in, format, va); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:324:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. len = vsprintf(state->in, format, va); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:329: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(state->in, size, format, va); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:333: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((char *)(state->in), size, format, va); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:393:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:398:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. len = sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:403: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(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:407: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(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:275: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:276: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:311: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:320: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:201: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:203: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:250: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:251: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:252: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:253: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:254: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/critcl-3.1.18.1+dfsg/lib/critcl-cutil/allocs/critcl_alloc.h:41: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 (str, s); \ data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/trace/trace.c:142: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(msg, MSGMAX, format, args); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:402:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:413:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:423:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:457:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:468:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:478:11: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/blast/blast.c:52: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[MAXWIN]; /* output buffer and sliding window */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/blast/blast.c:306: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. static const char extra[16] = { /* extra bits for length codes */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/blast/blast.c:416: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. static unsigned char hold[CHUNK]; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.cpp:18: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). gzfilebuf *gzfilebuf::open( const char *name, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.cpp:24: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 char_mode[10]; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.cpp:66: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 char_mode[10]; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.cpp:270:27: [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). void gzfilestream_common::open( const char *name, int io_mode ) { data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.cpp:272:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ( !buffer.open( name, io_mode ) ) data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.cpp:300:24: [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). gzfilestream_common::open( name, io_mode ); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.cpp:320:24: [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). gzfilestream_common::open( name, io_mode ); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.h:15: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). gzfilebuf *open( const char *name, int io_mode ); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream/zfstream.h:55:8: [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). void open( const char *name, int io_mode ); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:55:40: [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). izstream(FILE* fp) : m_fp(0) { open(fp); } data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:56:48: [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). izstream(const char* name) : m_fp(0) { open(name); } data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:65: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). void open(const char* name) { data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:70: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). void open(FILE* fp) { data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:162: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). open(fp, level); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:166: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). open(name, level); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:177: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). void open(const char* name, int level = Z_DEFAULT_COMPRESSION) { data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:178:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mode[4] = "wb\0"; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:186: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). void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) { data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:188:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mode[4] = "wb\0"; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream_test.cpp:7: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 h[256] = "Hello"; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream_test.cpp:19: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). out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/test.cc:15:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[80]; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/test.cc:17:8: [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). outf.open("test1.txt.gz"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/test.cc:26:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). inf.open("test1.txt.gz"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/test.cc:33:8: [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). outf.open("test2.txt.gz"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/test.cc:42:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). inf.open("test2.txt.gz"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:51: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). gzfilebuf::open(const char *name, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:62: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 char_mode[6] = "\0\0\0\0\0"; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:90: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 char_mode[6] = "\0\0\0\0\0"; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:384: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). this->open(name, mode); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:398: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). gzifstream::open(const char* name, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:401:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!sb.open(name, mode | std::ios_base::in)) data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:439: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). this->open(name, mode); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:453: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). gzofstream::open(const char* name, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:456:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!sb.open(name, mode | std::ios_base::out)) data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.h:66:3: [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* name, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.h:285:3: [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* name, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.h:374:3: [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* name, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/ioapi.c:97: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/ioapi.h:48: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/ioapi.h:53: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c:196: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c:235: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c:305: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c:373: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c:529: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c:609: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c:97: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c:242: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c:321: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c:336: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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[256]; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/mztools.c:139: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/mztools.c:214: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/mztools.c:247: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/mztools.c:250: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/zip.c:1245: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/zip.c:1977: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/zip.c:1991: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/puff/puff.c:864: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). in = name == NULL ? stdin : fopen(name, "rb"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/puff/puff.c:897:34: [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). skip = (unsigned)atoi(arg + 1); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:70: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 name[100]; /* 0 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:71: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 mode[8]; /* 100 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:72: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 uid[8]; /* 108 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:73: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 gid[8]; /* 116 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:74: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 size[12]; /* 124 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:75: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 mtime[12]; /* 136 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:76: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 chksum[8]; /* 148 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:78: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 linkname[100]; /* 157 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:79: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 magic[6]; /* 257 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:80: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 version[2]; /* 263 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:81: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 uname[32]; /* 265 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:82: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 gname[32]; /* 297 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:83: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 devmajor[8]; /* 329 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:84: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 devminor[8]; /* 337 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:85: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 prefix[155]; /* 345 */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:91: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 buffer[BLOCKSIZE]; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:134: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. static char buffer[1024]; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:194: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. static char result[32]; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:197:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(result,"%4d/%02d/%02d %02d:%02d:%02d", data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:394: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 fname[BLOCKSIZE]; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:482: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). outfile = fopen(fname,"wb"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:490:37: [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). outfile = fopen(fname,"wb"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/crc32.c:163: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:69: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:120: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:214: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:310: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:389: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:470: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/enough.c:472: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/enough.c:474: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/enough.c:476:39: [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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gun.c:160: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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 outbuf[SIZE]; /* output buffer */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gun.c:163: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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 match[65280 + 2]; /* buffer for reversed match or gzip data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gun.c:558: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gun.c:571: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gun.c:688: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzappend.c:138: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzappend.c:268: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzappend.c:395: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzjoin.c:107: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:757: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:827: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:828: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:842: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:912: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:951: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:952: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:961: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:962: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:1012: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:1013: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:1055: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:66: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:122: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:124: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:146: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:147: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:250: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:251: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:355: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:362: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:32: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:61: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:160: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(path, data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:221: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:515: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzread.c:216:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->next + state->have, strm->next_in, strm->avail_in); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzread.c:405: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->next, n); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzread.c:457: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzread.c:589: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->next, n); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:194: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(strm->next_in + strm->avail_in, buf, n); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:225: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/inflate.c:607: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/inflate.c:1350: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:79: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:108: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:171: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:239: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:266: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:278: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:300: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:327: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:356: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:358: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:422: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/trees.c:335: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.c:14: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. const char * const z_errmsg[10] = { data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:43: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. extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:101: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:175: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/zutil.h:234: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/critcl-3.1.18.1+dfsg/lib/critcl-class/class.h:232:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf [sizeof("@class@")+20]; /* Stash for the auto-generated object names. */ data/critcl-3.1.18.1+dfsg/lib/critcl-class/class.h:242: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 (classmgr->buf, "@class@%ld", classmgr->counter); data/critcl-3.1.18.1+dfsg/lib/critcl-class/class.h:461: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 (v+1, objv, objc * sizeof (Tcl_Obj*)); data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/allocs/critcl_alloc.h:31: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 ((o)->bytes, (str), (len)); \ data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/trace/trace.c:135: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 msg [MSGMAX]; data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/trace/trace.c:179: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 [TCL_INTEGER_SPACE]; data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/trace/trace.c:183: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, "%d", status); data/critcl-3.1.18.1+dfsg/lib/critcl-md5c/md5c_c/md5.c:54:17: [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 unsigned char PADDING[64] = { data/critcl-3.1.18.1+dfsg/lib/critcl-md5c/md5c_c/md5.c:155: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 digest[16]; MD5_CTX *mdContext; data/critcl-3.1.18.1+dfsg/lib/critcl-md5c/md5c_c/md5.h:66: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 in[64]; /* input buffer */ data/critcl-3.1.18.1+dfsg/lib/critcl-md5c/md5c_c/md5.h:71:26: [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. void MD5Final (unsigned char digest[16], MD5_CTX *mdContext); data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/Xlib.h:418:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char auto_repeats[32]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/Xlib.h:549: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 trans_chars[XMaxTransChars]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/Xlib.h:639:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key_vector[32]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/X11/Xlib.h:886: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 b[20]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/tcl.h:886: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 resultSpace[TCL_RESULT_SIZE+1]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/tcl.h:1002: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 staticSpace[TCL_DSTRING_STATIC_SIZE]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/tcl.h:1185:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char string[4]; /* String for key. The actual size data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.4/tk.h:1145:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char array[sizeof(char *)]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/Xlib.h:418:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char auto_repeats[32]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/Xlib.h:549: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 trans_chars[XMaxTransChars]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/Xlib.h:639:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key_vector[32]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/X11/Xlib.h:886: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 b[20]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/tcl.h:821: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 resultSpace[TCL_RESULT_SIZE+1]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/tcl.h:936: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 staticSpace[TCL_DSTRING_STATIC_SIZE]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/tcl.h:1136:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char string[4]; /* String for key. The actual size will be as data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.5/tk.h:1146:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char array[sizeof(char *)]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/Xlib.h:418:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char auto_repeats[32]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/Xlib.h:549: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 trans_chars[XMaxTransChars]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/Xlib.h:639:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key_vector[32]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/X11/Xlib.h:886: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 b[20]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/tcl.h:863: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 resultSpace[TCL_RESULT_SIZE+1]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/tcl.h:982: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 staticSpace[TCL_DSTRING_STATIC_SIZE]; data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/tcl.h:1192:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char string[1]; /* String for key. The actual size will be as data/critcl-3.1.18.1+dfsg/lib/critcl/critcl_c/tcl8.6/tk.h:1163:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char array[sizeof(char *)]; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/blast/blast.c:438:12: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (getchar() != EOF) n++; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:87:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read(void* buf, size_t len) { data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:115:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inline int read(izstream& zs, T* x, Items items) { data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream2/zstream.h:278:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). val.byte = 255; val.word = ::strlen(x); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:146:5: [1] (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 character. strcpy(c_mode, "w"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:148:5: [1] (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 character. strcpy(c_mode, "a"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:150:5: [1] (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 character. strcpy(c_mode, "w"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:152:5: [1] (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 character. strcpy(c_mode, "r"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:160:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(c_mode) == 0) data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/iostream3/zfstream.cc:163:5: [1] (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 character. strcat(c_mode, "b"); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c:130: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c:377: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/miniunz.c:597: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c:98: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c:102: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c:311: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c:315: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c:339: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/minizip.c:383: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/mztools.c:141: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/mztools.c:216: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/zip.c:1100: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/zip.c:1102: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/minizip/zip.c:1867: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:138:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). origlen = strlen(buffer); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:332:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(buffer); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:440:15: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fname,buffer.header.name,SHORTNAMESIZE); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/contrib/untgz/untgz.c:514:51: [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 (fname[BLOCKSIZE-1] != 0 || (int)strlen(fname) > remaining) data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:64: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:94: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:151: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:175: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:350: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/example.c:449: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gun.c:102: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gun.c:668: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzappend.c:182: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzappend.c:354: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzappend.c:373: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzappend.c:409:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = fd == -1 ? 0 : read(fd, in, CHUNK); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzjoin.c:130: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzjoin.c:182: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:761:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, data, len) != len; data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:881: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:938: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/gzlog.c:942: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/examples/zran.c:276:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = getc(in); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:151: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). state->path = malloc(strlen(path) + 1); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:509:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) { data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzlib.c:509:52: [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 = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) { data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzread.c:31: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, len - *have); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:272: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). len = (unsigned)strlen(str); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:331: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(state->in); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/gzwrite.c:405: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(state->in); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:270: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:270: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/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:304: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). size_t len = strlen(file); data/critcl-3.1.18.1+dfsg/examples/zlibwrap/zlib/minigzip.c:306: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)) { data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/allocs/critcl_alloc.h:40: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). char* str = ckalloc (1+strlen (s)); \ data/critcl-3.1.18.1+dfsg/lib/critcl-cutil/trace/trace.c:64: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). fwrite (top->scope, 1, strlen(top->scope), stdout); ANALYSIS SUMMARY: Hits = 355 Lines analyzed = 88089 in approximately 2.52 seconds (34980 lines/second) Physical Source Lines of Code (SLOC) = 61457 Hits@level = [0] 224 [1] 68 [2] 233 [3] 7 [4] 43 [5] 4 Hits@level+ = [0+] 579 [1+] 355 [2+] 287 [3+] 54 [4+] 47 [5+] 4 Hits/KSLOC@level+ = [0+] 9.42122 [1+] 5.7764 [2+] 4.66993 [3+] 0.878663 [4+] 0.764762 [5+] 0.0650862 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.