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/fossil-2.13/compat/tcl-8.6/generic/tcl.h Examining data/fossil-2.13/compat/tcl-8.6/generic/tclDecls.h Examining data/fossil-2.13/compat/tcl-8.6/generic/tclPlatDecls.h Examining data/fossil-2.13/compat/zlib/adler32.c Examining data/fossil-2.13/compat/zlib/compress.c Examining data/fossil-2.13/compat/zlib/contrib/blast/blast.c Examining data/fossil-2.13/compat/zlib/contrib/blast/blast.h Examining data/fossil-2.13/compat/zlib/contrib/infback9/infback9.c Examining data/fossil-2.13/compat/zlib/contrib/infback9/infback9.h Examining data/fossil-2.13/compat/zlib/contrib/infback9/inffix9.h Examining data/fossil-2.13/compat/zlib/contrib/infback9/inflate9.h Examining data/fossil-2.13/compat/zlib/contrib/infback9/inftree9.c Examining data/fossil-2.13/compat/zlib/contrib/infback9/inftree9.h Examining data/fossil-2.13/compat/zlib/contrib/inflate86/inffas86.c Examining data/fossil-2.13/compat/zlib/contrib/iostream/test.cpp Examining data/fossil-2.13/compat/zlib/contrib/iostream/zfstream.cpp Examining data/fossil-2.13/compat/zlib/contrib/iostream/zfstream.h Examining data/fossil-2.13/compat/zlib/contrib/iostream2/zstream.h Examining data/fossil-2.13/compat/zlib/contrib/iostream2/zstream_test.cpp Examining data/fossil-2.13/compat/zlib/contrib/iostream3/test.cc Examining data/fossil-2.13/compat/zlib/contrib/iostream3/zfstream.cc Examining data/fossil-2.13/compat/zlib/contrib/iostream3/zfstream.h Examining data/fossil-2.13/compat/zlib/contrib/masmx64/inffas8664.c Examining data/fossil-2.13/compat/zlib/contrib/minizip/crypt.h Examining data/fossil-2.13/compat/zlib/contrib/minizip/ioapi.c Examining data/fossil-2.13/compat/zlib/contrib/minizip/ioapi.h Examining data/fossil-2.13/compat/zlib/contrib/minizip/iowin32.c Examining data/fossil-2.13/compat/zlib/contrib/minizip/iowin32.h Examining data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c Examining data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c Examining data/fossil-2.13/compat/zlib/contrib/minizip/mztools.c Examining data/fossil-2.13/compat/zlib/contrib/minizip/mztools.h Examining data/fossil-2.13/compat/zlib/contrib/minizip/unzip.c Examining data/fossil-2.13/compat/zlib/contrib/minizip/unzip.h Examining data/fossil-2.13/compat/zlib/contrib/minizip/zip.c Examining data/fossil-2.13/compat/zlib/contrib/minizip/zip.h Examining data/fossil-2.13/compat/zlib/contrib/puff/puff.c Examining data/fossil-2.13/compat/zlib/contrib/puff/puff.h Examining data/fossil-2.13/compat/zlib/contrib/puff/pufftest.c Examining data/fossil-2.13/compat/zlib/contrib/testzlib/testzlib.c Examining data/fossil-2.13/compat/zlib/contrib/untgz/untgz.c Examining data/fossil-2.13/compat/zlib/crc32.c Examining data/fossil-2.13/compat/zlib/crc32.h Examining data/fossil-2.13/compat/zlib/deflate.c Examining data/fossil-2.13/compat/zlib/deflate.h Examining data/fossil-2.13/compat/zlib/examples/enough.c Examining data/fossil-2.13/compat/zlib/examples/fitblk.c Examining data/fossil-2.13/compat/zlib/examples/gun.c Examining data/fossil-2.13/compat/zlib/examples/gzappend.c Examining data/fossil-2.13/compat/zlib/examples/gzjoin.c Examining data/fossil-2.13/compat/zlib/examples/gzlog.c Examining data/fossil-2.13/compat/zlib/examples/gzlog.h Examining data/fossil-2.13/compat/zlib/examples/zpipe.c Examining data/fossil-2.13/compat/zlib/examples/zran.c Examining data/fossil-2.13/compat/zlib/gzclose.c Examining data/fossil-2.13/compat/zlib/gzguts.h Examining data/fossil-2.13/compat/zlib/gzlib.c Examining data/fossil-2.13/compat/zlib/gzread.c Examining data/fossil-2.13/compat/zlib/gzwrite.c Examining data/fossil-2.13/compat/zlib/infback.c Examining data/fossil-2.13/compat/zlib/inffast.c Examining data/fossil-2.13/compat/zlib/inffast.h Examining data/fossil-2.13/compat/zlib/inffixed.h Examining data/fossil-2.13/compat/zlib/inflate.c Examining data/fossil-2.13/compat/zlib/inflate.h Examining data/fossil-2.13/compat/zlib/inftrees.c Examining data/fossil-2.13/compat/zlib/inftrees.h Examining data/fossil-2.13/compat/zlib/test/example.c Examining data/fossil-2.13/compat/zlib/test/infcover.c Examining data/fossil-2.13/compat/zlib/test/minigzip.c Examining data/fossil-2.13/compat/zlib/trees.c Examining data/fossil-2.13/compat/zlib/trees.h Examining data/fossil-2.13/compat/zlib/uncompr.c Examining data/fossil-2.13/compat/zlib/zconf.h Examining data/fossil-2.13/compat/zlib/zlib.h Examining data/fossil-2.13/compat/zlib/zutil.c Examining data/fossil-2.13/compat/zlib/zutil.h Examining data/fossil-2.13/src/add.c Examining data/fossil-2.13/src/ajax.c Examining data/fossil-2.13/src/alerts.c Examining data/fossil-2.13/src/allrepo.c Examining data/fossil-2.13/src/attach.c Examining data/fossil-2.13/src/backlink.c Examining data/fossil-2.13/src/backoffice.c Examining data/fossil-2.13/src/bag.c Examining data/fossil-2.13/src/bisect.c Examining data/fossil-2.13/src/blob.c Examining data/fossil-2.13/src/branch.c Examining data/fossil-2.13/src/browse.c Examining data/fossil-2.13/src/builtin.c Examining data/fossil-2.13/src/bundle.c Examining data/fossil-2.13/src/cache.c Examining data/fossil-2.13/src/capabilities.c Examining data/fossil-2.13/src/captcha.c Examining data/fossil-2.13/src/cgi.c Examining data/fossil-2.13/src/checkin.c Examining data/fossil-2.13/src/checkout.c Examining data/fossil-2.13/src/clearsign.c Examining data/fossil-2.13/src/clone.c Examining data/fossil-2.13/src/codecheck1.c Examining data/fossil-2.13/src/comformat.c Examining data/fossil-2.13/src/config.h Examining data/fossil-2.13/src/configure.c Examining data/fossil-2.13/src/content.c Examining data/fossil-2.13/src/cookies.c Examining data/fossil-2.13/src/cson_amalgamation.c Examining data/fossil-2.13/src/cson_amalgamation.h Examining data/fossil-2.13/src/cygsup.h Examining data/fossil-2.13/src/db.c Examining data/fossil-2.13/src/delta.c Examining data/fossil-2.13/src/deltacmd.c Examining data/fossil-2.13/src/deltafunc.c Examining data/fossil-2.13/src/descendants.c Examining data/fossil-2.13/src/diff.c Examining data/fossil-2.13/src/diffcmd.c Examining data/fossil-2.13/src/dispatch.c Examining data/fossil-2.13/src/doc.c Examining data/fossil-2.13/src/encode.c Examining data/fossil-2.13/src/etag.c Examining data/fossil-2.13/src/event.c Examining data/fossil-2.13/src/export.c Examining data/fossil-2.13/src/extcgi.c Examining data/fossil-2.13/src/file.c Examining data/fossil-2.13/src/fileedit.c Examining data/fossil-2.13/src/finfo.c Examining data/fossil-2.13/src/foci.c Examining data/fossil-2.13/src/forum.c Examining data/fossil-2.13/src/fshell.c Examining data/fossil-2.13/src/fusefs.c Examining data/fossil-2.13/src/fuzz.c Examining data/fossil-2.13/src/glob.c Examining data/fossil-2.13/src/graph.c Examining data/fossil-2.13/src/gzip.c Examining data/fossil-2.13/src/hname.c Examining data/fossil-2.13/src/hook.c Examining data/fossil-2.13/src/http.c Examining data/fossil-2.13/src/http_socket.c Examining data/fossil-2.13/src/http_ssl.c Examining data/fossil-2.13/src/http_transport.c Examining data/fossil-2.13/src/import.c Examining data/fossil-2.13/src/info.c Examining data/fossil-2.13/src/interwiki.c Examining data/fossil-2.13/src/json.c Examining data/fossil-2.13/src/json_artifact.c Examining data/fossil-2.13/src/json_branch.c Examining data/fossil-2.13/src/json_config.c Examining data/fossil-2.13/src/json_detail.h Examining data/fossil-2.13/src/json_diff.c Examining data/fossil-2.13/src/json_dir.c Examining data/fossil-2.13/src/json_finfo.c Examining data/fossil-2.13/src/json_login.c Examining data/fossil-2.13/src/json_query.c Examining data/fossil-2.13/src/json_report.c Examining data/fossil-2.13/src/json_status.c Examining data/fossil-2.13/src/json_tag.c Examining data/fossil-2.13/src/json_timeline.c Examining data/fossil-2.13/src/json_user.c Examining data/fossil-2.13/src/json_wiki.c Examining data/fossil-2.13/src/leaf.c Examining data/fossil-2.13/src/linenoise.c Examining data/fossil-2.13/src/linenoise.h Examining data/fossil-2.13/src/loadctrl.c Examining data/fossil-2.13/src/login.c Examining data/fossil-2.13/src/lookslike.c Examining data/fossil-2.13/src/main.c Examining data/fossil-2.13/src/makeheaders.c Examining data/fossil-2.13/src/manifest.c Examining data/fossil-2.13/src/markdown.c Examining data/fossil-2.13/src/markdown_html.c Examining data/fossil-2.13/src/md5.c Examining data/fossil-2.13/src/merge.c Examining data/fossil-2.13/src/merge3.c Examining data/fossil-2.13/src/miniz.c Examining data/fossil-2.13/src/mkbuiltin.c Examining data/fossil-2.13/src/mkindex.c Examining data/fossil-2.13/src/mkversion.c Examining data/fossil-2.13/src/moderate.c Examining data/fossil-2.13/src/name.c Examining data/fossil-2.13/src/path.c Examining data/fossil-2.13/src/piechart.c Examining data/fossil-2.13/src/pikchr.c Examining data/fossil-2.13/src/pikchrshow.c Examining data/fossil-2.13/src/pivot.c Examining data/fossil-2.13/src/popen.c Examining data/fossil-2.13/src/pqueue.c Examining data/fossil-2.13/src/printf.c Examining data/fossil-2.13/src/publish.c Examining data/fossil-2.13/src/purge.c Examining data/fossil-2.13/src/rebuild.c Examining data/fossil-2.13/src/regexp.c Examining data/fossil-2.13/src/repolist.c Examining data/fossil-2.13/src/report.c Examining data/fossil-2.13/src/rss.c Examining data/fossil-2.13/src/schema.c Examining data/fossil-2.13/src/search.c Examining data/fossil-2.13/src/security_audit.c Examining data/fossil-2.13/src/setup.c Examining data/fossil-2.13/src/setupuser.c Examining data/fossil-2.13/src/sha1.c Examining data/fossil-2.13/src/sha1hard.c Examining data/fossil-2.13/src/sha3.c Examining data/fossil-2.13/src/shell.c Examining data/fossil-2.13/src/shun.c Examining data/fossil-2.13/src/sitemap.c Examining data/fossil-2.13/src/skins.c Examining data/fossil-2.13/src/smtp.c Examining data/fossil-2.13/src/sqlcmd.c Examining data/fossil-2.13/src/sqlcompattest.c Examining data/fossil-2.13/src/sqlite3.c Examining data/fossil-2.13/src/sqlite3.h Examining data/fossil-2.13/src/stash.c Examining data/fossil-2.13/src/stat.c Examining data/fossil-2.13/src/statrep.c Examining data/fossil-2.13/src/style.c Examining data/fossil-2.13/src/sync.c Examining data/fossil-2.13/src/tag.c Examining data/fossil-2.13/src/tar.c Examining data/fossil-2.13/src/terminal.c Examining data/fossil-2.13/src/th.c Examining data/fossil-2.13/src/th.h Examining data/fossil-2.13/src/th_lang.c Examining data/fossil-2.13/src/th_main.c Examining data/fossil-2.13/src/th_tcl.c Examining data/fossil-2.13/src/timeline.c Examining data/fossil-2.13/src/tkt.c Examining data/fossil-2.13/src/tktsetup.c Examining data/fossil-2.13/src/translate.c Examining data/fossil-2.13/src/undo.c Examining data/fossil-2.13/src/unicode.c Examining data/fossil-2.13/src/unversioned.c Examining data/fossil-2.13/src/update.c Examining data/fossil-2.13/src/url.c Examining data/fossil-2.13/src/user.c Examining data/fossil-2.13/src/utf8.c Examining data/fossil-2.13/src/util.c Examining data/fossil-2.13/src/verify.c Examining data/fossil-2.13/src/vfile.c Examining data/fossil-2.13/src/webmail.c Examining data/fossil-2.13/src/wiki.c Examining data/fossil-2.13/src/wikiformat.c Examining data/fossil-2.13/src/winfile.c Examining data/fossil-2.13/src/winhttp.c Examining data/fossil-2.13/src/xfer.c Examining data/fossil-2.13/src/xfersetup.c Examining data/fossil-2.13/src/zip.c Examining data/fossil-2.13/tools/decode-email.c Examining data/fossil-2.13/win/include/dirent.h Examining data/fossil-2.13/win/include/unistd.h FINAL RESULTS: data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/examples/gun.c:527:11: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. (void)chmod(to, was.st_mode & 07777); data/fossil-2.13/compat/zlib/examples/gun.c:530:11: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. (void)chown(to, was.st_uid, was.st_gid); data/fossil-2.13/src/blob.c:948:17: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ssize_t len = readlink(zFilename, zBuf, 1023); data/fossil-2.13/src/file.c:659: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(zFilename, buf.st_mode | targetMode); data/fossil-2.13/src/file.c:664: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(zFilename, buf.st_mode & ~0111); data/fossil-2.13/src/linenoise.c:1171:5: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(filename,S_IRUSR|S_IWUSR); data/fossil-2.13/src/shell.c:2210:11: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. # ifndef chmod data/fossil-2.13/src/shell.c:2211: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 _chmod data/fossil-2.13/src/shell.c:2481:54: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. || ((sStat.st_mode&0777)!=(mode&0777) && 0!=chmod(zFile, mode&0777)) data/fossil-2.13/src/shell.c:2501:28: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if( rc==0 && mode && chmod(zFile, mode & 0777) ){ data/fossil-2.13/src/shell.c:2876:15: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. n = readlink(pCur->zPath, aBuf, nBuf); data/fossil-2.13/src/sqlite3.c:34149:42: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. { "readlink", (sqlite3_syscall_ptr)readlink, 0 }, data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:154:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buffer,newdir); data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/examples/gzlog.c:878:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(log->id, LOGID); data/fossil-2.13/compat/zlib/examples/gzlog.c:888:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(log->path, path); data/fossil-2.13/compat/zlib/examples/zran.c:75:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. struct access { data/fossil-2.13/compat/zlib/examples/zran.c:82:30: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. local void free_index(struct access *index) data/fossil-2.13/compat/zlib/examples/zran.c:92:14: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. local struct access *addpoint(struct access *index, int bits, data/fossil-2.13/compat/zlib/examples/zran.c:92:38: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. local struct access *addpoint(struct access *index, int bits, data/fossil-2.13/compat/zlib/examples/zran.c:99:38: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. index = malloc(sizeof(struct access)); data/fossil-2.13/compat/zlib/examples/zran.c:144:52: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. local int build_index(FILE *in, off_t span, struct access **built) data/fossil-2.13/compat/zlib/examples/zran.c:149:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. struct access *index; /* access points being generated */ data/fossil-2.13/compat/zlib/examples/zran.c:249:36: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. local int extract(FILE *in, struct access *index, off_t offset, data/fossil-2.13/compat/zlib/examples/zran.c:359:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. struct access *index = NULL; data/fossil-2.13/compat/zlib/gzguts.h:86:18: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # if !defined(vsnprintf) && !defined(NO_vsnprintf) data/fossil-2.13/compat/zlib/gzguts.h:88:18: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define vsnprintf _vsnprintf data/fossil-2.13/compat/zlib/gzguts.h:110:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/fossil-2.13/compat/zlib/gzguts.h:110:20: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/fossil-2.13/compat/zlib/gzlib.c:216:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(state->path, path); data/fossil-2.13/compat/zlib/gzlib.c:614:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(state->msg, state->path); data/fossil-2.13/compat/zlib/gzlib.c:616:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(state->msg, msg); data/fossil-2.13/compat/zlib/gzwrite.c:417:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. (void)vsprintf(next, format, va); data/fossil-2.13/compat/zlib/gzwrite.c:421:11: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. len = vsprintf(next, format, va); data/fossil-2.13/compat/zlib/gzwrite.c:425:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)vsnprintf(next, state->size, format, va); data/fossil-2.13/compat/zlib/gzwrite.c:428:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(next, state->size, format, va); data/fossil-2.13/compat/zlib/gzwrite.c:511:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, data/fossil-2.13/compat/zlib/gzwrite.c:517:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, data/fossil-2.13/compat/zlib/gzwrite.c:522:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, data/fossil-2.13/compat/zlib/gzwrite.c:526:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, data/fossil-2.13/compat/zlib/test/infcover.c:529:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(prefix, id); data/fossil-2.13/compat/zlib/test/infcover.c:555:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(prefix, id); data/fossil-2.13/compat/zlib/test/minigzip.c:44:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/fossil-2.13/compat/zlib/test/minigzip.c:44:20: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define snprintf _snprintf data/fossil-2.13/compat/zlib/test/minigzip.c:473:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(outfile, file); data/fossil-2.13/compat/zlib/test/minigzip.c:474:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(outfile, GZ_SUFFIX); data/fossil-2.13/compat/zlib/test/minigzip.c:513:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, file); data/fossil-2.13/compat/zlib/test/minigzip.c:526:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(infile, GZ_SUFFIX); data/fossil-2.13/compat/zlib/zutil.h:242:39: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define Trace(x) {if (z_verbose>=0) fprintf x ;} data/fossil-2.13/compat/zlib/zutil.h:243:39: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define Tracev(x) {if (z_verbose>0) fprintf x ;} data/fossil-2.13/compat/zlib/zutil.h:244:40: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define Tracevv(x) {if (z_verbose>1) fprintf x ;} data/fossil-2.13/compat/zlib/zutil.h:245:48: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} data/fossil-2.13/compat/zlib/zutil.h:246:49: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} data/fossil-2.13/src/alerts.c:247:62: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. @ <p>This is the email for the human administrator for the system. data/fossil-2.13/src/alerts.c:259:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. @ The system administrator should arrange for emails sent to this address data/fossil-2.13/src/alerts.c:369:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef popen data/fossil-2.13/src/alerts.c:370:10: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define popen _popen data/fossil-2.13/src/alerts.c:890:17: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE *out = popen(p->zCmd, "w"); data/fossil-2.13/src/alerts.c:2830:52: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. @ <p>The following error was reported by the system: data/fossil-2.13/src/alerts.c:2986:52: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. @ <p>The following error was reported by the system: data/fossil-2.13/src/cache.c:377:16: [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. @ last-access: %s(sqlite3_column_text(pStmt,3))</p></li> data/fossil-2.13/src/cgi.c:1377:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(g.fDebug, zFormat, ap); data/fossil-2.13/src/cgi.c:2135:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if( system(zBrowser)<0 ){ data/fossil-2.13/src/config.h:201:11: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. #define getpass getpassphrase data/fossil-2.13/src/cson_amalgamation.c:859:21: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. sscanf(jc->parse_buffer, JSON_PARSER_INTEGER_SSCANF_TOKEN, &value.vu.integer_value); data/fossil-2.13/src/cson_amalgamation.c:1429:88: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define MARKER if(1) printf("MARKER: %s:%d:%s():\t",__FILE__,__LINE__,__func__); if(1) printf data/fossil-2.13/src/cson_amalgamation.c:1432:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define MARKER if(0) printf data/fossil-2.13/src/cson_amalgamation.c:3968:14: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. rc = sprintf( b, "%"CSON_INT_T_PFMT, cson_value_get_integer(src) ) data/fossil-2.13/src/cson_amalgamation.c:3991:14: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. rc = sprintf( b, "%"CSON_DOUBLE_T_PFMT, cson_value_get_double(src) ) data/fossil-2.13/src/cson_amalgamation.c:4848:23: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. if( 0 < sprintf( v, "%"CSON_INT_T_PFMT, cson_value_get_integer(orig)) ) data/fossil-2.13/src/cson_amalgamation.c:4856:23: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. if( 0 < sprintf( v, "%"CSON_DOUBLE_T_PFMT, cson_value_get_double(orig)) ) data/fossil-2.13/src/cson_amalgamation.c:4901:23: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. if( 0 < sprintf( v, "%"CSON_INT_T_PFMT, cson_value_get_integer(orig)) ) data/fossil-2.13/src/cson_amalgamation.c:4909:23: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. if( 0 < sprintf( v, "%"CSON_DOUBLE_T_PFMT, cson_value_get_double(orig)) ) data/fossil-2.13/src/cson_amalgamation.c:5308:88: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define MARKER if(1) printf("MARKER: %s:%d:%s():\t",__FILE__,__LINE__,__func__); if(1) printf data/fossil-2.13/src/cson_amalgamation.c:5310:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define MARKER if(0) printf data/fossil-2.13/src/db.c:1318: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(zOut, zTemp = obscure((char*)zIn)); data/fossil-2.13/src/dispatch.c:986:44: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. @ --systemtrace Trace calls to system() data/fossil-2.13/src/export.c:44:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef popen data/fossil-2.13/src/export.c:45:10: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define popen _popen data/fossil-2.13/src/export.c:1417:12: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. xCmd = popen(zCmd, "wb"); data/fossil-2.13/src/export.c:1419:12: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. xCmd = popen(zCmd, "w"); data/fossil-2.13/src/extcgi.c:36:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef popen data/fossil-2.13/src/extcgi.c:37:10: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define popen _popen data/fossil-2.13/src/file.c:477: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. rc = access(zMbcs, flags); data/fossil-2.13/src/json_login.c:110:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(seedBuffer, "%"CSON_INT_T_PFMT, cson_value_get_integer(jseed)); data/fossil-2.13/src/linenoise.c:186:13: [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(lndebug_fp, \ data/fossil-2.13/src/linenoise.c:191:9: [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(lndebug_fp, ", " __VA_ARGS__); \ data/fossil-2.13/src/login.c:670: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. @ to access <b>%h(zAbbrev)</b>. data/fossil-2.13/src/login.c:673: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. @ to access page <b>%h(zAbbrev)</b>. data/fossil-2.13/src/login.c:675:37: [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. @ <p>Login as a named user to access page <b>%h(zAbbrev)</b>. data/fossil-2.13/src/makeheaders.c:56: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 debug0(F,M) if( (F)&debugMask ){ fprintf(stderr,M); } data/fossil-2.13/src/makeheaders.c:57: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 debug1(F,M,A) if( (F)&debugMask ){ fprintf(stderr,M,A); } data/fossil-2.13/src/makeheaders.c:58: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 debug2(F,M,A,B) if( (F)&debugMask ){ fprintf(stderr,M,A,B); } data/fossil-2.13/src/makeheaders.c:59: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 debug3(F,M,A,B,C) if( (F)&debugMask ){ fprintf(stderr,M,A,B,C); } data/fossil-2.13/src/makeheaders.c:2081:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pIf->zCondition,"%s(%.*s)",zPrefix,nText,zText); data/fossil-2.13/src/makeheaders.c:2189:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pInclude->zLabel,"%.*s:%s",nArg,zArg,zIf); data/fossil-2.13/src/makeheaders.c:3231:11: [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( zNew[j], zBuf ); data/fossil-2.13/src/mkindex.c:331:7: [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(&zHelp[nHelp], &zLine[3]); data/fossil-2.13/src/mkversion.c:177: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(vx,b); data/fossil-2.13/src/popen.c:201:7: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl(zCmd, zCmd, (char*)0); data/fossil-2.13/src/popen.c:203:7: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "/bin/sh", "-c", zCmd, (char*)0); data/fossil-2.13/src/printf.c:1053:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(out, zFormat, ap); data/fossil-2.13/src/search.c:1520:42: [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. @ url TEXT, -- URL to access this document data/fossil-2.13/src/security_audit.c:169:49: [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. @ A valid login and password is required to access any content. data/fossil-2.13/src/security_audit.c:473:25: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. @ Unable to get the system load average. This can prevent Fossil data/fossil-2.13/src/security_audit.c:621:15: [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. @ anonymous access to this repository. A valid login and password data/fossil-2.13/src/security_audit.c:622:25: [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. @ will be required to access this repository after clicking that data/fossil-2.13/src/setup.c:92:7: [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("/dev/null", R_OK|W_OK) ){ data/fossil-2.13/src/setup.c:96:7: [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("/dev/urandom", R_OK) ){ data/fossil-2.13/src/setup.c:365:9: [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. @ web access. When disabled, unrestricted web access from 127.0.0.1 data/fossil-2.13/src/setup.c:365:50: [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. @ web access. When disabled, unrestricted web access from 127.0.0.1 data/fossil-2.13/src/setup.c:401:5: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. @ access the /artifact_stats page. data/fossil-2.13/src/setup.c:458:5: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. @ access to the /proc virtual filesystem is required, which means this limit data/fossil-2.13/src/setup.c:476:46: [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. @ <p>This setting is designed to give easy access to humans while data/fossil-2.13/src/setup.c:560:58: [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. @ the self-registration procedure (if enabled), or <li>access "public" data/fossil-2.13/src/setupuser.c:207:60: [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. @ purpose of requiring anonymous to log in is to prevent access by spiders. data/fossil-2.13/src/setupuser.c:784:27: [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. @ hyperlink and permits access to the <tt>/zip</tt> page. This allows data/fossil-2.13/src/setupuser.c:804:42: [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. @ <b>Write Wiki</b> privileges control access to wiki pages. The data/fossil-2.13/src/setupuser.c:808:69: [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. @ <span class="capability">Write Ticket</span> privileges control access data/fossil-2.13/src/setupuser.c:850:26: [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. @ To disable universal access to the repository, make sure that the data/fossil-2.13/src/setupuser.c:874:45: [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. @ template for users who are allowed more access than data/fossil-2.13/src/shell.c:164:11: [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. # ifndef access data/fossil-2.13/src/shell.c:165: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. # define access(f,m) _access((f),(m)) data/fossil-2.13/src/shell.c:173:10: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef popen data/fossil-2.13/src/shell.c:174:11: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define popen _popen data/fossil-2.13/src/shell.c:185:17: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. extern FILE *popen(const char*,const char*); data/fossil-2.13/src/shell.c:473:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(out, zFormat, ap); data/fossil-2.13/src/shell.c:478:22: [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 utf8_printf fprintf data/fossil-2.13/src/shell.c:486:21: [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 raw_printf fprintf data/fossil-2.13/src/shell.c:11381:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. rc = system(zCmd); data/fossil-2.13/src/shell.c:15318:7: [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(zNewDb,0)==0 ){ data/fossil-2.13/src/shell.c:15363:11: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if( system(zCmd) ){ data/fossil-2.13/src/shell.c:18219:17: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. sCtx.in = popen(sCtx.zFile+1, "r"); data/fossil-2.13/src/shell.c:18836:16: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. p->out = popen(zFile + 1, "w"); data/fossil-2.13/src/shell.c:19042:15: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. p->in = popen(azArg[1]+1, "r"); data/fossil-2.13/src/shell.c:19741:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. x = system(zCmd); data/fossil-2.13/src/shell.c:21095:7: [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(data.zDbFilename, 0)==0 ){ data/fossil-2.13/src/sitemap.c:193:58: [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. @ <li>%z(href("%R/urllist"))List of URLs used to access data/fossil-2.13/src/sqlite3.c:34019:42: [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. { "access", (sqlite3_syscall_ptr)access, 0 }, data/fossil-2.13/src/sqlite3.c:51949:28: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define sqlite3DebugPrintf printf data/fossil-2.13/src/sqlite3.c:64654:42: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define TRACE(X) if(sqlite3BtreeTrace){printf X;fflush(stdout);} data/fossil-2.13/src/sqlite3.c:79740:3: [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(pOut, zFormat1, pc, data/fossil-2.13/src/sqlite3.c:85937:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(p->flags & MEM_Zero ? " NULL-nochng" : " NULL"); data/fossil-2.13/src/sqlite3.c:119377:14: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. FUNCTION(printf, -1, 0, 0, printfFunc ), data/fossil-2.13/src/sqlite3.c:193130:35: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define GEODEBUG(X) if(geo_debug)printf X data/fossil-2.13/src/stash.c:457:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(DIFF_CANNOT_COMPUTE_SYMLINK); data/fossil-2.13/src/user.c:54:14: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. static char *getpass(const char *prompt){ data/fossil-2.13/src/user.c:120:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef popen data/fossil-2.13/src/user.c:121:10: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define popen _popen data/fossil-2.13/src/user.c:211:19: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ** output using popen(). data/fossil-2.13/src/user.c:214:41: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. ** executable, then use the C-library getpass() routine. data/fossil-2.13/src/user.c:224:10: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. in = popen(blob_str(&cmd), "r"); data/fossil-2.13/src/user.c:233:9: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. z = getpass(zPrompt); data/fossil-2.13/src/user.c:238:9: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. z = getpass(zPrompt); data/fossil-2.13/src/util.c:308:8: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. rc = system(zOrigCmd); data/fossil-2.13/win/include/unistd.h:42:9: [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 _access data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/src/file.c:496:10: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. rc = chroot(zPath); data/fossil-2.13/src/file.c:1932:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *zValue = getenv(zName); data/fossil-2.13/src/linenoise.c:208:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *term = getenv("TERM"); data/fossil-2.13/src/mkversion.c:120:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *zEpoch = getenv("SOURCE_DATE_EPOCH"); data/fossil-2.13/src/security_audit.c:475:26: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. @ <p>If running in a chroot jail on Linux, verify that the /proc data/fossil-2.13/src/setup.c:98:47: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. @ for reading. This means that the pseudo-random number generator used data/fossil-2.13/src/setup.c:459:29: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. @ might not work inside a chroot() jail. data/fossil-2.13/src/shell.c:335:28: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. HINSTANCE hinstLib = LoadLibrary(TEXT("Kernel32.dll")); data/fossil-2.13/src/shell.c:11331:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. zEditor = getenv("VISUAL"); data/fossil-2.13/src/shell.c:15663:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. zTemp = getenv("TEMP"); data/fossil-2.13/src/shell.c:15664:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if( zTemp==0 ) zTemp = getenv("TMP"); data/fossil-2.13/src/shell.c:20594:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. home_dir = getenv("USERPROFILE"); data/fossil-2.13/src/shell.c:20599:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. home_dir = getenv("HOME"); data/fossil-2.13/src/shell.c:20606:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. zDrive = getenv("HOMEDRIVE"); data/fossil-2.13/src/shell.c:20607:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. zPath = getenv("HOMEPATH"); data/fossil-2.13/src/shell.c:20850:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if( getenv("SQLITE_DEBUG_BREAK") ){ data/fossil-2.13/src/shell.c:21312:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. zHistory = getenv("SQLITE_HISTORY"); data/fossil-2.13/src/sqlite3.c:27125:7: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&winMutex_staticMutexes[i].mutex); data/fossil-2.13/src/sqlite3.c:27219:9: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&p->mutex); data/fossil-2.13/src/sqlite3.c:27285:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&p->mutex); data/fossil-2.13/src/sqlite3.c:36630:10: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. lk = random(); data/fossil-2.13/src/sqlite3.c:39379:32: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if( !azDirs[0] ) azDirs[0] = getenv("SQLITE_TMPDIR"); data/fossil-2.13/src/sqlite3.c:39380:32: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR"); data/fossil-2.13/src/sqlite3.c:39845:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING"); data/fossil-2.13/src/sqlite3.c:46581:34: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if( !azDirs[0] ) azDirs[0] = getenv("SQLITE_TMPDIR"); data/fossil-2.13/src/sqlite3.c:46582:34: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR"); data/fossil-2.13/src/sqlite3.c:46583:34: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if( !azDirs[2] ) azDirs[2] = getenv("TMP"); data/fossil-2.13/src/sqlite3.c:46584:34: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if( !azDirs[3] ) azDirs[3] = getenv("TEMP"); data/fossil-2.13/src/sqlite3.c:46585:34: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if( !azDirs[4] ) azDirs[4] = getenv("USERPROFILE"); data/fossil-2.13/src/sqlite3.c:119389:15: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. VFUNCTION(random, 0, 0, 0, randomFunc ), data/fossil-2.13/src/th_tcl.c:109:35: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. # define dlopen(a,b) (void *)LoadLibrary((a)) data/fossil-2.13/win/include/unistd.h:11:9: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define srandom srand data/fossil-2.13/win/include/unistd.h:11:17: [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. #define srandom srand data/fossil-2.13/win/include/unistd.h:12:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. #define random rand data/fossil-2.13/compat/tcl-8.6/generic/tcl.h:878: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/fossil-2.13/compat/tcl-8.6/generic/tcl.h:997: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/fossil-2.13/compat/tcl-8.6/generic/tcl.h:1207: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/fossil-2.13/compat/zlib/contrib/blast/blast.c:58: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/fossil-2.13/compat/zlib/contrib/blast/blast.c:312: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/fossil-2.13/compat/zlib/contrib/blast/blast.c:434: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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/contrib/minizip/ioapi.c:19:36: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define FOPEN_FUNC(filename, mode) fopen(filename, mode) data/fossil-2.13/compat/zlib/contrib/minizip/ioapi.c:109:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen(filename, mode_fopen); data/fossil-2.13/compat/zlib/contrib/minizip/ioapi.h:49:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define fopen64 fopen data/fossil-2.13/compat/zlib/contrib/minizip/ioapi.h:54:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define fopen64 fopen data/fossil-2.13/compat/zlib/contrib/minizip/ioapi.h:59:18: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define fopen64 fopen data/fossil-2.13/compat/zlib/contrib/minizip/iowin32.c:112:9: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); data/fossil-2.13/compat/zlib/contrib/minizip/iowin32.c:137:9: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); data/fossil-2.13/compat/zlib/contrib/minizip/iowin32.c:185:9: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP,0,(const char*)filename,-1,filenameW,FILENAME_MAX + 0x200); data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:32:36: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define FOPEN_FUNC(filename, mode) fopen(filename, mode) data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:209:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char number[21]; data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:248:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename_inzip[256]; data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:318:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename_inzip[256]; data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:386:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char answer[128]; data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:541:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename_try[MAXFILENAME+16] = ""; data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:621:13: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename_try,".zip"); data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:33:36: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define FOPEN_FUNC(filename, mode) fopen(filename, mode) data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:110:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[MAXFILENAME+1]; data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:255:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename_try[MAXFILENAME+16]; data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:334:13: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename_try,".zip"); data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:349:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char answer[128]; data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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[1024]; data/fossil-2.13/compat/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/fossil-2.13/compat/zlib/contrib/minizip/mztools.c:149:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[46]; data/fossil-2.13/compat/zlib/contrib/minizip/mztools.c:224:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char header[22]; data/fossil-2.13/compat/zlib/contrib/minizip/mztools.c:257:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fpOutCD = fopen(fileOutTmp, "rb"); data/fossil-2.13/compat/zlib/contrib/minizip/mztools.c:260:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[8192]; data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/contrib/minizip/zip.c:1246:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bufHead[RAND_HEAD_LEN]; data/fossil-2.13/compat/zlib/contrib/minizip/zip.c:1980:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pTmp, p, dataSize + 4); data/fossil-2.13/compat/zlib/contrib/minizip/zip.c:1994:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pData, pNewHeader, size); data/fossil-2.13/compat/zlib/contrib/puff/pufftest.c:70: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/fossil-2.13/compat/zlib/contrib/puff/pufftest.c:105: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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/crc32.c:143:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). out = fopen("crc32.h", "w"); data/fossil-2.13/compat/zlib/examples/enough.c:476:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). syms = atoi(argv[1]); data/fossil-2.13/compat/zlib/examples/enough.c:478:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). root = atoi(argv[2]); data/fossil-2.13/compat/zlib/examples/enough.c:480:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). max = atoi(argv[3]); data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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 inbuf[SIZE]; /* input buffer */ data/fossil-2.13/compat/zlib/examples/gun.c:162:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char outbuf[SIZE]; /* output buffer */ data/fossil-2.13/compat/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 suffix[65536]; /* one-character LZW suffix */ data/fossil-2.13/compat/zlib/examples/gun.c:165:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char match[65280 + 2]; /* buffer for reversed match or gzip data/fossil-2.13/compat/zlib/examples/gun.c:559:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infile = open(inname, O_RDONLY, 0); data/fossil-2.13/compat/zlib/examples/gun.c:572:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666); data/fossil-2.13/compat/zlib/examples/gun.c:689:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(outname, *argv, len); data/fossil-2.13/compat/zlib/examples/gzappend.c:140:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(list, list + 1, len - 1); data/fossil-2.13/compat/zlib/examples/gzappend.c:270:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). gz.fd = open(name, O_RDWR, 0); data/fossil-2.13/compat/zlib/examples/gzappend.c:397:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(name, O_RDONLY, 0); data/fossil-2.13/compat/zlib/examples/gzjoin.c:108:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). in->fd = open(name, O_RDONLY, 0); data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/examples/gzlog.c:758:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(log->path, O_RDONLY, 0)) < 0) { data/fossil-2.13/compat/zlib/examples/gzlog.c:828:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(log->end, ".gz"); data/fossil-2.13/compat/zlib/examples/gzlog.c:829:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). log->fd = open(log->path, O_RDWR | O_CREAT, 0644); data/fossil-2.13/compat/zlib/examples/gzlog.c:843:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(log->end, ".dict"); data/fossil-2.13/compat/zlib/examples/gzlog.c:913:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char *data, buf[5]; data/fossil-2.13/compat/zlib/examples/gzlog.c:952:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(log->end, ".add"); data/fossil-2.13/compat/zlib/examples/gzlog.c:953:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); data/fossil-2.13/compat/zlib/examples/gzlog.c:962:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(log->end, ".temp"); data/fossil-2.13/compat/zlib/examples/gzlog.c:963:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); data/fossil-2.13/compat/zlib/examples/gzlog.c:1013:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(log->end, ".add"); data/fossil-2.13/compat/zlib/examples/gzlog.c:1014:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644); data/fossil-2.13/compat/zlib/examples/gzlog.c:1056:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(log->id, "bad"); data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/examples/zran.c:71:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */ data/fossil-2.13/compat/zlib/examples/zran.c:127:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(next->window, window + WINSIZE - left, left); data/fossil-2.13/compat/zlib/examples/zran.c:129:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(next->window + left, window, WINSIZE - left); data/fossil-2.13/compat/zlib/examples/zran.c:151:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char input[CHUNK]; data/fossil-2.13/compat/zlib/examples/zran.c:152:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char window[WINSIZE]; data/fossil-2.13/compat/zlib/examples/zran.c:255:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char input[CHUNK]; data/fossil-2.13/compat/zlib/examples/zran.c:256:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char discard[WINSIZE]; data/fossil-2.13/compat/zlib/examples/zran.c:360:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[CHUNK]; data/fossil-2.13/compat/zlib/examples/zran.c:367:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). in = fopen(argv[1], "rb"); data/fossil-2.13/compat/zlib/gzguts.h:47:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # define open _open data/fossil-2.13/compat/zlib/gzlib.c:36:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[1024]; data/fossil-2.13/compat/zlib/gzlib.c:65:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "unknown win32 error (%ld)", error); data/fossil-2.13/compat/zlib/gzlib.c:245:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open((const char *)path, oflag, 0666)); data/fossil-2.13/compat/zlib/gzlib.c:298:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(path, "<fd:%d>", fd); /* for debugging */ data/fossil-2.13/compat/zlib/gzlib.c:615:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(state->msg, ": "); data/fossil-2.13/compat/zlib/gzread.c:161:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->x.next, strm->next_in, strm->avail_in); data/fossil-2.13/compat/zlib/gzread.c:325:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, state->x.next, n); data/fossil-2.13/compat/zlib/gzread.c:451:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[1]; data/fossil-2.13/compat/zlib/gzread.c:591:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, state->x.next, n); data/fossil-2.13/compat/zlib/gzwrite.c:213:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->in + have, buf, copy); data/fossil-2.13/compat/zlib/gzwrite.c:309:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[1]; data/fossil-2.13/compat/zlib/gzwrite.c:444:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->in, state->in + state->size, left); data/fossil-2.13/compat/zlib/gzwrite.c:543:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(state->in, state->in + state->size, left); data/fossil-2.13/compat/zlib/inflate.c:640:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ data/fossil-2.13/compat/zlib/inflate.c:1405:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[4]; /* to restore bit buffer to byte string */ data/fossil-2.13/compat/zlib/test/example.c:98:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char*)uncompr, "garbage"); data/fossil-2.13/compat/zlib/test/example.c:149:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char*)uncompr, "garbage"); data/fossil-2.13/compat/zlib/test/example.c:245:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char*)uncompr, "garbage"); data/fossil-2.13/compat/zlib/test/example.c:341:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char*)uncompr, "garbage"); data/fossil-2.13/compat/zlib/test/example.c:420:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char*)uncompr, "garbage"); data/fossil-2.13/compat/zlib/test/example.c:501:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char*)uncompr, "garbage"); data/fossil-2.13/compat/zlib/test/infcover.c:392:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char dict[257]; data/fossil-2.13/compat/zlib/test/infcover.c:474:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char win[32768]; data/fossil-2.13/compat/zlib/test/infcover.c:530:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(prefix, "-late"); data/fossil-2.13/compat/zlib/test/infcover.c:556:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(prefix, "-back"); data/fossil-2.13/compat/zlib/test/minigzip.c:83:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[1024]; data/fossil-2.13/compat/zlib/test/minigzip.c:112:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "unknown win32 error (%ld)", error); data/fossil-2.13/compat/zlib/test/minigzip.c:223:31: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fopen(path, gz->write ? "wb" : "rb"); data/fossil-2.13/compat/zlib/test/minigzip.c:242:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char out[BUFLEN]; data/fossil-2.13/compat/zlib/test/minigzip.c:267:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char in[1]; data/fossil-2.13/compat/zlib/test/minigzip.c:301:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char out[BUFLEN]; data/fossil-2.13/compat/zlib/test/minigzip.c:366:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. local char buf[BUFLEN]; data/fossil-2.13/compat/zlib/test/minigzip.c:434:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. local char buf[BUFLEN]; data/fossil-2.13/compat/zlib/test/minigzip.c:461:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. local char outfile[MAX_NAME_LEN]; data/fossil-2.13/compat/zlib/test/minigzip.c:477:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). in = fopen(file, "rb"); data/fossil-2.13/compat/zlib/test/minigzip.c:499:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. local char buf[MAX_NAME_LEN]; data/fossil-2.13/compat/zlib/test/minigzip.c:534:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). out = fopen(outfile, "wb"); data/fossil-2.13/compat/zlib/test/minigzip.c:563:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *bname, outmode[20]; data/fossil-2.13/compat/zlib/test/minigzip.c:568:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(outmode, "wb6 "); data/fossil-2.13/compat/zlib/test/minigzip.c:633:33: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE * in = fopen(*argv, "rb"); data/fossil-2.13/compat/zlib/trees.c:328:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *header = fopen("trees.h", "w"); data/fossil-2.13/compat/zlib/zutil.c:13:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. z_const char * const z_errmsg[10] = { data/fossil-2.13/compat/zlib/zutil.h:49:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ data/fossil-2.13/compat/zlib/zutil.h:109:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") data/fossil-2.13/compat/zlib/zutil.h:202:30: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # define F_OPEN(name, mode) fopen((name), (mode)) data/fossil-2.13/compat/zlib/zutil.h:226:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define zmemcpy memcpy data/fossil-2.13/src/add.c:69:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *azManifests[3]; data/fossil-2.13/src/add.c:74:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *azRepo[4] = { 0, 0, 0, 0 }; data/fossil-2.13/src/ajax.c:295: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). int renderMode = atoi(PD("render_mode","0")); data/fossil-2.13/src/ajax.c:296:12: [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). int ln = atoi(PD("ln","0")); data/fossil-2.13/src/ajax.c:297:22: [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). int iframeHeight = atoi(PD("iframe_height","40")); data/fossil-2.13/src/alerts.c:322: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 zBuf[100]; data/fossil-2.13/src/alerts.c:358: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 x[3]; data/fossil-2.13/src/alerts.c:729: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 zHash[20]; data/fossil-2.13/src/alerts.c:1376: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 ssub[20]; data/fossil-2.13/src/alerts.c:1660:11: [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). sid = atoi(P("sid")); data/fossil-2.13/src/alerts.c:1680: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 newSsub[10]; data/fossil-2.13/src/alerts.c:1983:8: [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). dx = atoi(PD("dx","0")); data/fossil-2.13/src/attach.c:176:18: [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). int attachid = atoi(PD("attachid","0")); data/fossil-2.13/src/attach.c:329:19: [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). int szContent = atoi(PD("f:bytes","0")); data/fossil-2.13/src/backlink.c:199: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 zLink[HNAME_MAX+4]; data/fossil-2.13/src/backlink.c:208:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zLink, zTarget, nTarget); data/fossil-2.13/src/backlink.c:338:13: [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). srctype = atoi(g.argv[2]); data/fossil-2.13/src/backlink.c:342:11: [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). srcid = atoi(g.argv[3]); data/fossil-2.13/src/backoffice.c:357:35: [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). if( zSleep ) sqlite3_sleep(1000*atoi(zSleep)); data/fossil-2.13/src/backoffice.c:359:40: [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). sqlite3_uint64 x = (sqlite3_uint64)atoi(g.argv[i]); data/fossil-2.13/src/backoffice.c:713:19: [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). nPoll = zPoll ? atoi(zPoll) : 0; data/fossil-2.13/src/backoffice.c:715:18: [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). nMin = zPoll ? atoi(zPoll) : 3600; data/fossil-2.13/src/backoffice.c:815: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 *argv[4]; data/fossil-2.13/src/backoffice.c:816:5: [2] (buffer) wchar_t: 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. wchar_t *ax[5]; data/fossil-2.13/src/backoffice.c:846: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("/dev/null", O_RDWR); data/fossil-2.13/src/bisect.c:56:27: [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). bag_insert(&skip, atoi(blob_str(&id)+1)); data/fossil-2.13/src/bisect.c:261:13: [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). rid = atoi(blob_str(&id)+1); data/fossil-2.13/src/bisect.c:265:13: [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). rid = atoi(blob_str(&id)); data/fossil-2.13/src/bisect.c:322:13: [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). rid = atoi(blob_str(&id)+1); data/fossil-2.13/src/bisect.c:325:13: [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). rid = atoi(blob_str(&id)); data/fossil-2.13/src/bisect.c:519:13: [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). rid = atoi(blob_str(&id)); data/fossil-2.13/src/bisect.c:600: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 *newArgv[8]; data/fossil-2.13/src/blob.c:203: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(pNew, pBlob->aData, pBlob->nUsed); data/fossil-2.13/src/blob.c:309:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pBlob->aData[pBlob->nUsed], aData, nData); data/fossil-2.13/src/blob.c:324:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pBlob->aData[nUsed], aData, nData); data/fossil-2.13/src/blob.c:867: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 zBuf[10000]; data/fossil-2.13/src/blob.c:947: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 zBuf[1024]; data/fossil-2.13/src/blob.c:1412: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( pDest, pIn->aData, nLen ); data/fossil-2.13/src/branch.c:584:5: [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 branch</a></div> is a branch that has one or more data/fossil-2.13/src/branch.c:585:53: [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). @ <div class="sideboxDescribed">%z(href("leaves"))open leaves.</a></div> data/fossil-2.13/src/branch.c:586:21: [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). @ The presence of open leaves presumably means data/fossil-2.13/src/browse.c:479: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(pNew->zFullName, zPath, i); data/fossil-2.13/src/browse.c:484: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(pNew->zUuid, zUuid, strlen(zUuid)+1); data/fossil-2.13/src/browse.c:642:18: [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). int useMtime = atoi(PD("mtime","0")); data/fossil-2.13/src/builtin.c:147:13: [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). int i = atoi(zList); data/fossil-2.13/src/builtin.c:725: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 nameBuffer[50]; data/fossil-2.13/src/cache.c:115: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 zBuf[30]; data/fossil-2.13/src/cache.c:354: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 zBuf[100]; data/fossil-2.13/src/capabilities.c:30: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 x[128]; data/fossil-2.13/src/capabilities.c:147: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[100]; data/fossil-2.13/src/captcha.c:428: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 zHex[30]; data/fossil-2.13/src/captcha.c:429:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). v = (unsigned int)atoi(g.argv[i]); data/fossil-2.13/src/captcha.c:459: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 zRes[20]; data/fossil-2.13/src/captcha.c:476:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zRes, z, 8); data/fossil-2.13/src/captcha.c:508: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 z[30]; data/fossil-2.13/src/captcha.c:517:42: [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). zDecode = captcha_decode((unsigned int)atoi(zSeed)); data/fossil-2.13/src/captcha.c:619:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if( zCookieValue && atoi(zCookieValue)==1 ) return 0; data/fossil-2.13/src/captcha.c:653: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 zSoundName[50]; data/fossil-2.13/src/captcha.c:665: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(pOut->aData+pOut->nUsed-nData, pData+szWavHdr, nData); data/fossil-2.13/src/captcha.c:668: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(pOut->aData, pData, szWavHdr); data/fossil-2.13/src/captcha.c:690:54: [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). const char *zDecode = captcha_decode((unsigned int)atoi(zSeed)); data/fossil-2.13/src/cgi.c:850: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 *azArg[50]; data/fossil-2.13/src/cgi.c:1017: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 zFile[50]; data/fossil-2.13/src/cgi.c:1165:9: [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). len = atoi(PD("CONTENT_LENGTH", "0")); data/fossil-2.13/src/cgi.c:1353:9: [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). x = atoi(zIn); data/fossil-2.13/src/cgi.c:1637: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 zIp[100]; data/fossil-2.13/src/cgi.c:1667: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 zLine[2000]; /* A single line of input. */ data/fossil-2.13/src/cgi.c:1776: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 zLine[2000]; /* A single line of input. */ data/fossil-2.13/src/cgi.c:1866:24: [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). content_length = atoi(zVal); data/fossil-2.13/src/cgi.c:1954: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 zLine[2000]; /* A single line of input. */ data/fossil-2.13/src/cgi.c:2264: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 zIgnore[4]; data/fossil-2.13/src/cgi.c:2265: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 zMonth[4]; data/fossil-2.13/src/checkin.c:1222: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 zIn[300]; data/fossil-2.13/src/codecheck1.c:79:8: [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(zFilename, "rb"); data/fossil-2.13/src/codecheck1.c:526:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zCopy, zStart+1, len); data/fossil-2.13/src/comformat.c:210: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 zBuf[400]; int iBuf=0; /* Output buffer and counter. */ data/fossil-2.13/src/comformat.c:341: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 zBuffer[400]; data/fossil-2.13/src/comformat.c:586:13: [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). width = atoi(zWidth); data/fossil-2.13/src/comformat.c:592:14: [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). indent = atoi(zIndent); data/fossil-2.13/src/configure.c:373: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 *azToken[24]; data/fossil-2.13/src/configure.c:382: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. const char *azField[6]; /* Names of the data fields */ data/fossil-2.13/src/configure.c:934: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 zTrans[1000]; data/fossil-2.13/src/content.c:752:9: [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). rid = atoi(g.argv[2]); data/fossil-2.13/src/content.c:923:42: [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). for(i=2; i<g.argc; i++) aSrc[nSrc++] = atoi(g.argv[i]); data/fossil-2.13/src/content.c:925:19: [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). content_deltify(atoi(g.argv[2]), aSrc, nSrc, bForce); data/fossil-2.13/src/content.c:1036: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 zFirstLine[400]; data/fossil-2.13/src/content.c:1042: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(zFirstLine, z, i); data/fossil-2.13/src/content.c:1281:15: [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). int rid = atoi(g.argv[i]); data/fossil-2.13/src/cson_amalgamation.c:362: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. signed char static_stack[JSON_PARSER_STACK_SIZE]; data/fossil-2.13/src/cson_amalgamation.c:363: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 static_parse_buffer[JSON_PARSER_PARSE_BUFFER_SIZE]; data/fossil-2.13/src/cson_amalgamation.c:413: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 const signed char ascii_class[128] = { data/fossil-2.13/src/cson_amalgamation.c:502: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 const signed char state_transition_table[NR_STATES][NR_CLASSES] = { data/fossil-2.13/src/cson_amalgamation.c:622: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(mem, jc->stack, bytes_to_copy); data/fossil-2.13/src/cson_amalgamation.c:794: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(mem, jc->parse_buffer, bytes_to_copy); data/fossil-2.13/src/cson_amalgamation.c:882:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char utf8_lead_bits[4] = { 0x00, 0xC0, 0xE0, 0xF0 }; data/fossil-2.13/src/cson_amalgamation.c:1925: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 empty[2] = {0,0}; data/fossil-2.13/src/cson_amalgamation.c:2504: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 rbuf[BufSize]; data/fossil-2.13/src/cson_amalgamation.c:2520: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( dest->mem + dest->used, rbuf, rlen ); data/fossil-2.13/src/cson_amalgamation.c:2867: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( CSON_INT(c), &v, sizeof(v) ); data/fossil-2.13/src/cson_amalgamation.c:2886: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( CSON_DBL(c), &v, sizeof(v) ); data/fossil-2.13/src/cson_amalgamation.c:2908: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( dest, str, len ); data/fossil-2.13/src/cson_amalgamation.c:3573: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 ch[2] = {0,0}; data/fossil-2.13/src/cson_amalgamation.c:3788: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 escChar[3] = {'\\',0,0}; data/fossil-2.13/src/cson_amalgamation.c:3790: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 ubuf[UBLen]; data/fossil-2.13/src/cson_amalgamation.c:3882:26: [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. rc = sprintf(ubuf, "\\u%04x",ch); data/fossil-2.13/src/cson_amalgamation.c:3892:26: [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. rc = sprintf(ubuf, "\\u%04x\\u%04x", data/fossil-2.13/src/cson_amalgamation.c:3965: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 b[BufLen]; data/fossil-2.13/src/cson_amalgamation.c:3988: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 b[BufLen]; data/fossil-2.13/src/cson_amalgamation.c:4050: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 buf[BufLen]; data/fossil-2.13/src/cson_amalgamation.c:4308: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 * f = fopen(dest,"wb"); data/fossil-2.13/src/cson_amalgamation.c:4325: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 * f = fopen(src, "r"); data/fossil-2.13/src/cson_amalgamation.c:4557: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 buf[BufSize]; data/fossil-2.13/src/cson_amalgamation.c:4582: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, beg, len ); data/fossil-2.13/src/cson_amalgamation.c:4847:15: [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[BufSize] = {0}; data/fossil-2.13/src/cson_amalgamation.c:4855:15: [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[BufSize] = {0}; data/fossil-2.13/src/cson_amalgamation.c:4900:15: [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[BufSize] = {0}; data/fossil-2.13/src/cson_amalgamation.c:4908:15: [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[BufSize] = {0}; data/fossil-2.13/src/cygsup.h:115:30: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). WINBASEAPI extern WINAPI int MultiByteToWideChar( data/fossil-2.13/src/db.c:131: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 *azDeleteOnFail[3]; /* Files to delete on a failure */ data/fossil-2.13/src/db.c:132: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 *azBeforeCommit[5]; /* Commands to run prior to COMMIT */ data/fossil-2.13/src/db.c:1433:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, blob_str(pKey), blobSize); data/fossil-2.13/src/db.c:1465: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(zSavedKey, blob_str(pKey), blobSize); data/fossil-2.13/src/db.c:2020: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 zPwd[2000]; data/fossil-2.13/src/db.c:2768: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 zEnd[40]; data/fossil-2.13/src/db.c:2891: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 zHash[HNAME_MAX+1]; data/fossil-2.13/src/db.c:2894: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(zHash, zContent, n); data/fossil-2.13/src/db.c:4601:13: [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). rcvid = atoi(g.argv[2]); data/fossil-2.13/src/db.c:4654:26: [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). zRepo = db_fingerprint(atoi(zCkout), 1); data/fossil-2.13/src/db.c:4660:28: [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). zRepo = db_fingerprint(atoi(zCkout), 0); data/fossil-2.13/src/delta.c:48: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 zBuf[20]; data/fossil-2.13/src/delta.c:99: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 z[NHASH]; /* The values that have been hashed */ data/fossil-2.13/src/delta.c:112:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pHash->z, z, NHASH); data/fossil-2.13/src/delta.c:162: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 zBuf[20]; data/fossil-2.13/src/delta.c:370: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(zDelta, zOut, lenOut); data/fossil-2.13/src/delta.c:475:11: [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(zDelta, &zOut[base], bestLitsz); data/fossil-2.13/src/delta.c:500: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(zDelta, &zOut[base], lenOut-base); data/fossil-2.13/src/delta.c:517: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(zDelta, &zOut[base], lenOut-base); data/fossil-2.13/src/delta.c:608: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(zOut, &zSrc[ofst], cnt); data/fossil-2.13/src/delta.c:624: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(zOut, zDelta, cnt); data/fossil-2.13/src/deltafunc.c:419:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pCur->aDelta, a, pCur->nDelta); data/fossil-2.13/src/descendants.c:363:13: [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). width = atoi(zWidth); data/fossil-2.13/src/descendants.c:426: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 zLineNo[10]; data/fossil-2.13/src/descendants.c:430:13: [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). width = atoi(zWidth); data/fossil-2.13/src/descendants.c:575:43: [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). @ <li> An <div class="sideboxDescribed">open leaf</div> data/fossil-2.13/src/descendants.c:586:28: [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). @ <h1>All leaves, both open and closed:</h1> data/fossil-2.13/src/diff.c:218: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(&m, z+x, 8); data/fossil-2.13/src/diff.c:222: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(&m, z+x, k-k2); data/fossil-2.13/src/diff.c:662: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 zLn[7]; data/fossil-2.13/src/diff.c:979: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 aFirst[256]; /* aFirst[X] = index in zB[] of first char X */ data/fossil-2.13/src/diff.c:980: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 aNext[252]; /* aNext[i] = index in zB[] of next zB[i] char */ data/fossil-2.13/src/diff.c:1289: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 zLn[10]; data/fossil-2.13/src/diff.c:2016:53: [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). if( (z = find_option("context","c",1))!=0 && (f = atoi(z))>=0 ){ data/fossil-2.13/src/diff.c:2020:51: [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). if( (z = find_option("width","W",1))!=0 && (f = atoi(z))>0 ){ data/fossil-2.13/src/diff.c:2261: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). iLimit = atoi(zLimit); data/fossil-2.13/src/diff.c:2526: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 zPrefix[300]; data/fossil-2.13/src/dispatch.c:362: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. const char *azEnd[10]; data/fossil-2.13/src/dispatch.c:717: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. const char *az[20]; data/fossil-2.13/src/dispatch.c:938: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. const char *aCmd[MX_COMMAND]; data/fossil-2.13/src/dispatch.c:955: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. const char *aCmd[MX_COMMAND]; data/fossil-2.13/src/dispatch.c:1067: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. const char *az[5]; data/fossil-2.13/src/doc.c:430: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 zSuffix[20]; data/fossil-2.13/src/encode.c:531: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 signed char trans[256]; data/fossil-2.13/src/encode.c:720:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char aObscurer[16] = { data/fossil-2.13/src/encode.c:771: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(zOut, zIn, n+1); data/fossil-2.13/src/etag.c:71:8: [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 zETag[33]; /* The generated ETag */ data/fossil-2.13/src/etag.c:98: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 zBuf[50]; data/fossil-2.13/src/etag.c:162:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zETag, md5sum_finish(0), 33); data/fossil-2.13/src/etag.c:253:21: [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). if( zKey ) iKey = atoi(zKey); data/fossil-2.13/src/export.c:39: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 uuid[65]; /* The GIT hash name for this object */ data/fossil-2.13/src/export.c:262: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 sid[13]; data/fossil-2.13/src/export.c:319:15: [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). mark->rid = atoi(&cur_tok[1]); data/fossil-2.13/src/export.c:383: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 line[101]; data/fossil-2.13/src/export.c:402:26: [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). unsigned int mid = atoi(mark.name + 1); data/fossil-2.13/src/export.c:1092: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[24]; data/fossil-2.13/src/export.c:1283: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 zLine[200]; /* One line of a mark file */ data/fossil-2.13/src/export.c:1289:28: [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). nLimit = (unsigned int)atoi(zLimit); data/fossil-2.13/src/export.c:1408:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). xCmd = fopen(zDebug, "wb"); data/fossil-2.13/src/export.c:1470: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). pMarks = fopen(".mirror_state/marks.txt", "rb"); data/fossil-2.13/src/export.c:1476:30: [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). db_bind_int(&q, ":id", atoi(zLine+1)); data/fossil-2.13/src/extcgi.c:181: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 zLine[1000]; /* One line of the CGI reply */ data/fossil-2.13/src/extcgi.c:323:24: [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). cgi_set_status(atoi(&zLine[i]), &zLine[j]); data/fossil-2.13/src/extcgi.c:325: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). nContent = atoi(&zLine[15]); data/fossil-2.13/src/file.c:244: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 *zName, zBuf[1000]; data/fossil-2.13/src/file.c:251: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(zName, zLinkFile, nName+1); data/fossil-2.13/src/file.c:608: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 zBuf[8192]; data/fossil-2.13/src/file.c:1143: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 zTemp[2000]; data/fossil-2.13/src/file.c:1196: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 zPwd[2000]; data/fossil-2.13/src/file.c:1310: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 zBuf[200]; data/fossil-2.13/src/file.c:1439: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 zBuf[100]; data/fossil-2.13/src/file.c:1508: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 zBuf[2000]; data/fossil-2.13/src/file.c:1559: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(pOut, &tmp, sizeof(tmp)); data/fossil-2.13/src/file.c:1729: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). *pPort = atoi(&zUri[i]); data/fossil-2.13/src/file.c:1778: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 zRand[16]; data/fossil-2.13/src/file.c:1783:3: [2] (buffer) wchar_t: 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. wchar_t zTmpPath[MAX_PATH]; data/fossil-2.13/src/file.c:1842: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. fossil_path_free((char *)azDirs[0]); data/fossil-2.13/src/file.c:1843: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. fossil_path_free((char *)azDirs[1]); data/fossil-2.13/src/file.c:1844: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. fossil_path_free((char *)azDirs[2]); data/fossil-2.13/src/file.c:1850: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. fossil_path_free((char *)azDirs[0]); data/fossil-2.13/src/file.c:2024:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(zName, zMode); data/fossil-2.13/src/file.c:2087: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 zReturn[5]; data/fossil-2.13/src/fileedit.c:1123:11: [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). iFlag = atoi(PD("sbs","0")); data/fossil-2.13/src/fileedit.c:1129:11: [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). iFlag = atoi(PD("ws","2")); data/fossil-2.13/src/fileedit.c:1255:18: [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). #define p_int(K) atoi(PD(K,"0")) data/fossil-2.13/src/fileedit.c:1490:9: [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). if(0!=atoi(PD("include_manifest","0"))){ data/fossil-2.13/src/finfo.c:156:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). iLimit = zLimit ? atoi(zLimit) : -1; data/fossil-2.13/src/finfo.c:158:25: [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). iOffset = zOffset ? atoi(zOffset) : 0; data/fossil-2.13/src/finfo.c:164: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). iWidth = atoi(zWidth); data/fossil-2.13/src/finfo.c:315: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 zPrevDate[20]; data/fossil-2.13/src/finfo.c:330: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). int fDebug = atoi(PD("debug","0")); data/fossil-2.13/src/finfo.c:490:12: [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). if( (n = atoi(PD("n","0")))>0 ){ data/fossil-2.13/src/finfo.c:581: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 zTime[10]; data/fossil-2.13/src/finfo.c:609: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(zTime, &zDate[11], 5); data/fossil-2.13/src/forum.c:289:59: [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). fpid = db_int(0, "SELECT rid FROM blob WHERE rid=%d", atoi(zName)); data/fossil-2.13/src/forum.c:1366:12: [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). iLimit = atoi(PD("n","25")); data/fossil-2.13/src/forum.c:1367:11: [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). iOfst = atoi(PD("x","0")); data/fossil-2.13/src/fusefs.c:52: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 *az[3]; /* 0=type, 1=id, 2=path */ data/fossil-2.13/src/fusefs.c:279:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, blob_buffer(&fusefs.content)+offset, size); data/fossil-2.13/src/fusefs.c:320: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 *azNewArgv[5]; data/fossil-2.13/src/glob.c:117:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(z, zPatternList, nList+1); data/fossil-2.13/src/graph.c:77: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 zUuid[HNAME_MAX+1]; /* Check-in for file ID */ data/fossil-2.13/src/graph.c:261:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( nParent>0 ) memcpy(pRow->aParent, aParent, sizeof(aParent[0])*nParent); data/fossil-2.13/src/gzip.c:58:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char aHdr[10]; data/fossil-2.13/src/gzip.c:112: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 aTrailer[8]; data/fossil-2.13/src/hook.c:181:6: [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). atoi(zBaseRcvid), atoi(zNewRcvid) data/fossil-2.13/src/hook.c:181:24: [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). atoi(zBaseRcvid), atoi(zNewRcvid) data/fossil-2.13/src/hook.c:185: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). atoi(zBaseRcvid), atoi(zNewRcvid)); data/fossil-2.13/src/hook.c:185:38: [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). atoi(zBaseRcvid), atoi(zNewRcvid)); data/fossil-2.13/src/hook.c:263:19: [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). nSeq = zSeq ? atoi(zSeq) : 10; data/fossil-2.13/src/hook.c:291:19: [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). nSeq = zSeq ? atoi(zSeq) : 10; data/fossil-2.13/src/hook.c:300:12: [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). id = atoi(g.argv[i]); data/fossil-2.13/src/hook.c:345:9: [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). atoi(zId) data/fossil-2.13/src/hook.c:392:10: [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). id = atoi(g.argv[3]); data/fossil-2.13/src/hook.c:458:7: [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). if( atoi(zLastRcvid)>=atoi(zNewRcvid) ){ data/fossil-2.13/src/hook.c:458:25: [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). if( atoi(zLastRcvid)>=atoi(zNewRcvid) ){ data/fossil-2.13/src/http.c:276: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(zOutFile, "wb"); data/fossil-2.13/src/http.c:284: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(zOutFile, "wb"); data/fossil-2.13/src/http.c:349:17: [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). iLength = atoi(&zLine[i]); data/fossil-2.13/src/http_socket.c:152: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 zPort[30]; data/fossil-2.13/src/http_socket.c:153: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 zRemote[NI_MAXHOST]; data/fossil-2.13/src/http_socket.c:247: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 zRemote[NI_MAXHOST]; data/fossil-2.13/src/http_ssl.c:209: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[256]; data/fossil-2.13/src/http_ssl.c:338: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 md[EVP_MAX_MD_SIZE]; data/fossil-2.13/src/http_ssl.c:339: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 zHash[EVP_MAX_MD_SIZE*2+1]; data/fossil-2.13/src/http_transport.c:358: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(zBuf, &transport.pBuf[transport.iCursor], toMove); data/fossil-2.13/src/import.c:91: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(z, zOrig, n); data/fossil-2.13/src/import.c:283: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 *aTCard[4]; /* Array of T cards for manifest */ data/fossil-2.13/src/import.c:560: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 zLine[1000]; data/fossil-2.13/src/import.c:627:18: [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). gg.nData = atoi(&zLine[5]); data/fossil-2.13/src/import.c:884: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 zLine[1000]; data/fossil-2.13/src/import.c:931:17: [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). nRawProps = atoi(zLen); data/fossil-2.13/src/import.c:949:19: [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). propLen = atoi(&zLine[2]); data/fossil-2.13/src/import.c:956:19: [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). propLen = atoi(&zLine[2]); data/fossil-2.13/src/import.c:972:19: [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). propLen = atoi(&zLine[2]); data/fossil-2.13/src/import.c:996:12: [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). nLen = atoi(zLen); data/fossil-2.13/src/import.c:1359:11: [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). ver = atoi(zTemp); data/fossil-2.13/src/import.c:1420:18: [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). gsvn.rev = atoi(zTemp); data/fossil-2.13/src/import.c:1482:22: [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). srcRev = atoi(zTemp); data/fossil-2.13/src/import.c:1740:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)*renOpt->varPre, zArgument, sep - zArgument); data/fossil-2.13/src/info.c:466:11: [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). x = atoi(PD("dw","80"))*(DIFF_CONTEXT_MASK+1); data/fossil-2.13/src/info.c:475:9: [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). x = atoi(PD("dc","7")); data/fossil-2.13/src/info.c:662:14: [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). diffType = atoi(PD("diff","2")); data/fossil-2.13/src/info.c:1189:14: [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). diffType = atoi(PD("diff","2")); data/fossil-2.13/src/info.c:1676:14: [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). diffType = atoi(PD("diff","2")); data/fossil-2.13/src/info.c:1875: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 zLine[100]; data/fossil-2.13/src/info.c:2061:19: [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). iStart = iEnd = atoi(zLn); data/fossil-2.13/src/info.c:2070: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). iEnd = atoi(&zLn[i]); data/fossil-2.13/src/info.c:2079:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). iStart = iEnd = atoi(&zLn[i++]); data/fossil-2.13/src/info.c:2497:21: [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). if( zLn==0 || atoi(zLn)==0 ){ data/fossil-2.13/src/info.c:2547: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 zTktName[HNAME_MAX+1]; data/fossil-2.13/src/info.c:3027: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 zLabel[30]; data/fossil-2.13/src/info.c:3148: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 zLabel[30]; data/fossil-2.13/src/json.c:235: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 buf[BufSize] = {'F','O','S','S','I','L','-',0}; data/fossil-2.13/src/json.c:237: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(buf+7,"%04d", code); data/fossil-2.13/src/json.c:398:19: [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). return sv ? atoi(sv) : dflt; data/fossil-2.13/src/json.c:548:12: [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). rc = atoi(opt); data/fossil-2.13/src/json.c:906: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(zPart, head, len); data/fossil-2.13/src/json.c:1996: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 zBuf[BufLen]; data/fossil-2.13/src/json_login.c:99: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 seedBuffer[SeedBufLen]; data/fossil-2.13/src/json_report.c:76:17: [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). nReport = atoi(arg); data/fossil-2.13/src/json_timeline.c:265:15: [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). limit = atoi(arg); data/fossil-2.13/src/leaf.c:206: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 zVal[30]; data/fossil-2.13/src/linenoise.c:185:26: [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). lndebug_fp = fopen("/tmp/lndebug.txt","a"); \ data/fossil-2.13/src/linenoise.c:263: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[32]; data/fossil-2.13/src/linenoise.c:304: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 seq[32]; data/fossil-2.13/src/linenoise.c:435: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(copy,str,len+1); data/fossil-2.13/src/linenoise.c:465: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(new+ab->len,s,len); data/fossil-2.13/src/linenoise.c:477: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 seq[64]; data/fossil-2.13/src/linenoise.c:503: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 seq[64]; data/fossil-2.13/src/linenoise.c:544: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 seq[64]; data/fossil-2.13/src/linenoise.c:798: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 seq[3]; data/fossil-2.13/src/linenoise.c:956: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 quit[4]; data/fossil-2.13/src/linenoise.c:1039: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[LINENOISE_MAX_LINE]; data/fossil-2.13/src/linenoise.c:1151: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(new,history+(history_len-tocopy), sizeof(char*)*tocopy); data/fossil-2.13/src/linenoise.c:1168: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). fp = fopen(filename,"w"); data/fossil-2.13/src/linenoise.c:1184: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 *fp = fopen(filename,"r"); data/fossil-2.13/src/linenoise.c:1185: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[LINENOISE_MAX_LINE]; data/fossil-2.13/src/login.c:146:38: [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). zPw = captcha_decode((unsigned int)atoi(zCS)); data/fossil-2.13/src/login.c:281:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). const int expires = atoi(zExpire)*3600; data/fossil-2.13/src/login.c:407:9: [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). if( atoi(&zAgent[8])<4 ) return 0; /* Many bots advertise as Mozilla/3 */ data/fossil-2.13/src/login.c:440: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 zLine[3000]; data/fossil-2.13/src/login.c:1559:29: [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). doAlerts = canDoAlerts && atoi(PD("alerts","1"))!=0; data/fossil-2.13/src/login.c:1648: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 ssub[20]; data/fossil-2.13/src/login.c:1757:13: [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). int a = atoi(PD("alerts","1")); data/fossil-2.13/src/lookslike.c:427:15: [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). nRepeat = atoi(zCount); data/fossil-2.13/src/main.c:245: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 zCsrfToken[12]; /* Value of the anti-CSRF token */ data/fossil-2.13/src/main.c:260:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *azAuxName[MX_AUX]; /* Name of each aux() or option() value */ data/fossil-2.13/src/main.c:261: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 *azAuxParam[MX_AUX]; /* Param of each aux() or option() value */ data/fossil-2.13/src/main.c:262: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. const char *azAuxVal[MX_AUX]; /* Value of each aux() or option() value */ data/fossil-2.13/src/main.c:263: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. const char **azAuxOpt[MX_AUX]; /* Options of each option() value */ data/fossil-2.13/src/main.c:415:3: [2] (buffer) wchar_t: 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. wchar_t buf[MAX_PATH]; data/fossil-2.13/src/main.c:522: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 zCode[30]; data/fossil-2.13/src/main.c:610:21: [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). g.comFmtFlags = atoi(zValue); data/fossil-2.13/src/main.c:843: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). fd = open("/dev/null",O_WRONLY); data/fossil-2.13/src/main.c:1673: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 zBuf[24]; data/fossil-2.13/src/main.c:2263:26: [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). fossil_set_timeout(atoi(blob_str(&value))); data/fossil-2.13/src/main.c:2887:22: [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). iPort = mxPort = atoi(zPort); data/fossil-2.13/src/main.c:2939:24: [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). fossil_set_timeout(atoi(zTimeout)); data/fossil-2.13/src/main.c:3045:15: [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). int iCase = atoi(PD("case","0")); data/fossil-2.13/src/makeheaders.c:599: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(pDecl->zName,"%.*s",nName,zName); data/fossil-2.13/src/makeheaders.c:632: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(pId->zName,"%.*s",nId,zId); data/fossil-2.13/src/makeheaders.c:713:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). pIn = fopen(zFilename,"r"); data/fossil-2.13/src/makeheaders.c:730: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). pOut = fopen(zFilename,"w"); data/fossil-2.13/src/makeheaders.c:2083:7: [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(pIf->zCondition,"%.*s",nText,zText); data/fossil-2.13/src/makeheaders.c:2159: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(pDecl->zDecl,"%.*s\n",pToken->nText,pToken->zText); data/fossil-2.13/src/makeheaders.c:2188:7: [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(pInclude->zFile,"%.*s",nArg,zArg); data/fossil-2.13/src/makeheaders.c:2195:7: [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(pInclude->zFile,"%.*s",nArg,zArg); data/fossil-2.13/src/makeheaders.c:3015: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 zLabel[50]; data/fossil-2.13/src/makeheaders.c:3187: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 zBuf[1000]; /* A single argument is accumulated here */ data/fossil-2.13/src/makeheaders.c:3191:8: [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(zFile,"r"); data/fossil-2.13/src/manifest.c:449: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 zErrBuf[100]; /* Write error messages here */ data/fossil-2.13/src/manifest.c:1209:22: [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). if( g.argc>3 ) n = atoi(g.argv[3]); data/fossil-2.13/src/manifest.c:1266:15: [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). if( z ) N = atoi(z); data/fossil-2.13/src/manifest.c:1836: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 zBaseId[30]; /* Baseline manifest RID for deltas. "NULL" otherwise */ data/fossil-2.13/src/manifest.c:2366: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 zLength[40]; data/fossil-2.13/src/manifest.c:2434: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 zLength[40]; data/fossil-2.13/src/markdown_html.c:489: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 zClose[20]; data/fossil-2.13/src/md5.c:53: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]; data/fossil-2.13/src/md5.c:216:25: [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(p, buf, len); data/fossil-2.13/src/md5.c:219: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(p, buf, t); data/fossil-2.13/src/md5.c:229: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(ctx->in, buf, 64); data/fossil-2.13/src/md5.c:238: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(ctx->in, buf, len); data/fossil-2.13/src/md5.c:245:31: [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 void MD5Final(unsigned char digest[16], MD5Context *pCtx){ data/fossil-2.13/src/md5.c:277: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(&ctx->in[14*sizeof(uint32)], ctx->bits, 2*sizeof(uint32)); data/fossil-2.13/src/md5.c:281: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(digest, ctx->buf, 16); data/fossil-2.13/src/md5.c:348: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 zResult[12]; data/fossil-2.13/src/md5.c:369: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 zResult[16]; data/fossil-2.13/src/md5.c:370: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 zOut[33]; data/fossil-2.13/src/md5.c:392: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 zResult[16]; data/fossil-2.13/src/md5.c:393: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 zBuf[10240]; data/fossil-2.13/src/md5.c:423: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 zResult[16]; data/fossil-2.13/src/merge3.c:555:15: [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 *azSubst[8]; /* Strings to be substituted */ data/fossil-2.13/src/miniz.c:517: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 m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE]; data/fossil-2.13/src/miniz.c:518: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 m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE]; data/fossil-2.13/src/miniz.c:932:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef unsigned char mz_validate_uint16[sizeof(mz_uint16)==2 ? 1 : -1]; data/fossil-2.13/src/miniz.c:933:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef unsigned char mz_validate_uint32[sizeof(mz_uint32)==4 ? 1 : -1]; data/fossil-2.13/src/miniz.c:934:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef unsigned char mz_validate_uint64[sizeof(mz_uint64)==8 ? 1 : -1]; data/fossil-2.13/src/miniz.c:1260: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(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); data/fossil-2.13/src/miniz.c:1280: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(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); data/fossil-2.13/src/miniz.c:1360:31: [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 TINFL_MEMCPY(d, s, l) memcpy(d, s, l) data/fossil-2.13/src/miniz.c:1949:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes); data/fossil-2.13/src/miniz.c:1950:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], num_dist_codes); data/fossil-2.13/src/miniz.c:2246: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((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, bytes_to_copy); data/fossil-2.13/src/miniz.c:2347: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(d->m_dict + dst_pos, d->m_pSrc, n); data/fossil-2.13/src/miniz.c:2349: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(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos)); data/fossil-2.13/src/miniz.c:2625: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((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf + d->m_output_flush_ofs, n); data/fossil-2.13/src/miniz.c:2753:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((mz_uint8*)p->m_pBuf + p->m_size, pBuf, len); p->m_size = new_size; data/fossil-2.13/src/miniz.c:2823: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(out_buf.m_pBuf, pnghdr, 41); data/fossil-2.13/src/miniz.c:2885:28: [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 MZ_FOPEN(f, m) fopen(f, m) data/fossil-2.13/src/miniz.c:2901:28: [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 MZ_FOPEN(f, m) fopen(f, m) data/fossil-2.13/src/miniz.c:2933:28: [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 MZ_FOPEN(f, m) fopen(f, m) data/fossil-2.13/src/miniz.c:3026:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((mz_uint8*)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_element_size); data/fossil-2.13/src/miniz.c:3287:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s); data/fossil-2.13/src/miniz.c:3425:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pStat->m_filename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); pStat->m_filename[n] = '\0'; data/fossil-2.13/src/miniz.c:3429:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pStat->m_comment, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS), n); pStat->m_comment[n] = '\0'; data/fossil-2.13/src/miniz.c:3443: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(pFilename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); data/fossil-2.13/src/miniz.c:4021:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((mz_uint8 *)pState->m_pMem + file_ofs, pBuf, n); data/fossil-2.13/src/miniz.c:4069:28: [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. mz_uint64 cur_ofs = 0; char buf[4096]; MZ_CLEAR_OBJ(buf); data/fossil-2.13/src/miniz.c:4249: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[4096]; data/fossil-2.13/src/miniz.c:4686:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(central_header, pSrc_central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE); data/fossil-2.13/src/mkbuiltin.c:49:8: [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(zFilename, "rb"); data/fossil-2.13/src/mkbuiltin.c:136:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if( (in = fopen(name, "rb"))==0 ){ data/fossil-2.13/src/mkbuiltin.c:226: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 dupNameAsc[64] = "\255"; data/fossil-2.13/src/mkbuiltin.c:227: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 dupNameDesc[64] = ""; data/fossil-2.13/src/mkbuiltin.c:259: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(&list->aRes[i+1], pDupRes, sizeof(list->aRes[0])); data/fossil-2.13/src/mkindex.c:131:1: [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 zHelp[MX_HELP]; data/fossil-2.13/src/mkindex.c:137:1: [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 zIf[2000]; data/fossil-2.13/src/mkindex.c:257:30: [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). aEntry[nUsed].iWidth = atoi(&zLine[i+6]); data/fossil-2.13/src/mkindex.c:287: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(&zIf[1], &zLine[i], len+1); data/fossil-2.13/src/mkindex.c:506:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *in = fopen(zFile, "r"); data/fossil-2.13/src/mkindex.c:507: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 zLine[2000]; data/fossil-2.13/src/mkversion.c:49:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(zFilename, "r"); data/fossil-2.13/src/mkversion.c:64: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 s[256]; data/fossil-2.13/src/mkversion.c:96:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b[1000]; data/fossil-2.13/src/mkversion.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 vx[1000]; data/fossil-2.13/src/mkversion.c:118:7: [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(b+n, "%d", (int)strtoll(str(FOSSIL_BUILD_EPOCH), 0, 10)); data/fossil-2.13/src/mkversion.c:122: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(b+n, "%d", (int)strtoll(zEpoch, 0, 10)); data/fossil-2.13/src/mkversion.c:124: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(b+n, "%d", (int)time(0)); data/fossil-2.13/src/mkversion.c:134: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 zDateNum[30]; data/fossil-2.13/src/name.c:57: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 zEDate[20]; data/fossil-2.13/src/name.c:88:7: [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). i = atoi(zEDate); data/fossil-2.13/src/name.c:90:7: [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). i = atoi(zEDate+5); data/fossil-2.13/src/name.c:92:7: [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). i = atoi(zEDate+8); data/fossil-2.13/src/name.c:95:9: [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). i = atoi(zEDate+11); data/fossil-2.13/src/name.c:97:9: [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). i = atoi(zEDate+14); data/fossil-2.13/src/name.c:99:18: [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). if( n==14 && atoi(zEDate+17)>60 ) return 0; data/fossil-2.13/src/name.c:123: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 zUp[24]; data/fossil-2.13/src/name.c:126: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(zUp, zDate, 19); data/fossil-2.13/src/name.c:127: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(zUp+19, ".999", 5); data/fossil-2.13/src/name.c:131: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(zUp, zDate, 16); data/fossil-2.13/src/name.c:132: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(zUp+16, ":59.999", 8); data/fossil-2.13/src/name.c:136: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(zUp, zDate, 10); data/fossil-2.13/src/name.c:137: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(zUp+10, " 23:59:59.999", 14); data/fossil-2.13/src/name.c:375: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 zUuid[HNAME_MAX+1]; data/fossil-2.13/src/name.c:376: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(zUuid, zXTag, nXTag); data/fossil-2.13/src/name.c:437:15: [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). rid = atoi(zTag); data/fossil-2.13/src/name.c:550:11: [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). n = atoi(g.argv[i]); data/fossil-2.13/src/name.c:948: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 zPrev[100]; data/fossil-2.13/src/name.c:951:19: [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). if( zMinsize && atoi(zMinsize)>0 ) minSize = atoi(zMinsize); data/fossil-2.13/src/name.c:951:48: [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). if( zMinsize && atoi(zMinsize)>0 ) minSize = atoi(zMinsize); data/fossil-2.13/src/name.c:1274:19: [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). if( z ) iFrom = atoi(z); data/fossil-2.13/src/name.c:1276:18: [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). if( z ) iCnt = atoi(z); data/fossil-2.13/src/name.c:1294:11: [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). int s = atoi(PD("s","0")); data/fossil-2.13/src/name.c:1295:11: [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). int n = atoi(PD("n","5000")); data/fossil-2.13/src/name.c:1495:11: [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). int n = atoi(PD("n","250")); data/fossil-2.13/src/name.c:1596: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 zPrev[HNAME_MAX+1]; data/fossil-2.13/src/name.c:1599: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 *azHit[MAX_COLLIDE]; data/fossil-2.13/src/name.c:1600: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 z[HNAME_MAX+1]; data/fossil-2.13/src/name.c:1616:33: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( aCollide[i].z[0]==0 ) memcpy(aCollide[i].z, zPrev, n+1); data/fossil-2.13/src/name.c:1618: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(zPrev, zUuid, n+1); data/fossil-2.13/src/piechart.c:36: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 zColor[8]; data/fossil-2.13/src/piechart.c:286:11: [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). width = atoi(PD("width","800")); data/fossil-2.13/src/piechart.c:287:12: [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). height = atoi(PD("height","400")); data/fossil-2.13/src/pikchr.c:1778: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 yycoverage[YYNSTATE][YYNTOKEN]; data/fossil-2.13/src/pikchr.c:4478:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->zOut+p->nOut, zText, n); data/fossil-2.13/src/pikchr.c:4540: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[100]; data/fossil-2.13/src/pikchr.c:4550: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[100]; data/fossil-2.13/src/pikchr.c:4562: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[200]; data/fossil-2.13/src/pikchr.c:4569: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[200]; data/fossil-2.13/src/pikchr.c:4576: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[200]; data/fossil-2.13/src/pikchr.c:4585: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[200]; data/fossil-2.13/src/pikchr.c:4591: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[200]; data/fossil-2.13/src/pikchr.c:4606: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[200]; data/fossil-2.13/src/pikchr.c:4940: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 zLineno[20]; /* Buffer in which to generate line numbers */ data/fossil-2.13/src/pikchr.c:5019: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 zE1[100], zE2[100], zMsg[300]; data/fossil-2.13/src/pikchr.c:5036: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 zE1[100], zE2[100], zMsg[210]; data/fossil-2.13/src/pikchr.c:6082: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(z, pId->z, pId->n); data/fossil-2.13/src/pikchr.c:6207:11: [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). int i = atoi(pNth->z); data/fossil-2.13/src/pikchr.c:6428:7: [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). n = atoi(pNth->z); data/fossil-2.13/src/pikchr.c:6494: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(pObj->zName,pName->z,pName->n); data/fossil-2.13/src/pikchr.c:7570:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zIn, aData, nByte); data/fossil-2.13/src/pikchr.c:7677: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[i], "rb"); data/fossil-2.13/src/printf.c:297: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[etBUFSIZE]; /* Conversion buffer */ data/fossil-2.13/src/printf.c:1134: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 z[1000]; data/fossil-2.13/src/purge.c:614:18: [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). int peid = atoi(g.argv[i]); data/fossil-2.13/src/purge.c:630:12: [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). peid = atoi(g.argv[3]); data/fossil-2.13/src/rebuild.c:649:19: [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). newPagesize = atoi(zPagesize); data/fossil-2.13/src/rebuild.c:1128:21: [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). iPrefixLength = atoi(zPrefixOpt); data/fossil-2.13/src/regexp.c:81: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 zInit[12]; /* Initial text to match */ data/fossil-2.13/src/regexp.c:328:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&p->aOp[p->nState], &p->aOp[iStart], N*sizeof(p->aOp[0])); data/fossil-2.13/src/regexp.c:329:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&p->aArg[p->nState], &p->aArg[iStart], N*sizeof(p->aArg[0])); data/fossil-2.13/src/regexp.c:709: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 zLine[2000]; data/fossil-2.13/src/report.c:127:26: [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). return mprintf("%d", atoi(zOrig)); data/fossil-2.13/src/report.c:318:8: [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). rn = atoi(PD("rn","0")); data/fossil-2.13/src/report.c:378:8: [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). rn = atoi(PD("rn","0")); data/fossil-2.13/src/report.c:984:6: [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). atoi(PD("rn","0"))); data/fossil-2.13/src/report.c:1012:18: [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). int nField = atoi(P("order_by")); data/fossil-2.13/src/report.c:1184:10: [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). rn = atoi(zRep); data/fossil-2.13/src/rss.c:55: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). int nLimit = atoi(PD("n","20")); data/fossil-2.13/src/rss.c:261: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). int nLimit = atoi( (zLimit && *zLimit) ? zLimit : "20" ); data/fossil-2.13/src/search.c:430: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. const char *azDoc[5]; data/fossil-2.13/src/search.c:605:25: [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). int nLimit = zLimit ? atoi(zLimit) : -1000; /* Max number of matching data/fossil-2.13/src/search.c:609:13: [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). width = atoi(zWidth); data/fossil-2.13/src/search.c:1005: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(&z[i], zSnip, n); data/fossil-2.13/src/search.c:1010: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(&z[i], "<", 4); data/fossil-2.13/src/search.c:1045:14: [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). nLimit = atoi(P("searchlimit")); data/fossil-2.13/src/search.c:1484:30: [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). search_stext(g.argv[2][0], atoi(g.argv[3]), g.argv[4], &out); data/fossil-2.13/src/search.c:1607: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 zType[2]; data/fossil-2.13/src/search.c:1991:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if( zId!=0 && (id = atoi(zId))>0 ){ data/fossil-2.13/src/security_audit.c:61:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zCopy,zAll,nAll); data/fossil-2.13/src/security_audit.c:649: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 z[10000]; data/fossil-2.13/src/security_audit.c:677: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). fclose(fopen(g.zErrlog,"w")); data/fossil-2.13/src/security_audit.c:701:41: [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). @ <p class='generalError'>Unable to open that file for reading!</p> data/fossil-2.13/src/setup.c:199:43: [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). int iQ = fossil_strcmp(zQ,"on")==0 || atoi(zQ); data/fossil-2.13/src/setup.c:720: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 zTmDiff[20]; data/fossil-2.13/src/setup.c:1671:11: [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). limit = atoi(PD("n","200")); data/fossil-2.13/src/setup.c:1672:10: [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). ofst = atoi(PD("x","0")); data/fossil-2.13/src/setup.c:1860: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 zCnt[10]; data/fossil-2.13/src/setupuser.c:289: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. const char *inherit[128]; data/fossil-2.13/src/setupuser.c:291: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. const char *oa[128]; data/fossil-2.13/src/setupuser.c:302:9: [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). uid = atoi(zId); data/fossil-2.13/src/setupuser.c:363: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 zCap[70], zNm[4]; data/fossil-2.13/src/setupuser.c:423:9: [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). if( atoi(PD("all","0"))>0 ){ data/fossil-2.13/src/sha1.c:41: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 buffer[64]; data/fossil-2.13/src/sha1.c:97: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 buffer[64]; data/fossil-2.13/src/sha1.c:143:58: [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 SHA1Transform(unsigned int state[5], const unsigned char buffer[64]) data/fossil-2.13/src/sha1.c:148:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(block, buffer, 64); data/fossil-2.13/src/sha1.c:149:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(qq,state,5*sizeof(unsigned int)); data/fossil-2.13/src/sha1.c:227:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(&context->buffer[j], data, (i = 64-j)); data/fossil-2.13/src/sha1.c:235:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(&context->buffer[j], &data[i], len - i); data/fossil-2.13/src/sha1.c:244: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 finalcount[8]; data/fossil-2.13/src/sha1.c:318: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 zResult[20]; data/fossil-2.13/src/sha1.c:319: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 zOut[41]; data/fossil-2.13/src/sha1.c:341: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 zResult[20]; data/fossil-2.13/src/sha1.c:342: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 zBuf[10240]; data/fossil-2.13/src/sha1.c:383: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 zResult[20]; data/fossil-2.13/src/sha1.c:404: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 zResult[20]; data/fossil-2.13/src/sha1.c:405: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 zDigest[41]; data/fossil-2.13/src/sha1.c:438: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 zResult[20]; data/fossil-2.13/src/sha1.c:439: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 zDigest[41]; data/fossil-2.13/src/sha1hard.c:80:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[64]; data/fossil-2.13/src/sha1hard.c:504:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(W, m, 16 * 4); data/fossil-2.13/src/sha1hard.c:1396:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctx->m1, block, 64); data/fossil-2.13/src/sha1hard.c:1450:33: [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 union { unsigned char bytes[4]; uint32_t value; } endianness = { { 0, 1, 2, 3 } }; data/fossil-2.13/src/sha1hard.c:1517: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(ctx->buffer + left, buf, fill); data/fossil-2.13/src/sha1hard.c:1530: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(ctx->buffer, buf, 64); data/fossil-2.13/src/sha1hard.c:1542: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(ctx->buffer + left, buf, len); data/fossil-2.13/src/sha1hard.c:1546:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char sha1_padding[64] = data/fossil-2.13/src/sha1hard.c:1554: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. int SHA1DCFinal(unsigned char output[20], SHA1_CTX *ctx) data/fossil-2.13/src/sha3.c:53: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 x[1600]; /* ... or 1600 bytes */ data/fossil-2.13/src/sha3.c:533: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 zOut[132]; data/fossil-2.13/src/sha3.c:553: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 zBuf[10240]; data/fossil-2.13/src/sha3.c:612: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 zDigest[132]; data/fossil-2.13/src/sha3.c:660:15: [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). int n = atoi(zN); data/fossil-2.13/src/shell.c:454:8: [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 mainPrompt[20]; /* First line prompt. default: "sqlite> "*/ data/fossil-2.13/src/shell.c:455:8: [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 continuePrompt[20]; /* Continuation prompt. default: " ...> " */ data/fossil-2.13/src/shell.c:703: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(zLine, zTrans, nTrans); data/fossil-2.13/src/shell.c:862: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(p->z+p->n, zAppend, nAppend); data/fossil-2.13/src/shell.c:1151: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 d_name[NAME_MAX + 1]; /* Name within the directory. */ data/fossil-2.13/src/shell.c:1223: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 value[32768]; /* Maximum length, per MSDN */ data/fossil-2.13/src/shell.c:1462: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 x[1600]; /* ... or 1600 bytes */ data/fossil-2.13/src/shell.c:1930: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 zBuf[50]; data/fossil-2.13/src/shell.c:2033:22: [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 x[9]; data/fossil-2.13/src/shell.c:2035: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(&u, &v, 8); data/fossil-2.13/src/shell.c:2047:22: [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 x[9]; data/fossil-2.13/src/shell.c:2049: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(&u, &r, 8); data/fossil-2.13/src/shell.c:2254:8: [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(zName, "rb"); data/fossil-2.13/src/shell.c:2490: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 *out = fopen(zFile, "wb"); data/fossil-2.13/src/shell.c:2628: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 z[16]; data/fossil-2.13/src/shell.c:2870: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 aStatic[64]; data/fossil-2.13/src/shell.c:3831: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 a[APND_MARK_SIZE]; data/fossil-2.13/src/shell.c:3832:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a, APND_MARK_PREFIX, APND_MARK_PREFIX_SZ); data/fossil-2.13/src/shell.c:4012: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 zHdr[16]; data/fossil-2.13/src/shell.c:4028: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 a[APND_MARK_SIZE]; data/fossil-2.13/src/shell.c:5144: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 zResult[100]; data/fossil-2.13/src/shell.c:5268: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 a[sizeof(r)]; data/fossil-2.13/src/shell.c:5270: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, &r, sizeof(r)); data/fossil-2.13/src/shell.c:6112: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(pNew->zFile, zFile, nFile); data/fossil-2.13/src/shell.c:6589: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(pNew->aExtra, &aRead[nFile], nExtra); data/fossil-2.13/src/shell.c:6612:11: [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(pNew->aData, &aBlob[pNew->iDataOff], pNew->cds.szCompressed); data/fossil-2.13/src/shell.c:7014: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). pCsr->pFile = fopen(zFile, "rb"); data/fossil-2.13/src/shell.c:7104:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a, pCds->zFile, (int)pCds->nFile); data/fossil-2.13/src/shell.c:7149: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. const char zTemplate[11] = "-rwxrwxrwx"; data/fossil-2.13/src/shell.c:7203: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). pTab->pWriteFd = fopen(pTab->zFile, "ab+"); data/fossil-2.13/src/shell.c:7513:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a, pCDS->zFile, pCDS->nFile); data/fossil-2.13/src/shell.c:7518: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(a, pEntry->aExtra, n); data/fossil-2.13/src/shell.c:7823: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(&p->body.a[p->body.n], aData, nData); data/fossil-2.13/src/shell.c:7871: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(aZip, p->body.a, p->body.n); data/fossil-2.13/src/shell.c:7872: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(&aZip[p->body.n], p->cds.a, p->cds.n); data/fossil-2.13/src/shell.c:8468: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(pEntry->zKey, zKey, nKey); data/fossil-2.13/src/shell.c:8471: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(pEntry->zVal, zVal, nVal); data/fossil-2.13/src/shell.c:8524: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(pNew->zColl, zColl, nColl+1); data/fossil-2.13/src/shell.c:8956: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(pCsr, zCol, nCopy); data/fossil-2.13/src/shell.c:8965: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(pCsr, zCol, nCopy); data/fossil-2.13/src/shell.c:8978: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(pNew->zName, zTab, nTab+1); data/fossil-2.13/src/shell.c:9008: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. if( nIn ) memcpy(zRet, zIn, nIn); data/fossil-2.13/src/shell.c:9009: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(&zRet[nIn], zAppend, nAppend+1); data/fossil-2.13/src/shell.c:9726: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(pSlot->z, sqlite3_value_blob(argv[1]), nByte); data/fossil-2.13/src/shell.c:9728: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(pSlot->z, sqlite3_value_text(argv[1]), nByte); data/fossil-2.13/src/shell.c:10084:11: [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(pNew->zSql, z, n+1); data/fossil-2.13/src/shell.c:10545: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(pPage, pCopy, nCopy); data/fossil-2.13/src/shell.c:10785: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(pCsr->pRec, &pCsr->aPage[iOff], nLocal); data/fossil-2.13/src/shell.c:10803: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(&pCsr->pRec[nPayload-nRem], &aOvfl[4], nCopy); data/fossil-2.13/src/shell.c:11082: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 zText[1]; /* Text to display for this row */ data/fossil-2.13/src/shell.c:11090: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 zPrefix[100]; /* Graph prefix */ data/fossil-2.13/src/shell.c:11134: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 zTestcase[30]; /* Name of current test case */ data/fossil-2.13/src/shell.c:11135: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 colSeparator[20]; /* Column separator character for several modes */ data/fossil-2.13/src/shell.c:11136: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 rowSeparator[20]; /* Row separator character for MODE_Ascii */ data/fossil-2.13/src/shell.c:11137: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 colSepPrior[20]; /* Saved column separator */ data/fossil-2.13/src/shell.c:11138: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 rowSepPrior[20]; /* Saved row separator */ data/fossil-2.13/src/shell.c:11142: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 nullValue[20]; /* The text to print when a NULL comes back from data/fossil-2.13/src/shell.c:11144: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 outfile[FILENAME_MAX]; /* Filename for *out */ data/fossil-2.13/src/shell.c:11356:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(zTempFile, bBin ? "wb" : "w"); data/fossil-2.13/src/shell.c:11387:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(zTempFile, "rb"); data/fossil-2.13/src/shell.c:11444:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->colSepPrior, p->colSeparator, sizeof(p->colSeparator)); data/fossil-2.13/src/shell.c:11445:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->rowSepPrior, p->rowSeparator, sizeof(p->rowSeparator)); data/fossil-2.13/src/shell.c:11542: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 zBuf1[20], zBuf2[20]; data/fossil-2.13/src/shell.c:11798: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. const char *az[4]; data/fossil-2.13/src/shell.c:11867:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pNew->zText, zText, nText+1); data/fossil-2.13/src/shell.c:11912: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(&p->sGraph.zPrefix[n], pNext ? "| " : " ", 4); data/fossil-2.13/src/shell.c:12233: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 z[50]; data/fossil-2.13/src/shell.c:12236:11: [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(&ur,&r,sizeof(r)); data/fossil-2.13/src/shell.c:12274: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 z[50]; data/fossil-2.13/src/shell.c:12277:11: [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(&ur,&r,sizeof(r)); data/fossil-2.13/src/shell.c:12321: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 z[50]; data/fossil-2.13/src/shell.c:12355:21: [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). eqp_append(p, atoi(azArg[0]), atoi(azArg[1]), azArg[3]); data/fossil-2.13/src/shell.c:12355:37: [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). eqp_append(p, atoi(azArg[0]), atoi(azArg[1]), azArg[3]); data/fossil-2.13/src/shell.c:12529: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(zErrMsg, sqlite3_errmsg(db), nErrMsg); data/fossil-2.13/src/shell.c:12540: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 z[200]; data/fossil-2.13/src/shell.c:12542:8: [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(z, "rb"); data/fossil-2.13/src/shell.c:12583: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 zLine[200]; data/fossil-2.13/src/shell.c:12613: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 z[100]; data/fossil-2.13/src/shell.c:12974: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 zNum[30]; data/fossil-2.13/src/shell.c:13702: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 zStmt[100]; data/fossil-2.13/src/shell.c:14205:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *in = fopen(zName, "rb"); data/fossil-2.13/src/shell.c:14283:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *f = fopen(zName, "rb"); data/fossil-2.13/src/shell.c:14286: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 zBuf[100]; data/fossil-2.13/src/shell.c:14333: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 zLine[1000]; data/fossil-2.13/src/shell.c:14335: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(p->zDbFilename, "r"); data/fossil-2.13/src/shell.c:14491: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 zBuf1[20]; data/fossil-2.13/src/shell.c:14492: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 zBuf2[20]; data/fossil-2.13/src/shell.c:14520: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(&zOut[iOut], "replace(replace(", 16); data/fossil-2.13/src/shell.c:14523: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(&zOut[iOut], "replace(", 8); data/fossil-2.13/src/shell.c:14528:11: [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(&zOut[iOut], zNL, nNL); data/fossil-2.13/src/shell.c:14531:11: [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(&zOut[iOut], zCR, nCR); data/fossil-2.13/src/shell.c:14540: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(&zOut[iOut], ",'", 2); iOut += 2; data/fossil-2.13/src/shell.c:14541: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(&zOut[iOut], zNL, nNL); iOut += nNL; data/fossil-2.13/src/shell.c:14542: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(&zOut[iOut], "', char(10))", 12); iOut += 12; data/fossil-2.13/src/shell.c:14545: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(&zOut[iOut], ",'", 2); iOut += 2; data/fossil-2.13/src/shell.c:14546: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(&zOut[iOut], zCR, nCR); iOut += nCR; data/fossil-2.13/src/shell.c:14547: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(&zOut[iOut], "', char(13))", 12); iOut += 12; data/fossil-2.13/src/shell.c:14743: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 zBuf[1000]; data/fossil-2.13/src/shell.c:14750:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zBuf, zLine, iStart); data/fossil-2.13/src/shell.c:14761: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(zBuf+iStart, zCompletion, nCompletion+1); data/fossil-2.13/src/shell.c:14884:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(zFile, bTextMode ? "w" : "wb"); data/fossil-2.13/src/shell.c:15161: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(zInsert+i, ",?", 2); data/fossil-2.13/src/shell.c:15164:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zInsert+i, ");", 3); data/fossil-2.13/src/shell.c:15442: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 aHdr[100]; data/fossil-2.13/src/shell.c:15457: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(aHdr, sqlite3_column_blob(pStmt,0), 100); data/fossil-2.13/src/shell.c:16516: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. const char *zInsertFmt[2] = { data/fossil-2.13/src/shell.c:16543: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 zTemp[50]; data/fossil-2.13/src/shell.c:17405: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 *azArg[52]; data/fossil-2.13/src/shell.c:18012:17: [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). x = atoi(azArg[2]); data/fossil-2.13/src/shell.c:18027: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 zBuf[100]; data/fossil-2.13/src/shell.c:18224: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). sCtx.in = fopen(sCtx.zFile, "rb"); data/fossil-2.13/src/shell.c:18233: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 zSep[2]; data/fossil-2.13/src/shell.c:18427: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 zLabel[20]; data/fossil-2.13/src/shell.c:18491: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). iotrace = fopen(azArg[1], "w"); data/fossil-2.13/src/shell.c:19050:51: [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). }else if( notNormalFile(azArg[1]) || (p->in = fopen(azArg[1], "rb"))==0 ){ data/fossil-2.13/src/shell.c:19165: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 *new_argv[2], *new_colv[2]; data/fossil-2.13/src/shell.c:19195: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 zScNum[30]; data/fossil-2.13/src/shell.c:19319:13: [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(azCmd[1], "wb"); data/fossil-2.13/src/shell.c:19481: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 zBuf[200]; data/fossil-2.13/src/shell.c:19635:19: [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). iSize = atoi(&z[5]); data/fossil-2.13/src/shell.c:20444: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 zPrefix[100]; data/fossil-2.13/src/shell.c:20518: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(zLine,";",2); data/fossil-2.13/src/shell.c:20531: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(zSql, zLine+i, nLine+1-i); data/fossil-2.13/src/shell.c:20536: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(zSql+nSql, zLine, nLine+1); data/fossil-2.13/src/shell.c:20624: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. if( z ) memcpy(z, home_dir, n); data/fossil-2.13/src/shell.c:20657: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). p->in = fopen(sqliterc,"rb"); data/fossil-2.13/src/shell.c:20762:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data->colSeparator,SEP_Column, 2); data/fossil-2.13/src/shell.c:20763:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data->rowSeparator,SEP_Row, 2); data/fossil-2.13/src/shell.c:20898: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(argv[i], z, n+1); data/fossil-2.13/src/shell.c:21138: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(data.colSeparator,",",2); data/fossil-2.13/src/shun.c:163:14: [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). nRcvid = atoi(zRcvid); data/fossil-2.13/src/shun.c:309:14: [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). int ofst = atoi(PD("ofst","0")); data/fossil-2.13/src/shun.c:418:15: [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). int rcvid = atoi(PD("rcvid","0")); data/fossil-2.13/src/smtp.c:68: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 aDns[5000]; /* Raw DNS reply content */ data/fossil-2.13/src/smtp.c:69: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 zHostname[5000]; /* Hostname for the MX */ data/fossil-2.13/src/smtp.c:232:18: [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). url.port = atoi(&p->zHostname[i+1]); data/fossil-2.13/src/smtp.c:366:15: [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). *piCode = atoi(z); data/fossil-2.13/src/smtp.c:442:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if( zPort ) iPort = atoi(zPort); data/fossil-2.13/src/smtp.c:622:26: [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). if( zPort ) smtpPort = atoi(zPort); data/fossil-2.13/src/smtp.c:1348: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 z[5000]; data/fossil-2.13/src/smtp.c:1453: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 zLine[500]; data/fossil-2.13/src/smtp.c:1498: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 zIn[1000]; data/fossil-2.13/src/smtp.c:1499: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 zUser[100]; data/fossil-2.13/src/smtp.c:1588:56: [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). " WHERE id=%d AND NOT isDel", atoi(zA1)); data/fossil-2.13/src/smtp.c:1613:24: [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). iLimit = zA2 ? atoi(zA2) : 2147483647; data/fossil-2.13/src/smtp.c:1619:24: [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). atoi(zA1)); data/fossil-2.13/src/smtp.c:1644:61: [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). db_multi_exec("UPDATE pop3 SET isDel=1 WHERE id=%d",atoi(zA1)); data/fossil-2.13/src/smtp.c:1654:56: [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). " WHERE id=%d AND NOT isDel", atoi(zA1)); data/fossil-2.13/src/sqlcmd.c:284: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(zKey, zSavedKey, nByte); data/fossil-2.13/src/sqlite3.c:10623: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 hidden[48]; data/fossil-2.13/src/sqlite3.c:14198:10: [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 memcpy(D,S,N) {char*xxd=(char*)(D);const char*xxs=(const char*)(S);\ data/fossil-2.13/src/sqlite3.c:18728:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef unsigned char yDbMask[(SQLITE_MAX_ATTACHED+9)/8]; data/fossil-2.13/src/sqlite3.c:20533:31: [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. SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = { data/fossil-2.13/src/sqlite3.c:21153: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 z[8]; /* Dequoted value for the string */ data/fossil-2.13/src/sqlite3.c:22729: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 zBuf[100]; data/fossil-2.13/src/sqlite3.c:22749: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 zBuf[100]; data/fossil-2.13/src/sqlite3.c:22768: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 zBuf[100]; data/fossil-2.13/src/sqlite3.c:22805: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 zBuf[100]; data/fossil-2.13/src/sqlite3.c:22992: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 zBuf[20]; data/fossil-2.13/src/sqlite3.c:23305: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(zBufOut, &sqlite3Config.iPrngSeed, nByte); data/fossil-2.13/src/sqlite3.c:24026: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 zTitle[100]; /* The title text */ data/fossil-2.13/src/sqlite3.c:24196: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(pBt, &aAddr[1], pHdr->nBacktrace*sizeof(void*)); data/fossil-2.13/src/sqlite3.c:24205: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(z, mem.zTitle, mem.nTitle); data/fossil-2.13/src/sqlite3.c:24272: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(pNew, pPrior, (int)(nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize)); data/fossil-2.13/src/sqlite3.c:24378:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mem.zTitle, zTitle, n); data/fossil-2.13/src/sqlite3.c:24402:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). out = fopen(zFilename, "w"); data/fossil-2.13/src/sqlite3.c:24991: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(p, pPrior, nOld); data/fossil-2.13/src/sqlite3.c:24993: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(p, pPrior, nBytes); data/fossil-2.13/src/sqlite3.c:25049: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(zFilename, "w"); data/fossil-2.13/src/sqlite3.c:25548: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(p, pPrior, nOld); data/fossil-2.13/src/sqlite3.c:25669: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(zFilename, "w"); data/fossil-2.13/src/sqlite3.c:28060: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(pNew, p, lookasideMallocSize(db, p)); data/fossil-2.13/src/sqlite3.c:28107: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(zNew, z, n); data/fossil-2.13/src/sqlite3.c:28118: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(zNew, z, (size_t)n); data/fossil-2.13/src/sqlite3.c:28458: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[etBUFSIZE]; /* Conversion buffer */ data/fossil-2.13/src/sqlite3.c:28784: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+(prefix!=0),"Inf",4); data/fossil-2.13/src/sqlite3.c:29159:42: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( !isMalloced(p) && p->nChar>0 ) memcpy(zNew, p->zText, p->nChar); data/fossil-2.13/src/sqlite3.c:29194: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(&p->zText[p->nChar], z, N); data/fossil-2.13/src/sqlite3.c:29213: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(&p->zText[p->nChar-N], z, N); data/fossil-2.13/src/sqlite3.c:29235: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(zText, p->zText, p->nChar+1); data/fossil-2.13/src/sqlite3.c:29348: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 zBase[SQLITE_PRINT_BUF_SIZE]; data/fossil-2.13/src/sqlite3.c:29381: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 zBase[SQLITE_PRINT_BUF_SIZE]; data/fossil-2.13/src/sqlite3.c:29468: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 zMsg[SQLITE_PRINT_BUF_SIZE*3]; /* Complete log message */ data/fossil-2.13/src/sqlite3.c:29497: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 zBuf[SQLITE_PRINT_BUF_SIZE*10]; data/fossil-2.13/src/sqlite3.c:29585: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 zBuf[500]; data/fossil-2.13/src/sqlite3.c:29629: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 zLine[1000]; data/fossil-2.13/src/sqlite3.c:29660: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 zLine[100]; data/fossil-2.13/src/sqlite3.c:29878: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 zBuf[30]; data/fossil-2.13/src/sqlite3.c:29890: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 zBuf[30]; data/fossil-2.13/src/sqlite3.c:29929: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 zFlgs[200]; data/fossil-2.13/src/sqlite3.c:29963: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 zOp2[16]; data/fossil-2.13/src/sqlite3.c:30119: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 zBuf[8]; data/fossil-2.13/src/sqlite3.c:30335: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 s[256]; /* State variables */ data/fossil-2.13/src/sqlite3.c:30388: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 k[256]; data/fossil-2.13/src/sqlite3.c:30429:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( data/fossil-2.13/src/sqlite3.c:30436:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( data/fossil-2.13/src/sqlite3.c:30921: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 zBuf[1000]; data/fossil-2.13/src/sqlite3.c:31079: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 zBuf[1000]; data/fossil-2.13/src/sqlite3.c:31236: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 zBuf[20]; data/fossil-2.13/src/sqlite3.c:31866: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 zTemp[22]; data/fossil-2.13/src/sqlite3.c:31879:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zOut, &zTemp[i+1], sizeof(zTemp)-1-i); data/fossil-2.13/src/sqlite3.c:32043: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(pOut, &u, 8); data/fossil-2.13/src/sqlite3.c:32084: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(pValue, &u, 4); data/fossil-2.13/src/sqlite3.c:32524:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&x,p,4); data/fossil-2.13/src/sqlite3.c:32528:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&x,p,4); data/fossil-2.13/src/sqlite3.c:32532:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&x,p,4); data/fossil-2.13/src/sqlite3.c:32541:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p,&v,4); data/fossil-2.13/src/sqlite3.c:32544:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p,&x,4); data/fossil-2.13/src/sqlite3.c:32547:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p,&x,4); data/fossil-2.13/src/sqlite3.c:32821:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&a, &x, 8); data/fossil-2.13/src/sqlite3.c:32918:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(z, zName, nName); data/fossil-2.13/src/sqlite3.c:33697: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 aPadding[32]; data/fossil-2.13/src/sqlite3.c:33995: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). return open(zFile, flags, mode); data/fossil-2.13/src/sqlite3.c:34600:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pNew->zCanonicalName, zAbsoluteName, n+1); data/fossil-2.13/src/sqlite3.c:34802: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 aSemName[MAX_PATHNAME+2]; /* Name of that semaphore */ data/fossil-2.13/src/sqlite3.c:34860: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 aErr[80]; data/fossil-2.13/src/sqlite3.c:35053: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(&pInode->fileId, &fileId, sizeof(fileId)); data/fossil-2.13/src/sqlite3.c:36986: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(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt); data/fossil-2.13/src/sqlite3.c:36990: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(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy); data/fossil-2.13/src/sqlite3.c:37105: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 oldCntr[4]; data/fossil-2.13/src/sqlite3.c:37121: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(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt); data/fossil-2.13/src/sqlite3.c:37125: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(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy); data/fossil-2.13/src/sqlite3.c:37308: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 zDirname[MAX_PATHNAME+1]; data/fossil-2.13/src/sqlite3.c:39551: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 zDb[MAX_PATHNAME+1]; /* Database file path */ data/fossil-2.13/src/sqlite3.c:39575: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(zDb, zPath, nDb); data/fossil-2.13/src/sqlite3.c:39656: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 zTmpname[MAX_PATHNAME+2]; data/fossil-2.13/src/sqlite3.c:39851:18: [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). useProxy = atoi(envforce)>0; data/fossil-2.13/src/sqlite3.c:40058:15: [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(zDel, zIn, n); data/fossil-2.13/src/sqlite3.c:40174: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(zBuf, &t, sizeof(t)); data/fossil-2.13/src/sqlite3.c:40175: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(&zBuf[sizeof(t)], &randomnessPid, sizeof(randomnessPid)); data/fossil-2.13/src/sqlite3.c:40519: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[MAXPATHLEN]; data/fossil-2.13/src/sqlite3.c:40697: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 tPath[MAXPATHLEN]; data/fossil-2.13/src/sqlite3.c:40698: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[PROXY_MAXCONCHLEN]; data/fossil-2.13/src/sqlite3.c:40702: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 errmsg[64] = ""; data/fossil-2.13/src/sqlite3.c:40791: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 tBuf[PROXY_MAXCONCHLEN]; data/fossil-2.13/src/sqlite3.c:40841: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 readBuf[PROXY_MAXCONCHLEN]; data/fossil-2.13/src/sqlite3.c:40842: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 lockPath[MAXPATHLEN]; data/fossil-2.13/src/sqlite3.c:40898: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(lockPath, &readBuf[PROXY_PATHINDEX], pathLen); data/fossil-2.13/src/sqlite3.c:40944: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 writeBuffer[PROXY_MAXCONCHLEN]; data/fossil-2.13/src/sqlite3.c:40948: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(&writeBuffer[PROXY_HEADERLEN], myHostID, PROXY_HOSTIDLEN); data/fossil-2.13/src/sqlite3.c:41095:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(conchPath, dbPath, len+1); data/fossil-2.13/src/sqlite3.c:41111:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&conchPath[i+1], "-conch", 7); data/fossil-2.13/src/sqlite3.c:41171: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(dbPath, (char *)pFile->lockingContext, len + 1); data/fossil-2.13/src/sqlite3.c:41190: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 dbPath[MAXPATHLEN+1]; /* Name of the database file */ data/fossil-2.13/src/sqlite3.c:42717:41: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). { "MultiByteToWideChar", (SYSCALL)MultiByteToWideChar, 0 }, data/fossil-2.13/src/sqlite3.c:43135: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 zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE]; data/fossil-2.13/src/sqlite3.c:43148: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(zDbgBuf, zBuf, nMin); data/fossil-2.13/src/sqlite3.c:43164: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(zDbgBuf, zBuf, nMin); data/fossil-2.13/src/sqlite3.c:43883: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 zMsg[500]; /* Human readable error text */ data/fossil-2.13/src/sqlite3.c:44537: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(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt); data/fossil-2.13/src/sqlite3.c:44543: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(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy); data/fossil-2.13/src/sqlite3.c:44615: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(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt); data/fossil-2.13/src/sqlite3.c:44621: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(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy); data/fossil-2.13/src/sqlite3.c:48107:23: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( iOfst<p->sz ) memcpy(zBuf, p->aData+iOfst, p->sz - iOfst); data/fossil-2.13/src/sqlite3.c:48110:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zBuf, p->aData+iOfst, iAmt); data/fossil-2.13/src/sqlite3.c:48155:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->aData+iOfst, z, iAmt); data/fossil-2.13/src/sqlite3.c:48459:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( pOut ) memcpy(pOut, p->aData, p->sz); data/fossil-2.13/src/sqlite3.c:48489: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(pTo, sqlite3PagerGetData(pPage), szPage); data/fossil-2.13/src/sqlite3.c:48806: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(aiValues, p->u.aHash, sizeof(p->u.aHash)); data/fossil-2.13/src/sqlite3.c:48846: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(aiValues, p->u.aHash, sizeof(p->u.aHash)); data/fossil-2.13/src/sqlite3.c:52500: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 dbFileVers[16]; /* Changes whenever database file changes */ data/fossil-2.13/src/sqlite3.c:52824: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 zRet[1024]; data/fossil-2.13/src/sqlite3.c:52928: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 ac[4]; data/fossil-2.13/src/sqlite3.c:52947: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 ac[4]; data/fossil-2.13/src/sqlite3.c:53133: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 aMagic[8]; /* A buffer to hold the magic header */ data/fossil-2.13/src/sqlite3.c:53227:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char zeroHdr[28] = {0}; data/fossil-2.13/src/sqlite3.c:53315: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(zHeader, aJournalMagic, sizeof(aJournalMagic)); data/fossil-2.13/src/sqlite3.c:53392: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 aMagic[8]; /* A buffer to hold the magic header */ data/fossil-2.13/src/sqlite3.c:54251: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(pData, (u8*)aData, pPager->pageSize); data/fossil-2.13/src/sqlite3.c:56068: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(zHeader, aJournalMagic, sizeof(aJournalMagic)); data/fossil-2.13/src/sqlite3.c:56637:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pPtr, &pPager, sizeof(pPager)); pPtr += sizeof(pPager); data/fossil-2.13/src/sqlite3.c:56643: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(pPtr, zPathname, nPathname); pPtr += nPathname + 1; data/fossil-2.13/src/sqlite3.c:56645: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(pPtr, zUri, nUriByte); pPtr += nUriByte; data/fossil-2.13/src/sqlite3.c:56655: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(pPtr, zPathname, nPathname); pPtr += nPathname; data/fossil-2.13/src/sqlite3.c:56656: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(pPtr, "-journal",8); pPtr += 8 + 1; data/fossil-2.13/src/sqlite3.c:56669: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(pPtr, zPathname, nPathname); pPtr += nPathname; data/fossil-2.13/src/sqlite3.c:56670: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(pPtr, "-wal", 4); pPtr += 4 + 1; data/fossil-2.13/src/sqlite3.c:57157: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 dbFileVers[sizeof(pPager->dbFileVers)]; data/fossil-2.13/src/sqlite3.c:58107:54: [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 void *pCopy = (const void *)&((const char *)zBuf)[24]; data/fossil-2.13/src/sqlite3.c:58808:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char zFake[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; data/fossil-2.13/src/sqlite3.c:60258:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void*)&aHdr[1], (const void*)&pWal->hdr, sizeof(WalIndexHdr)); data/fossil-2.13/src/sqlite3.c:60260:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void*)&aHdr[0], (const void*)&pWal->hdr, sizeof(WalIndexHdr)); data/fossil-2.13/src/sqlite3.c:60289: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(&aFrame[8], pWal->hdr.aSalt, 8); data/fossil-2.13/src/sqlite3.c:60370: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 zName[15]; data/fossil-2.13/src/sqlite3.c:60743: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(&pWal->hdr.aSalt, &aBuf[16], 8); data/fossil-2.13/src/sqlite3.c:60821: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(&aShare[nHdr32], &aPrivate[nHdr32], WALINDEX_PGSZ-nHdr); data/fossil-2.13/src/sqlite3.c:61104:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(aLeft, aTmp, sizeof(aTmp[0])*iOut); data/fossil-2.13/src/sqlite3.c:61420:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pWal->hdr.aSalt[1], &salt1, 4); data/fossil-2.13/src/sqlite3.c:61786: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(&pWal->hdr, &h1, sizeof(WalIndexHdr)); data/fossil-2.13/src/sqlite3.c:61996:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pWal->hdr, (void*)walIndexHdr(pWal), sizeof(WalIndexHdr)); data/fossil-2.13/src/sqlite3.c:62507: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(&pWal->hdr, pSnapshot, sizeof(WalIndexHdr)); data/fossil-2.13/src/sqlite3.c:62781: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(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr)); data/fossil-2.13/src/sqlite3.c:63085: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(&aWalHdr[16], pWal->hdr.aSalt, 8); data/fossil-2.13/src/sqlite3.c:63488: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(pRet, &pWal->hdr, sizeof(WalIndexHdr)); data/fossil-2.13/src/sqlite3.c:66144: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(&temp[x], &data[x], (cbrk+size) - x); data/fossil-2.13/src/sqlite3.c:66147:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&data[cbrk], &src[pc], size); data/fossil-2.13/src/sqlite3.c:66204: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(&aData[iAddr], &aData[pc], 2); data/fossil-2.13/src/sqlite3.c:66980: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 zDbHeader[100]; /* Database header content */ data/fossil-2.13/src/sqlite3.c:67042: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(zFullPathname, zFilename, nFilename); data/fossil-2.13/src/sqlite3.c:67934:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, zMagicHeader, sizeof(zMagicHeader)); data/fossil-2.13/src/sqlite3.c:69380: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(pPayload, pBuf, nByte); data/fossil-2.13/src/sqlite3.c:69383: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(pBuf, pPayload, nByte); data/fossil-2.13/src/sqlite3.c:69565:11: [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(aSave, aWrite, 4); data/fossil-2.13/src/sqlite3.c:69569:11: [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(aWrite, aSave, 4); data/fossil-2.13/src/sqlite3.c:70654: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(&pPage1->aData[32], &pTrunk->aData[0], 4); data/fossil-2.13/src/sqlite3.c:70678: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(&pPage1->aData[32], &pTrunk->aData[0], 4); data/fossil-2.13/src/sqlite3.c:70684: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(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4); data/fossil-2.13/src/sqlite3.c:70707:11: [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(&pNewTrunk->aData[0], &pTrunk->aData[0], 4); data/fossil-2.13/src/sqlite3.c:70709:11: [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(&pNewTrunk->aData[8], &pTrunk->aData[12], (k-1)*4); data/fossil-2.13/src/sqlite3.c:70774: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(&aData[8+closest*4], &aData[4+k*4], 4); data/fossil-2.13/src/sqlite3.c:71152: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(pPayload, pSrc, nSrc); data/fossil-2.13/src/sqlite3.c:71210: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(pPayload, pSrc, n); data/fossil-2.13/src/sqlite3.c:71213: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(pPayload, pSrc, n); data/fossil-2.13/src/sqlite3.c:71371: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(pTemp, pCell, sz); data/fossil-2.13/src/sqlite3.c:71415: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(&data[idx+4], pCell+4, sz-4); data/fossil-2.13/src/sqlite3.c:71418: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(&data[idx], pCell, sz); data/fossil-2.13/src/sqlite3.c:71600:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pTmp[j], &aData[j], usableSize - j); data/fossil-2.13/src/sqlite3.c:71623: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(pData, pCell, sz); data/fossil-2.13/src/sqlite3.c:71810:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pTmp, aData, pPg->pBt->usableSize); data/fossil-2.13/src/sqlite3.c:72091: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(&aTo[iData], &aFrom[iData], pBt->usableSize-iData); data/fossil-2.13/src/sqlite3.c:72092: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(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell); data/fossil-2.13/src/sqlite3.c:72290:11: [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(&aOvflSpace[iOff], apDiv[i], szNew[i]); data/fossil-2.13/src/sqlite3.c:72411: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(pTemp, apDiv[i], sz); data/fossil-2.13/src/sqlite3.c:72420: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(b.apCell[b.nCell], &pOld->aData[8], 4); data/fossil-2.13/src/sqlite3.c:72671: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(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4); data/fossil-2.13/src/sqlite3.c:72746: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(&pNew->aData[8], pCell, 4); data/fossil-2.13/src/sqlite3.c:72975:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pChild->aiOvfl, pRoot->aiOvfl, data/fossil-2.13/src/sqlite3.c:72977:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pChild->apOvfl, pRoot->apOvfl, data/fossil-2.13/src/sqlite3.c:73446: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(newCell, oldCell, 4); data/fossil-2.13/src/sqlite3.c:73470: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(oldCell, newCell, szNew); data/fossil-2.13/src/sqlite3.c:73526:11: [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(pCur->pKey, pX->pKey, pX->nKey); data/fossil-2.13/src/sqlite3.c:74790: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 zErr[100]; data/fossil-2.13/src/sqlite3.c:75483: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(zOut, zIn, nCopy); data/fossil-2.13/src/sqlite3.c:76095: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(&x, (char*)&p->u, (p->flags&MEM_Int)*2); data/fossil-2.13/src/sqlite3.c:76133: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 zBuf[100]; data/fossil-2.13/src/sqlite3.c:76248: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(pMem->zMalloc, pMem->z, pMem->n); data/fossil-2.13/src/sqlite3.c:76438:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pMem, &t, sizeof(t)); data/fossil-2.13/src/sqlite3.c:76988:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pTo, pFrom, MEMCELLSIZE); data/fossil-2.13/src/sqlite3.c:77005:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pTo, pFrom, MEMCELLSIZE); data/fossil-2.13/src/sqlite3.c:77029:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pTo, pFrom, sizeof(Mem)); data/fossil-2.13/src/sqlite3.c:77103: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(pMem->z, z, nAlloc); data/fossil-2.13/src/sqlite3.c:77981: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(pStr->z, z, n+1); data/fossil-2.13/src/sqlite3.c:78288:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( p4copy ) memcpy(p4copy, zP4, 8); data/fossil-2.13/src/sqlite3.c:79366: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 zAlt[50]; data/fossil-2.13/src/sqlite3.c:80114: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 z[1000]; data/fossil-2.13/src/sqlite3.c:81232: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 *out = fopen("vdbe_profile.out", "a"); data/fossil-2.13/src/sqlite3.c:81250: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 zHdr[100]; data/fossil-2.13/src/sqlite3.c:81718: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. if( len>0 ) memcpy(buf, pMem->z, len); data/fossil-2.13/src/sqlite3.c:81775: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(&pMem->u.r, &x, sizeof(x)); data/fossil-2.13/src/sqlite3.c:83476:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pNew, pOrig, MEMCELLSIZE); data/fossil-2.13/src/sqlite3.c:85279: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 zBase[100]; /* Initial working space */ data/fossil-2.13/src/sqlite3.c:85952: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 zBuf[1000]; data/fossil-2.13/src/sqlite3.c:86802:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pOut, pVar, MEMCELLSIZE); data/fossil-2.13/src/sqlite3.c:87062: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(pOut->z, pIn2->z, pIn2->n); data/fossil-2.13/src/sqlite3.c:87066:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pOut->z[pIn2->n], pIn1->z, pIn1->n); data/fossil-2.13/src/sqlite3.c:88294: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(pDest->z, zData, len); data/fossil-2.13/src/sqlite3.c:88768: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(pNew->zName, zName, nName+1); data/fossil-2.13/src/sqlite3.c:94764: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(p->aAlloc, &p->aBuffer[iBuf], nAvail); data/fossil-2.13/src/sqlite3.c:94780: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(&p->aAlloc[nByte - nRem], aNext, nCopy); data/fossil-2.13/src/sqlite3.c:95189: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(pKeyInfo, pCsr->pKeyInfo, szKeyInfo); data/fossil-2.13/src/sqlite3.c:95695: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(&p->aBuffer[p->iBufEnd], &pData[nData-nRem], nCopy); data/fossil-2.13/src/sqlite3.c:96079:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(SRVAL(pNew), pVal->z, pVal->n); data/fossil-2.13/src/sqlite3.c:96922:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pOut->z, pKey, nKey); data/fossil-2.13/src/sqlite3.c:97040: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. const char *azSchema[2] = { data/fossil-2.13/src/sqlite3.c:97527: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(zOut, (u8*)pChunk->zChunk + iChunkOffset, nCopy); data/fossil-2.13/src/sqlite3.c:97625: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((u8*)p->pFirst->zChunk, zBuf, iAmt); data/fossil-2.13/src/sqlite3.c:97653: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((u8*)p->endpoint.pChunk->zChunk + iChunkOffset, zWrite, iSpace); data/fossil-2.13/src/sqlite3.c:98188: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(pExpr, pDup, sizeof(*pExpr)); data/fossil-2.13/src/sqlite3.c:100878:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( pToken->n ) memcpy(pNew->u.zToken, pToken->z, pToken->n); data/fossil-2.13/src/sqlite3.c:101359: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(zAlloc, p, nNewSize); data/fossil-2.13/src/sqlite3.c:101362: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(zAlloc, p, nSize); data/fossil-2.13/src/sqlite3.c:101380: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(zToken, p->u.zToken, nToken); data/fossil-2.13/src/sqlite3.c:106621:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pNew->aCol, pTab->aCol, sizeof(Column)*pNew->nCol); data/fossil-2.13/src/sqlite3.c:107255: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(zOut, zSql, nSql); data/fossil-2.13/src/sqlite3.c:107278: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(&zOut[iOff], zReplace, nReplace); data/fossil-2.13/src/sqlite3.c:108209: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(p->u.aRowid, pData, n); data/fossil-2.13/src/sqlite3.c:108236:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pTo->anEq, pFrom->anEq, sizeof(tRowcnt)*p->nCol); data/fossil-2.13/src/sqlite3.c:108237:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pTo->anLt, pFrom->anLt, sizeof(tRowcnt)*p->nCol); data/fossil-2.13/src/sqlite3.c:108238:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pTo->anDLt, pFrom->anDLt, sizeof(tRowcnt)*p->nCol); data/fossil-2.13/src/sqlite3.c:108927: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(pStat1->zName, "sqlite_stat1", 13); data/fossil-2.13/src/sqlite3.c:109712: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(pSample->p, sqlite3_column_blob(pStmt, 4), pSample->n); data/fossil-2.13/src/sqlite3.c:109923: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. zFile = (const char *)sqlite3_value_text(argv[0]); data/fossil-2.13/src/sqlite3.c:109924: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. zName = (const char *)sqlite3_value_text(argv[1]); data/fossil-2.13/src/sqlite3.c:109974: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(aNew, db->aDb, sizeof(db->aDb[0])*2); data/fossil-2.13/src/sqlite3.c:110102:30: [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 *zName = (const char *)sqlite3_value_text(argv[0]); data/fossil-2.13/src/sqlite3.c:110107: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 zErr[128]; data/fossil-2.13/src/sqlite3.c:110995: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 saveBuf[PARSE_TAIL_SZ]; data/fossil-2.13/src/sqlite3.c:111011:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(saveBuf, PARSE_TAIL(pParse), PARSE_TAIL_SZ); data/fossil-2.13/src/sqlite3.c:111016:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(PARSE_TAIL(pParse), saveBuf, PARSE_TAIL_SZ); data/fossil-2.13/src/sqlite3.c:111297: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(db->aDbStatic, db->aDb, 2*sizeof(db->aDb[0])); data/fossil-2.13/src/sqlite3.c:111998:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(z, pName->z, pName->n); data/fossil-2.13/src/sqlite3.c:112035: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(zType, pType->z, pType->n); data/fossil-2.13/src/sqlite3.c:112609: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(&zStmt[k], zType, len); data/fossil-2.13/src/sqlite3.c:112629:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zExtra, pIdx->azColl, sizeof(char*)*pIdx->nColumn); data/fossil-2.13/src/sqlite3.c:112632:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zExtra, pIdx->aiRowLogEst, sizeof(LogEst)*(pIdx->nKeyCol+1)); data/fossil-2.13/src/sqlite3.c:112635:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zExtra, pIdx->aiColumn, sizeof(i16)*pIdx->nColumn); data/fossil-2.13/src/sqlite3.c:112638:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zExtra, pIdx->aSortOrder, pIdx->nColumn); data/fossil-2.13/src/sqlite3.c:113671: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 zTab[24]; data/fossil-2.13/src/sqlite3.c:113960:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(z, pTo->z, pTo->n); data/fossil-2.13/src/sqlite3.c:113994: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(z, pToCol->a[i].zEName, n); data/fossil-2.13/src/sqlite3.c:114459:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pIndex->zName, zName, nName+1); data/fossil-2.13/src/sqlite3.c:114538: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(zExtra, zColl, nColl); data/fossil-2.13/src/sqlite3.c:114848:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&a[1], aVal, nCopy*sizeof(LogEst)); data/fossil-2.13/src/sqlite3.c:115325: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(&p1->a[1], p2->a, p2->nSrc*sizeof(struct SrcList_item)); data/fossil-2.13/src/sqlite3.c:115964: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(pColl, pColl2, sizeof(CollSeq)); data/fossil-2.13/src/sqlite3.c:116030: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(pColl[0].zName, zName, nName); data/fossil-2.13/src/sqlite3.c:116365: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((char*)&pBest[1], zName, nName+1); data/fossil-2.13/src/sqlite3.c:118136: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 zStop[3]; data/fossil-2.13/src/sqlite3.c:118446: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 zBuf[50]; data/fossil-2.13/src/sqlite3.c:118699: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(&zOut[j], zRep, nRep); data/fossil-2.13/src/sqlite3.c:118705:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&zOut[j], &zStr[i], nStr-i); data/fossil-2.13/src/sqlite3.c:118833: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 zResult[8]; data/fossil-2.13/src/sqlite3.c:118882:30: [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 *zFile = (const char *)sqlite3_value_text(argv[0]); data/fossil-2.13/src/sqlite3.c:118896:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. zProc = (const char *)sqlite3_value_text(argv[1]); data/fossil-2.13/src/sqlite3.c:119290:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(aWc, pDef->pUserData, 3); data/fossil-2.13/src/sqlite3.c:120784: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((char *)pStep->zTarget, zFrom, nFrom); data/fossil-2.13/src/sqlite3.c:124064: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). int (*open)(const char*,sqlite3**); data/fossil-2.13/src/sqlite3.c:124390:53: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define sqlite3_open sqlite3_api->open data/fossil-2.13/src/sqlite3.c:125185: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(zAltEntry, "sqlite3_", 8); data/fossil-2.13/src/sqlite3.c:125194: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(zAltEntry+iEntry, "_init", 6); data/fossil-2.13/src/sqlite3.c:125230: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(aHandle, db->aExtension, sizeof(handle)*db->nExtension); data/fossil-2.13/src/sqlite3.c:126492: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 *aFcntl[4]; /* Argument to SQLITE_FCNTL_PRAGMA */ data/fossil-2.13/src/sqlite3.c:128401: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 *azArg[2]; /* Value of the argument and schema */ data/fossil-2.13/src/sqlite3.c:128420: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 zBuf[200]; data/fossil-2.13/src/sqlite3.c:128885: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 const *azArg[6]; data/fossil-2.13/src/sqlite3.c:131757: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(&pCol->zName[n+1], zType, m+1); data/fossil-2.13/src/sqlite3.c:136670: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(z, argv[i], n); data/fossil-2.13/src/sqlite3.c:137201: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(z, pName->z, pName->n); data/fossil-2.13/src/sqlite3.c:140039: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(zCopy, zName, nName+1); data/fossil-2.13/src/sqlite3.c:141136:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char*)&pNew[1], pDef->zName, sqlite3Strlen30(pDef->zName)+1); data/fossil-2.13/src/sqlite3.c:142068: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 zBuf[100]; /* Initial space for EQP output string */ data/fossil-2.13/src/sqlite3.c:142795: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 d2[4]; data/fossil-2.13/src/sqlite3.c:143068:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pNew->orig, pExpr, sizeof(*pExpr)); data/fossil-2.13/src/sqlite3.c:144017: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(pOrTab->a, pTabItem, sizeof(*pTabItem)); data/fossil-2.13/src/sqlite3.c:144494: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(pWC->a, pOld, sizeof(pWC->a[0])*pWC->nTerm); data/fossil-2.13/src/sqlite3.c:146177:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(aiCur, pWInfo->aiCurOnePass, sizeof(int)*2); data/fossil-2.13/src/sqlite3.c:146201:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pDest->a, pSrc->a, pDest->n*sizeof(pDest->a[0])); data/fossil-2.13/src/sqlite3.c:147784: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 zType[8]; data/fossil-2.13/src/sqlite3.c:147785: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 zLeft[50]; data/fossil-2.13/src/sqlite3.c:147786: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(zType, "....", 5); data/fossil-2.13/src/sqlite3.c:147931:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(paNew, p->aLTerm, sizeof(p->aLTerm[0])*p->nLSlot); data/fossil-2.13/src/sqlite3.c:147947:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pTo, pFrom, WHERE_LOOP_XFER_SZ); data/fossil-2.13/src/sqlite3.c:147948:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pTo->aLTerm, pFrom->aLTerm, pTo->nLTerm*sizeof(pTo->aLTerm[0])); data/fossil-2.13/src/sqlite3.c:150059: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 zName[65]; data/fossil-2.13/src/sqlite3.c:150377: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(pTo->aLoop, pFrom->aLoop, sizeof(WhereLoop*)*iLoop); data/fossil-2.13/src/sqlite3.c:151602: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(p->pExpr, &p->orig, sizeof(p->orig)); data/fossil-2.13/src/sqlite3.c:152679: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(pTab, pTab2, sizeof(Table)); data/fossil-2.13/src/sqlite3.c:154811: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(p->u.zToken, t.z, t.n); data/fossil-2.13/src/sqlite3.c:157085: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 yycoverage[YYNSTATE][YYNTOKEN]; data/fossil-2.13/src/sqlite3.c:160062: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. static const char zKWText[647] = { data/fossil-2.13/src/sqlite3.c:160101:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char aKWHash[127] = { data/fossil-2.13/src/sqlite3.c:160116:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char aKWNext[145] = { data/fossil-2.13/src/sqlite3.c:160131:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char aKWLen[145] = { data/fossil-2.13/src/sqlite3.c:160162:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char aKWCode[145] = { data/fossil-2.13/src/sqlite3.c:161976: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(&y, &x, 8); data/fossil-2.13/src/sqlite3.c:163189: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 zBuf[50]; data/fossil-2.13/src/sqlite3.c:164672: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(zFile, zUri, nUri); data/fossil-2.13/src/sqlite3.c:165263: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 zMsg[100]; data/fossil-2.13/src/sqlite3.c:165911:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, z, n+1); data/fossil-2.13/src/sqlite3.c:166544:11: [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(pNew, aArg, nArg*sizeof(void *)); data/fossil-2.13/src/sqlite3.c:168697: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(p, zCol, n); data/fossil-2.13/src/sqlite3.c:168994:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->aIndex, aIndex, sizeof(struct Fts3Index) * nIndex); data/fossil-2.13/src/sqlite3.c:169004:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zCsr, argv[2], nName); data/fossil-2.13/src/sqlite3.c:169007:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zCsr, argv[1], nDb); data/fossil-2.13/src/sqlite3.c:169014: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. z = (char *)sqlite3Fts3NextToken(aCol[iCol], &n); data/fossil-2.13/src/sqlite3.c:169016: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(zCsr, z, n); data/fossil-2.13/src/sqlite3.c:169022:24: [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. assert( zCsr <= &((char *)p)[nByte] ); data/fossil-2.13/src/sqlite3.c:169508: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(&zBuffer[nPrefix], zCsr, nSuffix); data/fossil-2.13/src/sqlite3.c:169666: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(p, *ppPoslist, n); data/fossil-2.13/src/sqlite3.c:169704: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(p, *ppPoslist, n); data/fossil-2.13/src/sqlite3.c:170041: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 *aaOutput[16]; /* Malloc'd output buffers */ data/fossil-2.13/src/sqlite3.c:170446: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(pTS->aaOutput[0], aDoclist, nDoclist); data/fossil-2.13/src/sqlite3.c:171369: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. zArg = (const char *)sqlite3_value_text(apVal[1]); data/fossil-2.13/src/sqlite3.c:172286: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(aDoclist, a[p->nToken-1].pList, nByte+1); data/fossil-2.13/src/sqlite3.c:173765:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)p->pFts3Tab->zDb, zDb, nDb); data/fossil-2.13/src/sqlite3.c:173766:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3); data/fossil-2.13/src/sqlite3.c:174424: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(pRet->pPhrase->aToken[0].z, zToken, nToken); data/fossil-2.13/src/sqlite3.c:174539: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(&zTemp[nTemp], zByte, nByte); data/fossil-2.13/src/sqlite3.c:174567: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(zBuf, zTemp, nTemp); data/fossil-2.13/src/sqlite3.c:175420: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. zExpr = (const char *)sqlite3_value_text(argv[1]); data/fossil-2.13/src/sqlite3.c:175429: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. azCol[ii] = (char *)sqlite3_value_text(argv[ii+2]); data/fossil-2.13/src/sqlite3.c:175868: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((void*)new_elem->pKey, pKey, nKey); data/fossil-2.13/src/sqlite3.c:176228: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 zReverse[28]; data/fossil-2.13/src/sqlite3.c:176828: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. const char *azArg[64]; data/fossil-2.13/src/sqlite3.c:176845: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. zName = (const char *)sqlite3_value_text(argv[0]); data/fossil-2.13/src/sqlite3.c:176847:19: [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. zInput = (const char *)sqlite3_value_text(argv[argc-1]); data/fossil-2.13/src/sqlite3.c:176863:25: [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. azArg[i-1] = (const char *)sqlite3_value_text(argv[i]); data/fossil-2.13/src/sqlite3.c:176946: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((void *)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp)); data/fossil-2.13/src/sqlite3.c:177110: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 delim[128]; /* flag ASCII delimiters */ data/fossil-2.13/src/sqlite3.c:177443: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(pSpace, argv[i], n+1); data/fossil-2.13/src/sqlite3.c:177658:32: [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 *zByte = (const char *)sqlite3_value_text(apVal[0]); data/fossil-2.13/src/sqlite3.c:177664: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. if( nByte>0 ) memcpy(pCsr->zInput, zByte, nByte); data/fossil-2.13/src/sqlite3.c:178699:34: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *zText = (const char *)sqlite3_value_text(apVal[i]); data/fossil-2.13/src/sqlite3.c:179111: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(aCopy, pList->aData, nCopy); data/fossil-2.13/src/sqlite3.c:179176:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pReader->zTerm[nPrefix], pNext, nSuffix); data/fossil-2.13/src/sqlite3.c:179414: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. if( nRoot ) memcpy(pReader->aNode, zRoot, nRoot); data/fossil-2.13/src/sqlite3.c:179538: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(pReader->ppNextElem, aElem, nElem*sizeof(Fts3HashElem *)); data/fossil-2.13/src/sqlite3.c:179836: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(&pTree->aData[nData], &zTerm[nPrefix], nSuffix); data/fossil-2.13/src/sqlite3.c:179850: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(pTree->zTerm, zTerm, nTerm); data/fossil-2.13/src/sqlite3.c:180107:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pWriter->aData[nData], &zTerm[nPrefix], nSuffix); data/fossil-2.13/src/sqlite3.c:180111:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pWriter->aData[nData], aDoclist, nDoclist); data/fossil-2.13/src/sqlite3.c:180131: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(pWriter->zTerm, zTerm, nTerm); data/fossil-2.13/src/sqlite3.c:180440:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pMsr->aBuffer, pList, nList); data/fossil-2.13/src/sqlite3.c:180791:15: [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(&pCsr->aBuffer[nDoclist], pList, nList); data/fossil-2.13/src/sqlite3.c:181556: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(&p->term.a[nPrefix], &p->aNode[p->iOff], nSuffix); data/fossil-2.13/src/sqlite3.c:181663: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(&pBlk->a[pBlk->n], &zTerm[nPrefix], nSuffix); data/fossil-2.13/src/sqlite3.c:181666: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(pNode->key.a, zTerm, nTerm); data/fossil-2.13/src/sqlite3.c:181740:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pPrev->a, zTerm, nTerm); data/fossil-2.13/src/sqlite3.c:181747:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pNode->a[pNode->n], &zTerm[nPrefix], nSuffix); data/fossil-2.13/src/sqlite3.c:181752: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(&pNode->a[pNode->n], aDoclist, nDoclist); data/fossil-2.13/src/sqlite3.c:182093: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(pNode->block.a, aRoot, nRoot); data/fossil-2.13/src/sqlite3.c:182107: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(pNode->key.a, reader.term.a, reader.term.n); data/fossil-2.13/src/sqlite3.c:182119: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(pNode->block.a, aBlock, nBlock); data/fossil-2.13/src/sqlite3.c:182590:11: [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(pHint->a, aHint, nHint); data/fossil-2.13/src/sqlite3.c:183186:11: [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). v = atoi(&zVal[9]); data/fossil-2.13/src/sqlite3.c:183190:11: [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). v = atoi(&zVal[11]); data/fossil-2.13/src/sqlite3.c:183194:27: [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). p->bNoIncrDoclist = atoi(&zVal[21]); data/fossil-2.13/src/sqlite3.c:183197:11: [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). v = atoi(&zVal[11]); data/fossil-2.13/src/sqlite3.c:183318:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pRet, &p->pList->aData[nSkip], *pnData); data/fossil-2.13/src/sqlite3.c:183711: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(pRet->zMatchinfo, zMatchinfo, nStr+1); data/fossil-2.13/src/sqlite3.c:183752:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( p->bGlobal ) memcpy(aOut, &p->aMatchinfo[1], p->nElem*sizeof(u32)); data/fossil-2.13/src/sqlite3.c:183762:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&p->aMatchinfo[2+p->nElem], &p->aMatchinfo[1], p->nElem*sizeof(u32)); data/fossil-2.13/src/sqlite3.c:184190:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&pStr->z[pStr->n], zAppend, nAppend); data/fossil-2.13/src/sqlite3.c:185256: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 aBuffer[64]; data/fossil-2.13/src/sqlite3.c:186219: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 zSpace[100]; /* Initial static space */ data/fossil-2.13/src/sqlite3.c:186345: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(zNew, p->zBuf, (size_t)p->nUsed); data/fossil-2.13/src/sqlite3.c:186365:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->zBuf+p->nUsed, zIn, N); data/fossil-2.13/src/sqlite3.c:187184:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char*)p->zJson, zJson, nJson+1); data/fossil-2.13/src/sqlite3.c:188519:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->zJson, z, (size_t)n+1); data/fossil-2.13/src/sqlite3.c:188541: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(p->zRoot, zRoot, (size_t)n+1); data/fossil-2.13/src/sqlite3.c:189235:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&x, p, 8); data/fossil-2.13/src/sqlite3.c:189239:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&x, p, 8); data/fossil-2.13/src/sqlite3.c:189243:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&x, p, 8); data/fossil-2.13/src/sqlite3.c:189275:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &i, 4); data/fossil-2.13/src/sqlite3.c:189278:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &i, 4); data/fossil-2.13/src/sqlite3.c:189281:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &i, 4); data/fossil-2.13/src/sqlite3.c:189294:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &i, 8); data/fossil-2.13/src/sqlite3.c:189297:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &i, 8); data/fossil-2.13/src/sqlite3.c:189299:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &i, 8); data/fossil-2.13/src/sqlite3.c:189901: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(&c.u,a,4); \ data/fossil-2.13/src/sqlite3.c:189909: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(&c.u,a,4); \ data/fossil-2.13/src/sqlite3.c:190533:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pBlob, pSrc, pSrc->iSize); data/fossil-2.13/src/sqlite3.c:190710: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 zIdxStr[RTREE_MAX_DIMENSIONS*8+1]; data/fossil-2.13/src/sqlite3.c:190876:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&cell, p, sizeof(RtreeCell)); data/fossil-2.13/src/sqlite3.c:191060: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(aSpare, aLeft, sizeof(int)*nLeft); data/fossil-2.13/src/sqlite3.c:191129: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(aSpare, aLeft, sizeof(int)*nLeft); data/fossil-2.13/src/sqlite3.c:191220: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(&left, &aCell[aaSorted[ii][0]], sizeof(RtreeCell)); data/fossil-2.13/src/sqlite3.c:191221: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(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell)); data/fossil-2.13/src/sqlite3.c:191250:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pBboxLeft, &aCell[aaSorted[iBestDim][0]], sizeof(RtreeCell)); data/fossil-2.13/src/sqlite3.c:191251:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pBboxRight, &aCell[aaSorted[iBestDim][iBestSplit]], sizeof(RtreeCell)); data/fossil-2.13/src/sqlite3.c:191318:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&aCell[nCell], pCell, sizeof(RtreeCell)); data/fossil-2.13/src/sqlite3.c:191613: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(&aCell[ii], pCell, sizeof(RtreeCell)); data/fossil-2.13/src/sqlite3.c:192230:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *azSql[N_STATEMENT] = { data/fossil-2.13/src/sqlite3.c:192484:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pRtree->zDb, argv[1], nDb); data/fossil-2.13/src/sqlite3.c:192485:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pRtree->zName, argv[2], nName); data/fossil-2.13/src/sqlite3.c:192758: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(pRet, pNode, nNode); data/fossil-2.13/src/sqlite3.c:192791: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. const char *azSql[2] = { data/fossil-2.13/src/sqlite3.c:193224: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 hdr[4]; /* Header for on-disk representation */ data/fossil-2.13/src/sqlite3.c:193382: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(pOut->a, s.a, s.nVertex*2*sizeof(GeoCoord)); data/fossil-2.13/src/sqlite3.c:193430: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(p->hdr, a, nByte); data/fossil-2.13/src/sqlite3.c:193841: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(pBBox->a, a, sizeof(RtreeCoord)*4); data/fossil-2.13/src/sqlite3.c:194171: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 aOverlap[4]; data/fossil-2.13/src/sqlite3.c:194358:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pRtree->zDb, argv[1], nDb); data/fossil-2.13/src/sqlite3.c:194359:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pRtree->zName, argv[2], nName); data/fossil-2.13/src/sqlite3.c:195160: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 zBuf[128]; data/fossil-2.13/src/sqlite3.c:195471:22: [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. zLocale = (const char *)sqlite3_value_text(apArg[1]); data/fossil-2.13/src/sqlite3.c:195573:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. zLocale = (const char *)sqlite3_value_text(apArg[0]); data/fossil-2.13/src/sqlite3.c:195574: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. zName = (const char *)sqlite3_value_text(apArg[1]); data/fossil-2.13/src/sqlite3.c:195726: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(p->zLocale, argv[0], n); data/fossil-2.13/src/sqlite3.c:196907: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 zStateDb[5]; /* Db name for state ("stat" or "main") */ data/fossil-2.13/src/sqlite3.c:197128: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(zOut, &zSrc[ofst], cnt); data/fossil-2.13/src/sqlite3.c:197143: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(zOut, zDelta, cnt); data/fossil-2.13/src/sqlite3.c:197640: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(zRet, zStr, nCopy); data/fossil-2.13/src/sqlite3.c:197794: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(pIter->abIndexed, pIter->abTblPk, sizeof(u8)*pIter->nTblCol); data/fossil-2.13/src/sqlite3.c:199146: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(pUp->zMask, zMask, pIter->nTblCol); data/fossil-2.13/src/sqlite3.c:199304: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(p->zStateDb, "stat", 4); data/fossil-2.13/src/sqlite3.c:199306: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(p->zStateDb, "main", 4); data/fossil-2.13/src/sqlite3.c:199672:11: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0); data/fossil-2.13/src/sqlite3.c:199681:11: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename, data/fossil-2.13/src/sqlite3.c:200353: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 zRnd[64]; data/fossil-2.13/src/sqlite3.c:200498: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(p->zTarget, zTarget, nTarget+1); data/fossil-2.13/src/sqlite3.c:200502: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(p->zRbu, zRbu, nRbu+1); data/fossil-2.13/src/sqlite3.c:201536: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(zCopy, zBase, nCopy); data/fossil-2.13/src/sqlite3.c:201791: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(&pNew->base, &vfs_template, sizeof(sqlite3_vfs)); data/fossil-2.13/src/sqlite3.c:201796: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(zSpace, zName, nName); data/fossil-2.13/src/sqlite3.c:203044: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(sqlite3PagerGetData(pDbPage), data/fossil-2.13/src/sqlite3.c:203505: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(&i, &r, 8); data/fossil-2.13/src/sqlite3.c:203529:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( n ) memcpy(&aBuf[nVarint + 1], z, n); data/fossil-2.13/src/sqlite3.c:203635:11: [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(&iVal, &rVal, 8); data/fossil-2.13/src/sqlite3.c:203791: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(aOut, a2, n2); data/fossil-2.13/src/sqlite3.c:203794: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(aOut, a1, n1); data/fossil-2.13/src/sqlite3.c:203889: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(aOut, aOld, nOld); data/fossil-2.13/src/sqlite3.c:203917: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(aOut, aNew, nNew); data/fossil-2.13/src/sqlite3.c:203979:11: [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(&rVal, &iVal, 8); data/fossil-2.13/src/sqlite3.c:204138: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(pAlloc, zThis, nThis+1); data/fossil-2.13/src/sqlite3.c:204148: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(pAlloc, zName, nName+1); data/fossil-2.13/src/sqlite3.c:204802:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pNew->zDb, zDb, nDb+1); data/fossil-2.13/src/sqlite3.c:204927: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(pTab->zName, zName, nName+1); data/fossil-2.13/src/sqlite3.c:205027: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(&p->aBuf[p->nBuf], aBlob, nBlob); data/fossil-2.13/src/sqlite3.c:205047: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(&p->aBuf[p->nBuf], zStr, nStr); data/fossil-2.13/src/sqlite3.c:205065: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 aBuf[24]; data/fossil-2.13/src/sqlite3.c:205120: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(&i, &r, 8); data/fossil-2.13/src/sqlite3.c:205203: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(&dVal, &iVal, 8); data/fossil-2.13/src/sqlite3.c:205409:11: [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(&rVal, &iVal, 8); data/fossil-2.13/src/sqlite3.c:205853:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(aCopy, aData, nData); data/fossil-2.13/src/sqlite3.c:205930:11: [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(&d, &v, 8); data/fossil-2.13/src/sqlite3.c:206065: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(&p->tblhdr.aBuf[iPK], &p->in.aData[p->in.iNext], nCopy); data/fossil-2.13/src/sqlite3.c:207756: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(pNew->aRecord, aRec, nRec); data/fossil-2.13/src/sqlite3.c:207768:11: [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(pOut, pIn, nIn); data/fossil-2.13/src/sqlite3.c:207800: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(pOut, a1, n1); data/fossil-2.13/src/sqlite3.c:207803: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(pOut, a2, n2); data/fossil-2.13/src/sqlite3.c:207866:11: [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(aCsr, aRec, nRec); data/fossil-2.13/src/sqlite3.c:207891:11: [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(aCsr, aRec, nRec); data/fossil-2.13/src/sqlite3.c:207961: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(pTab->abPK, abPK, nCol); data/fossil-2.13/src/sqlite3.c:207963: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(pTab->zName, zNew, nNew+1); data/fossil-2.13/src/sqlite3.c:208254: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(pOut, a2, nn2); data/fossil-2.13/src/sqlite3.c:208257: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(pOut, a1, nn1); data/fossil-2.13/src/sqlite3.c:208310: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(pOut, a1, n1); data/fossil-2.13/src/sqlite3.c:208314: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(pOut, a2, n2); data/fossil-2.13/src/sqlite3.c:208328:11: [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(pOut, a1, n1); data/fossil-2.13/src/sqlite3.c:210722: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 fts5yycoverage[fts5YYNSTATE][fts5YYNFTS5TOKEN]; data/fossil-2.13/src/sqlite3.c:212313: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(&pBuf->p[pBuf->n], pData, nData); data/fossil-2.13/src/sqlite3.c:212526: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(zRet, pIn, nIn); data/fossil-2.13/src/sqlite3.c:212621: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(pEntry->pTerm, pTerm, nTerm); data/fossil-2.13/src/sqlite3.c:212961: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(pSpace, p2, p-p2); data/fossil-2.13/src/sqlite3.c:213081: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(zOut, zIn, (size_t)(nIn+1)); data/fossil-2.13/src/sqlite3.c:213425:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( zRank ) memcpy(zRank, pRank, p-pRank); data/fossil-2.13/src/sqlite3.c:213445:27: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( zRankArgs ) memcpy(zRankArgs, pArgs, p-pArgs); data/fossil-2.13/src/sqlite3.c:213915: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 aSpec[3]; data/fossil-2.13/src/sqlite3.c:214086: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(aNew, aIter, sizeof(Fts5PoslistReader) * nIter); data/fossil-2.13/src/sqlite3.c:215289: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(pSyn->zTerm, pToken, nToken); data/fossil-2.13/src/sqlite3.c:215454: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(pColset, pColsetOrig, (size_t)nByte); data/fossil-2.13/src/sqlite3.c:215671: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(pRet, pOrig, (size_t)nByte); data/fossil-2.13/src/sqlite3.c:215799: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(&p->apChild[p->nChild], pSub->apChild, nByte); data/fossil-2.13/src/sqlite3.c:216951: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(&zKey[1], pToken, nToken); data/fossil-2.13/src/sqlite3.c:217171: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(&pRet[nPre], &((u8*)p)[nHashPre], nList); data/fossil-2.13/src/sqlite3.c:218323:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&(pBuf)->p[(pBuf)->n], pBlob, nBlob); \ data/fossil-2.13/src/sqlite3.c:218421: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(pOut->aSeg, &pLvl->aSeg[is], sizeof(Fts5StructureSegment)); data/fossil-2.13/src/sqlite3.c:222390:23: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( doclist.n ) memcpy(pData->p, doclist.p, doclist.n); data/fossil-2.13/src/sqlite3.c:222637:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if( nToken ) memcpy(&buf.p[1], pToken, nToken); data/fossil-2.13/src/sqlite3.c:223606: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. if( n>0 ) memcpy(a, aBlob, n); data/fossil-2.13/src/sqlite3.c:226467: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(pAux->zFunc, zName, nName); data/fossil-2.13/src/sqlite3.c:226505: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(pNew->zName, zName, nName); data/fossil-2.13/src/sqlite3.c:227961: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 aAsciiTokenChar[128] = { data/fossil-2.13/src/sqlite3.c:227974: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 aTokenChar[128]; data/fossil-2.13/src/sqlite3.c:228017: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(p->aTokenChar, aAsciiTokenChar, sizeof(aAsciiTokenChar)); data/fossil-2.13/src/sqlite3.c:228065: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 aFold[64]; data/fossil-2.13/src/sqlite3.c:228170: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 aTokenChar[128]; /* ASCII range token characters */ data/fossil-2.13/src/sqlite3.c:228177: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 aCategory[32]; /* True for token char categories */ data/fossil-2.13/src/sqlite3.c:228436: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(aFold, p->aFold, nFold); data/fossil-2.13/src/sqlite3.c:228490: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 aBuf[FTS5_PORTER_MAX_TOKEN + 64]; data/fossil-2.13/src/sqlite3.c:228577: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(&aBuf[nStem], p->zOutput, p->nOutput); data/fossil-2.13/src/sqlite3.c:228816: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(&aBuf[nBuf-2], "ate", 3); data/fossil-2.13/src/sqlite3.c:228824: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(&aBuf[nBuf-2], "ble", 3); data/fossil-2.13/src/sqlite3.c:228832: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(&aBuf[nBuf-2], "ize", 3); data/fossil-2.13/src/sqlite3.c:228851:11: [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(&aBuf[nBuf-7], "ate", 3); data/fossil-2.13/src/sqlite3.c:228856:11: [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(&aBuf[nBuf-6], "tion", 4); data/fossil-2.13/src/sqlite3.c:228865:11: [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(&aBuf[nBuf-4], "ence", 4); data/fossil-2.13/src/sqlite3.c:228870:11: [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(&aBuf[nBuf-4], "ance", 4); data/fossil-2.13/src/sqlite3.c:228879:11: [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(&aBuf[nBuf-4], "ize", 3); data/fossil-2.13/src/sqlite3.c:228888:11: [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(&aBuf[nBuf-4], "log", 3); data/fossil-2.13/src/sqlite3.c:228897:11: [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(&aBuf[nBuf-3], "ble", 3); data/fossil-2.13/src/sqlite3.c:228902:11: [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(&aBuf[nBuf-4], "al", 2); data/fossil-2.13/src/sqlite3.c:228907:11: [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(&aBuf[nBuf-5], "ent", 3); data/fossil-2.13/src/sqlite3.c:228912:11: [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(&aBuf[nBuf-3], "e", 1); data/fossil-2.13/src/sqlite3.c:228917:11: [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(&aBuf[nBuf-5], "ous", 3); data/fossil-2.13/src/sqlite3.c:228926:11: [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(&aBuf[nBuf-7], "ize", 3); data/fossil-2.13/src/sqlite3.c:228931:11: [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(&aBuf[nBuf-5], "ate", 3); data/fossil-2.13/src/sqlite3.c:228936:11: [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(&aBuf[nBuf-4], "ate", 3); data/fossil-2.13/src/sqlite3.c:228945:11: [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(&aBuf[nBuf-5], "al", 2); data/fossil-2.13/src/sqlite3.c:228950:11: [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(&aBuf[nBuf-7], "ive", 3); data/fossil-2.13/src/sqlite3.c:228955:11: [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(&aBuf[nBuf-7], "ful", 3); data/fossil-2.13/src/sqlite3.c:228960:11: [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(&aBuf[nBuf-7], "ous", 3); data/fossil-2.13/src/sqlite3.c:228969:11: [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(&aBuf[nBuf-5], "al", 2); data/fossil-2.13/src/sqlite3.c:228974:11: [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(&aBuf[nBuf-5], "ive", 3); data/fossil-2.13/src/sqlite3.c:228979:11: [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(&aBuf[nBuf-6], "ble", 3); data/fossil-2.13/src/sqlite3.c:228998:11: [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(&aBuf[nBuf-4], "ic", 2); data/fossil-2.13/src/sqlite3.c:229015:11: [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(&aBuf[nBuf-5], "ic", 2); data/fossil-2.13/src/sqlite3.c:229020:11: [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(&aBuf[nBuf-5], "ic", 2); data/fossil-2.13/src/sqlite3.c:229045:11: [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(&aBuf[nBuf-5], "al", 2); data/fossil-2.13/src/sqlite3.c:229064:11: [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(&aBuf[nBuf-3], "ee", 2); data/fossil-2.13/src/sqlite3.c:229127:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(aBuf, pToken, nBuf); data/fossil-2.13/src/sqlite3.c:229261: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 aBuf[32]; data/fossil-2.13/src/sqlite3.c:230686: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(pRet->zFts5Tbl, zTab, nTab); data/fossil-2.13/src/sqlite3.c:230687: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(pRet->zFts5Db, zDb, nDb); data/fossil-2.13/src/sqlite3.c:231113: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(pCsr->zLeTerm, zCopy, pCsr->nLeTerm+1); data/fossil-2.13/src/sqlite3.h:9575: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 hidden[48]; data/fossil-2.13/src/stash.c:504:15: [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). stashid = atoi(zStashId); data/fossil-2.13/src/stash.c:622:15: [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). width = atoi(zWidth); data/fossil-2.13/src/stat.c:191: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 zStored[100]; data/fossil-2.13/src/stat.c:428: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 *newArgv[3]; data/fossil-2.13/src/stat.c:613: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 zBuf[100]; data/fossil-2.13/src/statrep.c:155: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 yearPart[5] = {0,0,0,0,0}; data/fossil-2.13/src/statrep.c:156:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(yearPart, zTimeframe, 4); data/fossil-2.13/src/statrep.c:192: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 zPrevYear[5] = {0}; /* For keeping track of when data/fossil-2.13/src/statrep.c:270: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(zPrevYear,zTimeframe,4); data/fossil-2.13/src/statrep.c:745: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. const char *azView[16]; /* Drop-down menu of view types */ data/fossil-2.13/src/style.c:497: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 zNonce[52]; data/fossil-2.13/src/style.c:499: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 zSeed[24]; data/fossil-2.13/src/style.c:1139: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 zCap[100]; data/fossil-2.13/src/tag.c:506:41: [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). const int nFindLimit = zFindLimit ? atoi(zFindLimit) : -2000; data/fossil-2.13/src/tar.c:65:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&tball.aHdr[108], "0000000", 8); /* Owner ID */ data/fossil-2.13/src/tar.c:66:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&tball.aHdr[116], "0000000", 8); /* Group ID */ data/fossil-2.13/src/tar.c:67:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&tball.aHdr[257], "ustar\00000", 8); /* POSIX.1 format */ data/fossil-2.13/src/tar.c:68:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&tball.aHdr[265], "nobody", 7); /* Owner name */ data/fossil-2.13/src/tar.c:69:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&tball.aHdr[297], "nobody", 7); /* Group name */ data/fossil-2.13/src/tar.c:104: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(pDest, pSrc, nDest); data/fossil-2.13/src/tar.c:106: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(pDest, pSrc, nSrc); data/fossil-2.13/src/tar.c:360:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tball.zPrevDir, zName, i); data/fossil-2.13/src/th.c:213:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return n>0 ? memcpy(dest,src,n) : dest; data/fossil-2.13/src/th.c:2568: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 aCharProp[256] = { data/fossil-2.13/src/th.c:2809: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 zBuf[32]; data/fossil-2.13/src/th.c:2836: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 zBuf[128]; /* Output buffer */ data/fossil-2.13/src/th_lang.c:516:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->zProgram, argv[3], argl[3]); data/fossil-2.13/src/th_lang.c:535: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(zSpace, az[0], an[0]); data/fossil-2.13/src/th_lang.c:540: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(zSpace, az[1], an[1]); data/fossil-2.13/src/th_lang.c:904: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(&zByte[i], argv[2], argl[2]); data/fossil-2.13/src/th_main.c:186: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 zSize[50]; data/fossil-2.13/src/th_main.c:339: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 zRc[32]; data/fossil-2.13/src/th_main.c:893: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. zArg = (const char *)argv[1]; data/fossil-2.13/src/th_main.c:1711: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 zUTime[50]; data/fossil-2.13/src/th_main.c:1732: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 zUTime[50]; data/fossil-2.13/src/th_main.c:1754: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 aRand[50]; data/fossil-2.13/src/th_main.c:1755: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 zOut[100]; data/fossil-2.13/src/th_main.c:2012:25: [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 unsigned char *)argv[nArg+1], argl[nArg+1])); data/fossil-2.13/src/th_main.c:3027:50: [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). rc = Th_CommandHook(g.argv[3], (unsigned int)atoi(g.argv[4])); data/fossil-2.13/src/th_main.c:3029:52: [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). rc = Th_CommandNotify(g.argv[3], (unsigned int)atoi(g.argv[4])); data/fossil-2.13/src/th_main.c:3031:50: [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). rc = Th_WebpageHook(g.argv[3], (unsigned int)atoi(g.argv[4])); data/fossil-2.13/src/th_main.c:3033:52: [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). rc = Th_WebpageNotify(g.argv[3], (unsigned int)atoi(g.argv[4])); data/fossil-2.13/src/th_tcl.c:367: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 zRc[TCL_INTEGER_SPACE + 17]; /* "Tcl return code\0" */ data/fossil-2.13/src/timeline.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 zColor[10]; /* The resulting color */ data/fossil-2.13/src/timeline.c:190: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 zNm[10]; data/fossil-2.13/src/timeline.c:260: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 zPrevDate[20]; data/fossil-2.13/src/timeline.c:299:31: [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). if( zDateFmt ) dateFormat = atoi(zDateFmt); data/fossil-2.13/src/timeline.c:334: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 zTime[20]; data/fossil-2.13/src/timeline.c:383: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(zTime, &zDate[11], 5+dateFormat*3); data/fossil-2.13/src/timeline.c:778: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 zId[40]; data/fossil-2.13/src/timeline.c:880: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 zRes[10]; data/fossil-2.13/src/timeline.c:931:18: [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). iRailPitch = atoi(PD("railpitch","0")); data/fossil-2.13/src/timeline.c:939: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). dwellTimeout = atoi(db_get("timeline-dwelltime","100")); data/fossil-2.13/src/timeline.c:940: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). closeTimeout = atoi(db_get("timeline-closetime","250")); data/fossil-2.13/src/timeline.c:1229:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *az[16]; data/fossil-2.13/src/timeline.c:1572: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 zEDate[20]; data/fossil-2.13/src/timeline.c:1736: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). nEntry = atoi(z); data/fossil-2.13/src/timeline.c:1756:18: [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). advancedMenu = atoi(PD("advm","0")); data/fossil-2.13/src/timeline.c:2225:25: [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). zYearWeek, atoi(zYearWeek+5)*7); data/fossil-2.13/src/timeline.c:2251:15: [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). nDays = atoi(zNDays); data/fossil-2.13/src/timeline.c:2660: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 zPrevDate[20]; data/fossil-2.13/src/timeline.c:2681: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 zPrefix[80]; data/fossil-2.13/src/timeline.c:2694: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(zPrevDate, zDate, 10); data/fossil-2.13/src/timeline.c:2905:9: [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). n = atoi(zLimit); data/fossil-2.13/src/timeline.c:2910:13: [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). width = atoi(zWidth); data/fossil-2.13/src/timeline.c:2918:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). iOffset = zOffset ? atoi(zOffset) : 0; data/fossil-2.13/src/tkt.c:1017: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 zGlobPattern[50]; data/fossil-2.13/src/translate.c:66:8: [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 zArg[MX_ARG_SP]; data/fossil-2.13/src/translate.c:105: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 zLine[2000]; /* A single line of input */ data/fossil-2.13/src/translate.c:106: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 zOut[4000]; /* The input line translated into appropriate output */ data/fossil-2.13/src/translate.c:246: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 *in = fopen(argv[1], "r"); data/fossil-2.13/src/undo.c:356: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 zRc[32]; data/fossil-2.13/src/unversioned.c:543: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 zSzName[100]; data/fossil-2.13/src/update.c:46: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 *newArgv[3]; data/fossil-2.13/src/update.c:142:13: [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). width = atoi(zWidth); data/fossil-2.13/src/user.c:129:8: [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 aSubst[256]; data/fossil-2.13/src/user.c:162: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 zOrig[30]; data/fossil-2.13/src/user.c:163: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 zA[30]; data/fossil-2.13/src/user.c:164: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 zB[30]; data/fossil-2.13/src/user.c:168:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zOrig, "abcdefghijklmnopqrstuvwyz", nA+1); data/fossil-2.13/src/user.c:169:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zA, zOrig, nA+1); data/fossil-2.13/src/user.c:191:10: [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). return atoi(zLevel); data/fossil-2.13/src/user.c:218: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 zPass[100]; data/fossil-2.13/src/user.c:315: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 zLine[1000]; data/fossil-2.13/src/user.c:627:13: [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). iVerify = atoi(g.argv[3]); data/fossil-2.13/src/user.c:645:11: [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). int y = atoi(PD("y","3")); data/fossil-2.13/src/user.c:646:11: [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). int n = atoi(PD("n","200")); data/fossil-2.13/src/user.c:647:14: [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). int skip = atoi(PD("o","0")); data/fossil-2.13/src/utf8.c:81:15: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). int nByte = MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, 0, 0); data/fossil-2.13/src/utf8.c:83:3: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, zUnicode, nByte); data/fossil-2.13/src/utf8.c:195:15: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). int nChar = MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, 0, 0); data/fossil-2.13/src/utf8.c:202:3: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, zUnicode, nChar); data/fossil-2.13/src/utf8.c:224: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(wUnicode, L"\\\\?\\", 4*sizeof(wchar_t)); data/fossil-2.13/src/utf8.c:237: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(wUnicode, L"\\\\?\\UNC", 7*sizeof(wchar_t)); data/fossil-2.13/src/utf8.c:261:5: [2] (buffer) wchar_t: 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. wchar_t zUnicode[2000]; data/fossil-2.13/src/utf8.c:263:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, zUtf8, -1, zUnicode, count(zUnicode)); data/fossil-2.13/src/utf8.c:389:11: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). nChar = MultiByteToWideChar(CP_UTF8, 0, blob_buffer(&blob), data/fossil-2.13/src/utf8.c:395:11: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). nChar = MultiByteToWideChar(CP_UTF8, 0, blob_buffer(&blob), data/fossil-2.13/src/util.c:322: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 zLine[10000]; data/fossil-2.13/src/util.c:689: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 zSrc[60]; data/fossil-2.13/src/util.c:692: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 z[60]; data/fossil-2.13/src/util.c:704:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zSrc, zAlphabet, nSrc); data/fossil-2.13/src/util.c:729:9: [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). N = atoi(g.argv[2]); data/fossil-2.13/src/vfile.c:56: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 z[HNAME_MAX+1]; data/fossil-2.13/src/vfile.c:62:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(z, zUuid, sz+1); data/fossil-2.13/src/vfile.c:719: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 zBuf[4096]; data/fossil-2.13/src/vfile.c:768: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 zBuf[100]; data/fossil-2.13/src/vfile.c:870: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 zBuf[100]; data/fossil-2.13/src/vfile.c:919: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 zBuf[100]; data/fossil-2.13/src/webmail.c:41: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 zMimetype[32]; /* Mimetype */ data/fossil-2.13/src/webmail.c:190: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(pBody->zMimetype, z2, j); data/fossil-2.13/src/webmail.c:398: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 zENum[30]; data/fossil-2.13/src/webmail.c:415:19: [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). int eFormat = atoi(PD("f","0")); data/fossil-2.13/src/webmail.c:547:9: [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). n = atoi(zName+1); data/fossil-2.13/src/webmail.c:607: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 zPPg[30]; /* Previous page */ data/fossil-2.13/src/webmail.c:608: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 zNPg[30]; /* Next page */ data/fossil-2.13/src/webmail.c:622:13: [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). emailid = atoi(PD("id","0")); data/fossil-2.13/src/webmail.c:659:7: [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). d = atoi(PD("d","0")); data/fossil-2.13/src/webmail.c:700:8: [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). pg = atoi(PD("pg","0")); data/fossil-2.13/src/webmail.c:777:12: [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). int id = atoi(PD("id","0")); data/fossil-2.13/src/wiki.c:928:10: [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). switch(atoi(PD("sbs","0"))){ data/fossil-2.13/src/wiki.c:932:10: [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). switch(atoi(PD("ws","2"))){ data/fossil-2.13/src/wiki.c:1616:12: [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). rid1 = atoi(PD("rid","0")); data/fossil-2.13/src/wiki.c:1848: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 zUuid[HNAME_MAX+1]; data/fossil-2.13/src/wiki.c:1849: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(zUuid, zETime, nETime+1); data/fossil-2.13/src/wikiformat.c:774: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 zTag[100]; data/fossil-2.13/src/wikiformat.c:1094: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 zU2[HNAME_MAX+1]; data/fossil-2.13/src/wikiformat.c:1101:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zU2, zUuid, n); data/fossil-2.13/src/wikiformat.c:1123: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 zLower[HNAME_MAX+1]; data/fossil-2.13/src/wikiformat.c:1124: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 zUpper[HNAME_MAX+1]; data/fossil-2.13/src/wikiformat.c:1126:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zLower, zTarget, n+1); data/fossil-2.13/src/wikiformat.c:1128:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zUpper, zLower, n+1); data/fossil-2.13/src/wikiformat.c:1521:43: [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). blob_appendf(p->pOut, " (%d) ", atoi(z)); data/fossil-2.13/src/wikiformat.c:1535:54: [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). blob_appendf(p->pOut, "<li value=\"%d\">", atoi(z)); data/fossil-2.13/src/wikiformat.c:1563: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 zClose[20]; data/fossil-2.13/src/wikiformat.c:2263: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 zTag[32]; data/fossil-2.13/src/wikiformat.c:2381: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 zTag[32]; data/fossil-2.13/src/wikiformat.c:2423:17: [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). int x = atoi(&zIn[1]); data/fossil-2.13/src/wikiformat.c:2533: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(aNew, p->aStack, sizeof(p->aStack[0])*p->n ); data/fossil-2.13/src/winhttp.c:52:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&addr, pAddr, sizeof(SocketAddr)); data/fossil-2.13/src/winhttp.c:150: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(&addr6.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback)); data/fossil-2.13/src/winhttp.c:152: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(&addr6.sin6_addr, &in6addr_any, sizeof(in6addr_any)); data/fossil-2.13/src/winhttp.c:277: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). return atoi(&zHdr[17]); data/fossil-2.13/src/winhttp.c:345: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 zCmdFName[MAX_PATH]; data/fossil-2.13/src/winhttp.c:346: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 zRequestFName[MAX_PATH]; data/fossil-2.13/src/winhttp.c:347: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 zReplyFName[MAX_PATH]; data/fossil-2.13/src/winhttp.c:348: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 zCmd[2000]; /* Command-line to process the request */ data/fossil-2.13/src/winhttp.c:349: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 zHdr[4000]; /* The HTTP request header */ data/fossil-2.13/src/winhttp.c:448: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 zRequestFName[MAX_PATH]; data/fossil-2.13/src/winhttp.c:449: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 zReplyFName[MAX_PATH]; data/fossil-2.13/src/winhttp.c:450: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 zCmd[2000]; /* Command-line to process the request */ data/fossil-2.13/src/winhttp.c:451: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 zHdr[4000]; /* The SCGI request header */ data/fossil-2.13/src/winhttp.c:469:15: [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). wanted += atoi(zHdr+i+15); data/fossil-2.13/src/winhttp.c:532:3: [2] (buffer) wchar_t: 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. wchar_t zTmpPath[MAX_PATH]; data/fossil-2.13/src/winhttp.c:667: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(&pRequest->addr, &client_addr.a4, sizeof(client_addr.a4)); data/fossil-2.13/src/winhttp.c:680: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(&pRequest->addr, &client_addr.a6, sizeof(client_addr.a6)); data/fossil-2.13/src/winhttp.c:1086:19: [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). if( zPort && (atoi(zPort)<=0) ){ data/fossil-2.13/src/xfer.c:1603:30: [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). xfer.remoteVersion = atoi(blob_str(&xfer.aToken[2])); data/fossil-2.13/src/xfer.c:1605:29: [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). xfer.remoteDate = atoi(blob_str(&xfer.aToken[3])); data/fossil-2.13/src/xfer.c:1606:29: [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). xfer.remoteTime = atoi(blob_str(&xfer.aToken[4])); data/fossil-2.13/src/xfer.c:2188: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 zTime[20]; data/fossil-2.13/src/xfer.c:2482:32: [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). xfer.remoteVersion = atoi(blob_str(&xfer.aToken[2])); data/fossil-2.13/src/xfer.c:2484:31: [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). xfer.remoteDate = atoi(blob_str(&xfer.aToken[3])); data/fossil-2.13/src/xfer.c:2485:31: [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). xfer.remoteTime = atoi(blob_str(&xfer.aToken[4])); data/fossil-2.13/src/zip.c:110:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&aBlob[iOfst], pBuf, iAmt); data/fossil-2.13/src/zip.c:190:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(zOut, zIn, n+1); data/fossil-2.13/src/zip.c:229:7: [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). y = atoi(zDate); data/fossil-2.13/src/zip.c:230:7: [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). m = atoi(&zDate[5]); data/fossil-2.13/src/zip.c:231:7: [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). d = atoi(&zDate[8]); data/fossil-2.13/src/zip.c:232:7: [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). H = atoi(&zDate[11]); data/fossil-2.13/src/zip.c:233:7: [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). M = atoi(&zDate[14]); data/fossil-2.13/src/zip.c:234:7: [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). S = atoi(&zDate[17]); data/fossil-2.13/src/zip.c:272: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 zHdr[30]; data/fossil-2.13/src/zip.c:273: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 zExTime[13]; data/fossil-2.13/src/zip.c:274: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 zBuf[100]; data/fossil-2.13/src/zip.c:275: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 zOutBuf[100000]; data/fossil-2.13/src/zip.c:538: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 zBuf[30]; data/fossil-2.13/tools/decode-email.c:33:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zBoundary[200]; data/fossil-2.13/tools/decode-email.c:34: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 zLine[5000]; data/fossil-2.13/tools/decode-email.c:35: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 zOut[5000]; data/fossil-2.13/tools/decode-email.c:153: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). FILE *in = fopen(argv[i], "rb"); data/fossil-2.13/win/include/dirent.h:231:5: [2] (buffer) wchar_t: 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. wchar_t d_name[PATH_MAX+1]; data/fossil-2.13/win/include/dirent.h:271: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 d_name[PATH_MAX+1]; data/fossil-2.13/win/include/dirent.h:681:9: [2] (buffer) wchar_t: 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. wchar_t wname[PATH_MAX + 1]; data/fossil-2.13/compat/zlib/contrib/blast/blast.c:458:12: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (getchar() != EOF) data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:143:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = (int)strlen(newdir); data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:390:27: [1] (buffer) scanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. ret = scanf("%1s",answer); data/fossil-2.13/compat/zlib/contrib/minizip/miniunz.c:609:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filename_try, zipfilename,MAXFILENAME-1); data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:111:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(f); data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:115:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, f,MAXFILENAME-1); data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:324:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(filename_try, argv[zipfilenamearg],MAXFILENAME-1); data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:328:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len=(int)strlen(filename_try); data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:352:27: [1] (buffer) scanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. ret = scanf("%1s",answer); data/fossil-2.13/compat/zlib/contrib/minizip/minizip.c:396:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strlen(argv[i]) == 2))) data/fossil-2.13/compat/zlib/contrib/minizip/mztools.c:151:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int comsize = (int) strlen(comment); data/fossil-2.13/compat/zlib/contrib/minizip/mztools.c:226:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int comsize = (int) strlen(comment); data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/contrib/minizip/zip.c:1101:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_comment = (uInt)strlen(comment); data/fossil-2.13/compat/zlib/contrib/minizip/zip.c:1103:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_filename = (uInt)strlen(filename); data/fossil-2.13/compat/zlib/contrib/minizip/zip.c:1870:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_global_comment = (uInt)strlen(global_comment); data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/examples/gun.c:103:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = (int)read(me->infile, next, ret); data/fossil-2.13/compat/zlib/examples/gun.c:669:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (int)strlen(*argv); data/fossil-2.13/compat/zlib/examples/gzappend.c:184:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(in->fd, in->buf, 1 << in->size); data/fossil-2.13/compat/zlib/examples/gzappend.c:356:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); data/fossil-2.13/compat/zlib/examples/gzappend.c:375:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name); data/fossil-2.13/compat/zlib/examples/gzappend.c:411:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, in, CHUNK); data/fossil-2.13/compat/zlib/examples/gzjoin.c:131:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left); data/fossil-2.13/compat/zlib/examples/gzjoin.c:183:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(in->fd, in->buf, 1) != 1) data/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/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/fossil-2.13/compat/zlib/examples/gzlog.c:762:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = (size_t)read(fd, data, len) != len; data/fossil-2.13/compat/zlib/examples/gzlog.c:882:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(path); data/fossil-2.13/compat/zlib/examples/gzlog.c:939:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(log->fd, buf, 5) != 5) data/fossil-2.13/compat/zlib/examples/gzlog.c:943:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(log->fd, (char *)data + next, block) != block) data/fossil-2.13/compat/zlib/examples/zran.c:281:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = getc(in); data/fossil-2.13/compat/zlib/gzguts.h:48:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read _read data/fossil-2.13/compat/zlib/gzlib.c:199:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen((const char *)path); data/fossil-2.13/compat/zlib/gzlib.c:605:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == data/fossil-2.13/compat/zlib/gzlib.c:605:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == data/fossil-2.13/compat/zlib/gzlib.c:611:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, data/fossil-2.13/compat/zlib/gzlib.c:611:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, data/fossil-2.13/compat/zlib/gzread.c:35:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(state->fd, buf + *have, get); data/fossil-2.13/compat/zlib/gzwrite.c:370:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/fossil-2.13/compat/zlib/gzwrite.c:426:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(next); data/fossil-2.13/compat/zlib/gzwrite.c:524:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(next); data/fossil-2.13/compat/zlib/test/example.c:93:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). uLong len = (uLong)strlen(hello)+1; data/fossil-2.13/compat/zlib/test/example.c:123:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = (int)strlen(hello)+1; data/fossil-2.13/compat/zlib/test/example.c:180:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen((char*)uncompr) != 7) { /* " hello!" */ data/fossil-2.13/compat/zlib/test/example.c:206:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). uLong len = (uLong)strlen(hello)+1; data/fossil-2.13/compat/zlib/test/example.c:381:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). uInt len = (uInt)strlen(hello)+1; data/fossil-2.13/compat/zlib/test/example.c:480:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). c_stream.avail_in = (uInt)strlen(hello)+1; data/fossil-2.13/compat/zlib/test/infcover.c:250:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). in = malloc((strlen(hex) + 1) >> 1); data/fossil-2.13/compat/zlib/test/infcover.c:525:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). prefix = malloc(strlen(id) + 6); data/fossil-2.13/compat/zlib/test/minigzip.c:465:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) { data/fossil-2.13/compat/zlib/test/minigzip.c:465:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) { data/fossil-2.13/compat/zlib/test/minigzip.c:503:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned len = strlen(file); data/fossil-2.13/compat/zlib/test/minigzip.c:505:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (len + strlen(GZ_SUFFIX) >= sizeof(buf)) { data/fossil-2.13/src/add.c:428: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). nRoot = strlen(g.zLocalRoot); data/fossil-2.13/src/add.c:821: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). n = strlen(g.zLocalRoot); data/fossil-2.13/src/add.c:1091: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). zTail = &zPath[nOrig-strlen(file_tail(zOrig))]; data/fossil-2.13/src/alerts.c:548: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). int nField = (int)strlen(zField); data/fossil-2.13/src/alerts.c:1032: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). nCmd = (int)strlen(zCmd); data/fossil-2.13/src/alerts.c:1658: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). nName = zName ? (int)strlen(zName) : 0; data/fossil-2.13/src/allrepo.c:170: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). n = strlen(g.argv[2]); data/fossil-2.13/src/allrepo.c:411: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). int len = (int)strlen(zFilename); data/fossil-2.13/src/attach.c:295: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(zComment); data/fossil-2.13/src/attach.c:463: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). if( validate16(zTarget, strlen(zTarget)) data/fossil-2.13/src/attach.c:703: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). n = strlen(g.argv[2]); data/fossil-2.13/src/bisect.c:451: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). n = strlen(zCmd); data/fossil-2.13/src/bisect.c:540: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). int m = (int)strlen(zDisplay); data/fossil-2.13/src/bisect.c:579: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). n = strlen(g.argv[3]); data/fossil-2.13/src/blob.c:240:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( size<=0 ) size = strlen(zData); data/fossil-2.13/src/blob.c:294:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( nData<0 ) nData = strlen(aData); data/fossil-2.13/src/blob.c:455: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). if( n<=0 ) n = strlen(z); data/fossil-2.13/src/branch.c:393: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). n = strlen(zCmd); data/fossil-2.13/src/browse.c:140:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nD = zD ? strlen(zD)+1 : 0; data/fossil-2.13/src/browse.c:156: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). if( zCI && strlen(zCI)==0 ){ zCI = 0; } data/fossil-2.13/src/browse.c:163: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). if( zD && strlen(zD)==0 ){ zD = 0; } data/fossil-2.13/src/browse.c:176: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). isSymbolicCI = (sqlite3_strnicmp(zUuid, zCI, strlen(zCI))!=0); data/fossil-2.13/src/browse.c:484:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memcpy(pNew->zUuid, zUuid, strlen(zUuid)+1); data/fossil-2.13/src/browse.c:634:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nD = zD ? strlen(zD)+1 : 0; data/fossil-2.13/src/browse.c:661: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). if( zCI && strlen(zCI)==0 ){ zCI = 0; } data/fossil-2.13/src/browse.c:691: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). if( zD && strlen(zD)==0 ){ zD = 0; } data/fossil-2.13/src/browse.c:707: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). isSymbolicCI = (sqlite3_strnicmp(zUuid, zCI, strlen(zCI)) != 0); data/fossil-2.13/src/builtin.c:191: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( zId && (nId = (int)strlen(zId))>=8 data/fossil-2.13/src/builtin.c:213: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). && (nId = (int)strlen(zId))>=8 data/fossil-2.13/src/builtin.c:730: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). zDep += strlen(zDep)+1/*NUL delimiter*/; data/fossil-2.13/src/bundle.c:781:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(zSubcmd); data/fossil-2.13/src/cache.c:32:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(g.zRepositoryName); data/fossil-2.13/src/cache.c:281: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). nCmd = (int)strlen(zCmd); data/fossil-2.13/src/captcha.c:74: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 *z = fossil_malloc( 9*6*strlen(zPw) + 7 ); data/fossil-2.13/src/captcha.c:207: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 *z = fossil_malloc( 7*4*strlen(zPw) + 5 ); data/fossil-2.13/src/captcha.c:364: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). char *z = fossil_malloc( 10*6*strlen(zPw) + 7 ); data/fossil-2.13/src/captcha.c:516: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). if( zEntered==0 || strlen(zEntered)!=8 ) return 0; data/fossil-2.13/src/captcha.c:518: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). assert( strlen(zDecode)==8 ); data/fossil-2.13/src/captcha.c:519: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(zEntered)!=8 ) return 0; data/fossil-2.13/src/captcha.c:612: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( zReferer && strncmp(g.zBaseURL, zReferer, strlen(g.zBaseURL))==0 ){ data/fossil-2.13/src/cgi.c:425: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 n1 = (int)strlen(g.zBaseURL); data/fossil-2.13/src/cgi.c:426: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 n2 = (int)strlen(g.zTop); data/fossil-2.13/src/cgi.c:463:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(z); data/fossil-2.13/src/cgi.c:505:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nBase = (int)strlen(g.zBaseURL); data/fossil-2.13/src/cgi.c:718:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). json_setenv( zName, cson_value_new_string(zValue,strlen(zValue)) ); data/fossil-2.13/src/cgi.c:770: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 nBoundary = strlen(zBoundary); data/fossil-2.13/src/cgi.c:879:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = strlen(azArg[i]); data/fossil-2.13/src/cgi.c:1095: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). nRU = strlen(zRequestUri); data/fossil-2.13/src/cgi.c:1096: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). nPI = strlen(zPathInfo); data/fossil-2.13/src/cgi.c:1600: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). i = strlen(z)-1; data/fossil-2.13/src/cgi.c:1714: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). i = strlen(zVal); data/fossil-2.13/src/cgi.c:1809:23: [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). }else if( zToken && strlen(zToken)==0 && zCmd ){ data/fossil-2.13/src/cgi.c:1859: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). i = strlen(zVal); data/fossil-2.13/src/cgi.c:1962:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( zToken && strlen(zToken)==0 ){ data/fossil-2.13/src/cgi.c:2005:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while( (c = fgetc(g.httpIn))!=EOF && fossil_isdigit((char)c) ){ data/fossil-2.13/src/cgi.c:2022:3: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fgetc(g.httpIn); /* Read past the "," separating header from content */ data/fossil-2.13/src/cgi.c:2129:12: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). wUrl[wcslen(wUrl)-2] = 0; /* Strip terminating " &" */ data/fossil-2.13/src/checkin.c:85:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nRoot = (int)strlen(g.zLocalRoot); data/fossil-2.13/src/checkin.c:1026:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nRoot = (int)strlen(g.zLocalRoot); data/fossil-2.13/src/checkin.c:1249: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). i = strlen(zComment); data/fossil-2.13/src/codecheck1.c:213:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = (int)strlen(z); data/fossil-2.13/src/codecheck1.c:313: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). && strlen(azSafeFunc[i])==len data/fossil-2.13/src/comformat.c:350:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). maxChars = strlen(zText); data/fossil-2.13/src/comformat.c:487:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). maxChars = strlen(zText); data/fossil-2.13/src/comformat.c:626: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). indent = strlen(zPrefix); data/fossil-2.13/src/configure.c:246: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). int n = strlen(zName); data/fossil-2.13/src/configure.c:682: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). int n = strlen(z); data/fossil-2.13/src/configure.c:788: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). n = strlen(zMethod); data/fossil-2.13/src/configure.c:987:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). j += (int)strlen((char*)zTrans+j); data/fossil-2.13/src/cson_amalgamation.c:1971:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). return strncpy( rc, src, n ); data/fossil-2.13/src/cson_amalgamation.c:1994:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return cson_string_cmp_cstr_n( lhs, rhs, (rhs&&*rhs) ? strlen(rhs) : 0 ); data/fossil-2.13/src/cson_amalgamation.c:2101:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned int llen = strlen(lk); data/fossil-2.13/src/cson_amalgamation.c:3033: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). const unsigned int klen = strlen(key); data/fossil-2.13/src/cson_amalgamation.c:3186:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cson_string * cs = cson_new_string(key,strlen(key)); data/fossil-2.13/src/cson_amalgamation.c:4850:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). v = cson_strdup( buf, strlen(buf) ); data/fossil-2.13/src/cson_amalgamation.c:4858:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). v = cson_strdup( buf, strlen(buf) ); data/fossil-2.13/src/cson_amalgamation.c:4903:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). v = cson_strdup( buf, strlen(buf) ); data/fossil-2.13/src/cson_amalgamation.c:4911:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). v = cson_strdup( buf, strlen(buf) ); data/fossil-2.13/src/cson_amalgamation.c:5048:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return cson_value_new_string(arg, strlen(arg)); data/fossil-2.13/src/cson_amalgamation.c:5341:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return cson_value_new_string(str, str ? strlen(str) : 0); data/fossil-2.13/src/cson_amalgamation.c:5372: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). cson_value_new_string(colName, strlen(colName)) ); data/fossil-2.13/src/db.c:1320:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sqlite3_result_text(context, zOut, strlen(zOut), sqlite3_free); data/fossil-2.13/src/db.c:1586: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). fossil_secure_zero(zCmd, strlen(zCmd)); data/fossil-2.13/src/db.c:1664: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). fossil_secure_zero(zCmd, strlen(zCmd)); data/fossil-2.13/src/db.c:2025: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). n = strlen(zPwd); data/fossil-2.13/src/db.c:2787:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(zSql); data/fossil-2.13/src/db.c:3511:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for(i=(int)strlen(zNewBase)-1; i>1 && zNewBase[i]!='.'; i--){} data/fossil-2.13/src/db.c:4222:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = (int)strlen(zName) + !allowPrefix; data/fossil-2.13/src/db.c:4304: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). int n = (int)strlen(zName); data/fossil-2.13/src/db.c:4314: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). if( n!=strlen(pSetting[0].name) && pSetting[1].name && data/fossil-2.13/src/diff.c:573:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int x = strlen(p->zStart); data/fossil-2.13/src/diff.c:1291:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sbsWriteSep(&s, strlen(zLn), SBS_LNA); data/fossil-2.13/src/diff.c:1295:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sbsWriteSep(&s, strlen(zLn), SBS_LNB); data/fossil-2.13/src/diffcmd.c:128: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 n1 = strlen(zLeft); data/fossil-2.13/src/diffcmd.c:129: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 n2 = strlen(zRight); data/fossil-2.13/src/dispatch.c:99: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 nName = strlen(zName); data/fossil-2.13/src/dispatch.c:214: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). int nPrefix = (int)strlen(zPrefix); data/fossil-2.13/src/dispatch.c:636:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nA = (int)strlen(zA); data/fossil-2.13/src/dispatch.c:637:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nB = (int)strlen(zB); data/fossil-2.13/src/dispatch.c:915: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(azWord[i]); data/fossil-2.13/src/dispatch.c:954: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 nPrefix = zPrefix ? strlen(zPrefix) : 0; data/fossil-2.13/src/doc.c:337: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). zEnd = zList + strlen(zList); data/fossil-2.13/src/doc.c:389: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). z += strlen(z); data/fossil-2.13/src/doc.c:393: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). z += strlen(z); data/fossil-2.13/src/doc.c:447:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(z); data/fossil-2.13/src/encode.c:37:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( n<0 ) n = strlen(zIn); data/fossil-2.13/src/encode.c:102:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( n<0 ) n = strlen(zIn); data/fossil-2.13/src/encode.c:155:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( n<0 ) n = strlen(zIn); data/fossil-2.13/src/encode.c:277: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). if( nIn<0 ) nIn = strlen(zIn); data/fossil-2.13/src/encode.c:498: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). nData = strlen(zData); data/fossil-2.13/src/encode.c:572: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). int n64 = (int)strlen(z64); data/fossil-2.13/src/encode.c:670:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( nIn<0 ) nIn = (int)strlen(zIn); data/fossil-2.13/src/encode.c:743: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). n = strlen(zIn); data/fossil-2.13/src/encode.c:765: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). n = strlen(zIn); data/fossil-2.13/src/event.c:263: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). n = strlen(zComment); data/fossil-2.13/src/event.c:327:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody); data/fossil-2.13/src/event.c:393: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 nId = strlen(zId); data/fossil-2.13/src/event.c:405: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). if( rid && strlen(zId)<HNAME_MIN ){ data/fossil-2.13/src/export.c:316: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). if( !cur_tok || strlen(cur_tok)<2 ){ data/fossil-2.13/src/export.c:346: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). if( !cur_tok || (strlen(cur_tok)!=40 && strlen(cur_tok)!=64) ){ data/fossil-2.13/src/export.c:346:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( !cur_tok || (strlen(cur_tok)!=40 && strlen(cur_tok)!=64) ){ data/fossil-2.13/src/export.c:386: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(line)==100 && line[99]!='\n' ){ data/fossil-2.13/src/export.c:651:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). printf("data %d\n%s\n", (int)strlen(zComment), zComment); data/fossil-2.13/src/export.c:736:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). printf("data %d\n", zValue==NULL?0:(int)strlen(zValue)+1); data/fossil-2.13/src/export.c:1245: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). int n = (int)strlen(zUuid); data/fossil-2.13/src/export.c:1700: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). nCmd = (int)strlen(zCmd); data/fossil-2.13/src/extcgi.c:206:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nRoot = (int)strlen(g.zExtRoot); data/fossil-2.13/src/extcgi.c:208: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). nScript = (int)strlen(zPath); data/fossil-2.13/src/extcgi.c:259:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cgi_replace_parameter("PATH_INFO", zName + strlen(zScript+nRoot+1)); data/fossil-2.13/src/file.c:246: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). nName = strlen(zLinkFile); data/fossil-2.13/src/file.c:355:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i = (int)strlen(zRoot); data/fossil-2.13/src/file.c:393:49: [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( fossil_strnicmp(g.zLocalRoot, zFile, (int)strlen(g.zLocalRoot)) ){ data/fossil-2.13/src/file.c:801: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). nName = strlen(zFilename); data/fossil-2.13/src/file.c:1049:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( n<0 ) n = strlen(z); data/fossil-2.13/src/file.c:1197:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). file_getcwd(zPwd, sizeof(zPwd)-strlen(zOrigName)); data/fossil-2.13/src/file.c:1198:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( zPwd[0]=='/' && strlen(zPwd)==1 ){ data/fossil-2.13/src/file.c:1200:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( zOrigName[0]=='.' && strlen(zOrigName)==1 ){ data/fossil-2.13/src/file.c:1271:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = zColon ? (int)(zColon-zPath) : (int)strlen(zPath); data/fossil-2.13/src/file.c:1415:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( fossil_strnicmp(zRoot,z,(int)strlen(zRoot))!=0 ){ data/fossil-2.13/src/file.c:1532: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). if( slash && i>0 && zPath[strlen(zPath)-1]=='/'){ data/fossil-2.13/src/file.c:1546:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( zPwd[0]=='/' && strlen(zPwd)==1 ){ data/fossil-2.13/src/file.c:1789: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). i = (int)strlen(z)-1; data/fossil-2.13/src/file.c:2525:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( nFilename<0 ) nFilename = (int)strlen(zFilename); data/fossil-2.13/src/forum.c:924:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nContent = zContent ? (int)strlen(zContent) : 0; data/fossil-2.13/src/fshell.c:78: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). n = (int)strlen(zLine); data/fossil-2.13/src/fusefs.c:170:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(fusefs.az[2]); data/fossil-2.13/src/fusefs.c:223: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). int nBase = (int)strlen(zBase); data/fossil-2.13/src/glob.c:113: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). nList = strlen(zPatternList); data/fossil-2.13/src/hook.c:252: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). nCmd = (int)strlen(zCmd); data/fossil-2.13/src/http.c:373: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). j = strlen(zLine) - 1; data/fossil-2.13/src/http_ssl.c:539:10: [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). nCmd = strlen(zCmd); data/fossil-2.13/src/http_ssl.c:551: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). nName = strlen(zName); data/fossil-2.13/src/http_ssl.c:556: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). nName = strlen(zName); data/fossil-2.13/src/http_transport.c:317:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). x = read(sshIn, &zBuf[got], wanted); data/fossil-2.13/src/import.c:86: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). n = strlen(zOrig); data/fossil-2.13/src/import.c:499: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 nName = strlen(zName); data/fossil-2.13/src/import.c:518:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(zName); data/fossil-2.13/src/import.c:594: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). for(i=5; i<strlen(zRefName) && zRefName[i]!='/'; i++){} data/fossil-2.13/src/import.c:751: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). nFrom = strlen(zFrom); data/fossil-2.13/src/import.c:756: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). if( strlen(pFile->zName)>nFrom ){ data/fossil-2.13/src/import.c:774: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). nFrom = strlen(zFrom); data/fossil-2.13/src/import.c:779: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). if( strlen(pFile->zName)>nFrom ){ data/fossil-2.13/src/import.c:1260: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). unsigned nPath = strlen(zPath); data/fossil-2.13/src/import.c:1263: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). int nIgn = strlen(zIgn); data/fossil-2.13/src/import.c:1827: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(zBase)>0 ){ data/fossil-2.13/src/import.c:1828:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( zBase[strlen(zBase)-1]!='/' ){ data/fossil-2.13/src/import.c:1836:23: [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). gsvn.lenTrunk = strlen(zBase); data/fossil-2.13/src/import.c:1846:23: [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). gsvn.lenTrunk = strlen(gsvn.zTrunk); data/fossil-2.13/src/import.c:1847: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). gsvn.lenBranches = strlen(gsvn.zBranches); data/fossil-2.13/src/import.c:1848: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). gsvn.lenTags = strlen(gsvn.zTags); data/fossil-2.13/src/info.c:2247: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). if( zCI && strlen(zCI)==0 ){ zCI = 0; } data/fossil-2.13/src/info.c:2250:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && sqlite3_strnicmp(zCIUuid, zCI, strlen(zCI))!=0 data/fossil-2.13/src/info.c:2292: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). int nName = (int)strlen(zName); data/fossil-2.13/src/info.c:2665:10: [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). nLen = strlen(zName); data/fossil-2.13/src/info.c:3403: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). validate16(zNewColor,strlen(zNewColor)) && data/fossil-2.13/src/info.c:3404:10: [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(zNewColor)==6 || strlen(zNewColor)==3)) ? "#" : "", data/fossil-2.13/src/info.c:3404:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strlen(zNewColor)==6 || strlen(zNewColor)==3)) ? "#" : "", data/fossil-2.13/src/interwiki.c:85:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nPage = (int)strlen(zPage); data/fossil-2.13/src/interwiki.c:188: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). nCmd = (int)strlen(zCmd); data/fossil-2.13/src/json.c:292: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). ? cson_value_new_string(str,strlen(str)) data/fossil-2.13/src/json.c:303: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). v = cson_value_new_string(zStr, strlen(zStr)); data/fossil-2.13/src/json.c:371:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rc = cson_value_new_string(cv,strlen(cv)); data/fossil-2.13/src/json.c:725:57: [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). cson_value * v = cson_value_new_string(zCookie, strlen(zCookie)); data/fossil-2.13/src/json.c:857:59: [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). cson_object_set(obj,"text", cson_value_new_string(msg,strlen(msg))); data/fossil-2.13/src/json.c:912:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). part = cson_value_new_string(zPart, strlen(zPart)); data/fossil-2.13/src/json.c:1056:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). part = cson_value_new_string(arg,strlen(arg)); data/fossil-2.13/src/json.c:1876:69: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define FSET(X,K) cson_object_set( jobj, K, cson_value_new_string(X,strlen(X))) data/fossil-2.13/src/json.c:1938:50: [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). cson_value_new_string(str,strlen(str)) ); data/fossil-2.13/src/json.c:1943:50: [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). cson_value_new_string(str,strlen(str)) ); data/fossil-2.13/src/json.c:2009:71: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define SETBUF(O,K) cson_object_set(O, K, cson_value_new_string(zBuf, strlen(zBuf))); data/fossil-2.13/src/json.c:2071:72: [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). cson_object_set(jo, "compiler", cson_value_new_string(COMPILER_NAME, strlen(COMPILER_NAME))); data/fossil-2.13/src/json.c:2085:75: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cson_object_set(jo2, "journalMode", *zBuf ? cson_value_new_string(zBuf, strlen(zBuf)) : cson_value_null()); data/fossil-2.13/src/json.c:2138:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). blob_append( &cmdNames, zErrPrefix, strlen(zErrPrefix) ); data/fossil-2.13/src/json_artifact.c:420:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( validate16(zName, strlen(zName)) ){ data/fossil-2.13/src/json_dir.c:104: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). nD = zD ? strlen(zD)+1 : 0; data/fossil-2.13/src/json_login.c:131:57: [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). cson_object_set( o, "n", cson_value_new_string(name,strlen(name))); data/fossil-2.13/src/json_login.c:132:55: [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). cson_object_set( o, "p", cson_value_new_string(pw,strlen(pw))); data/fossil-2.13/src/json_login.c:221: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). cson_value_new_string( zCaptcha, strlen(zCaptcha) ) data/fossil-2.13/src/json_login.c:254:50: [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). cson_value_new_string(str,strlen(str)) ); data/fossil-2.13/src/json_login.c:259:50: [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). cson_value_new_string(str,strlen(str)) ); data/fossil-2.13/src/json_timeline.c:488:49: [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). tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))); data/fossil-2.13/src/json_timeline.c:553:79: [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). cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)))); data/fossil-2.13/src/json_timeline.c:609:79: [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). cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql)))); data/fossil-2.13/src/json_timeline.c:680:49: [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). tmp = cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))); data/fossil-2.13/src/json_wiki.c:113:55: [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). json_new_int((cson_int_t)(zBody?strlen(zBody):0))); data/fossil-2.13/src/json_wiki.c:149:23: [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 = zBody ? strlen(zBody) : 0; data/fossil-2.13/src/linenoise.c:272:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(ifd,buf+i,1) != 1) break; data/fossil-2.13/src/linenoise.c:306: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). if (write(ofd,seq,strlen(seq)) == -1) { data/fossil-2.13/src/linenoise.c:366:37: [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). ls->len = ls->pos = strlen(lc.cvec[i]); data/fossil-2.13/src/linenoise.c:376:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(ls->ifd,&c,1); data/fossil-2.13/src/linenoise.c:430: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(str); data/fossil-2.13/src/linenoise.c:482: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 hintlen = strlen(hint); data/fossil-2.13/src/linenoise.c:488:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). abAppend(ab,seq,strlen(seq)); data/fossil-2.13/src/linenoise.c:504: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). size_t plen = strlen(l->prompt); data/fossil-2.13/src/linenoise.c:523: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). abAppend(&ab,seq,strlen(seq)); data/fossil-2.13/src/linenoise.c:525: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). abAppend(&ab,l->prompt,strlen(l->prompt)); data/fossil-2.13/src/linenoise.c:531: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). abAppend(&ab,seq,strlen(seq)); data/fossil-2.13/src/linenoise.c:534: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). abAppend(&ab,seq,strlen(seq)); data/fossil-2.13/src/linenoise.c:545:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int plen = strlen(l->prompt); data/fossil-2.13/src/linenoise.c:563: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). abAppend(&ab,seq,strlen(seq)); data/fossil-2.13/src/linenoise.c:570: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). abAppend(&ab,seq,strlen(seq)); data/fossil-2.13/src/linenoise.c:576: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). abAppend(&ab,seq,strlen(seq)); data/fossil-2.13/src/linenoise.c:579: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). abAppend(&ab,l->prompt,strlen(l->prompt)); data/fossil-2.13/src/linenoise.c:594: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). abAppend(&ab,seq,strlen(seq)); data/fossil-2.13/src/linenoise.c:607: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). abAppend(&ab,seq,strlen(seq)); data/fossil-2.13/src/linenoise.c:617: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). abAppend(&ab,seq,strlen(seq)); data/fossil-2.13/src/linenoise.c:715:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(l->buf,history[history_len - 1 - l->history_index],l->buflen); data/fossil-2.13/src/linenoise.c:717: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). l->len = l->pos = strlen(l->buf); data/fossil-2.13/src/linenoise.c:779: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). l.plen = strlen(prompt); data/fossil-2.13/src/linenoise.c:800:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(l.ifd,&c,1); data/fossil-2.13/src/linenoise.c:870:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(l.ifd,seq,1) == -1) break; data/fossil-2.13/src/linenoise.c:871:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(l.ifd,seq+1,1) == -1) break; data/fossil-2.13/src/linenoise.c:877:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(l.ifd,seq+2,1) == -1) break; data/fossil-2.13/src/linenoise.c:966:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(STDIN_FILENO,&c,1); data/fossil-2.13/src/linenoise.c:1017:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = fgetc(stdin); data/fossil-2.13/src/linenoise.c:1052:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/fossil-2.13/src/linenoise.c:1164:24: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t old_umask = umask(S_IXUSR|S_IRWXG|S_IRWXO); data/fossil-2.13/src/linenoise.c:1169:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(old_umask); data/fossil-2.13/src/login.c:689:55: [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). }else if( zReferer && strncmp(g.zBaseURL, zReferer, strlen(g.zBaseURL))==0 ){ data/fossil-2.13/src/login.c:1165: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). zUri += (int)strlen(g.zTop); data/fossil-2.13/src/login.c:1317:23: [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( nCap<0 ) nCap = strlen(zCap); data/fossil-2.13/src/login.c:1574: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). }else if( strlen(zUserID)<6 ){ data/fossil-2.13/src/login.c:1592: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). }else if( strlen(zPasswd)<6 ){ data/fossil-2.13/src/login.c:2095:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nCmd = (int)strlen(zCmd); data/fossil-2.13/src/main.c:667:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fgetc(stdin); data/fossil-2.13/src/main.c:995: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). nLong = strlen(zLong); data/fossil-2.13/src/main.c:1034:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = (int)strlen(zOption); data/fossil-2.13/src/main.c:1337: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). i = (int)strlen(g.zBaseURL); data/fossil-2.13/src/main.c:1369: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). i = strlen(zCur); data/fossil-2.13/src/main.c:1373: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). g.zTop = &g.zBaseURL[8+strlen(zHost)]; data/fossil-2.13/src/main.c:1377: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). g.zTop = &g.zBaseURL[7+strlen(zHost)]; data/fossil-2.13/src/main.c:1439: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). for(i=strlen(zDir)-1; i>0 && zDir[i]!='/'; i--){} data/fossil-2.13/src/main.c:1637: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). for(j=strlen(zBase)+1, k=0; zRepo[j] && k<i-1; j++, k++){ data/fossil-2.13/src/main.c:2010:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( zName && validate16(zName, strlen(zName)) ){ data/fossil-2.13/src/main.c:2877: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). for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){} data/fossil-2.13/src/makeheaders.c:441: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). nByte = strlen(zSrc); data/fossil-2.13/src/makeheaders.c:444:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(zDest,zSrc,nByte); data/fossil-2.13/src/makeheaders.c:468: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). nByte = strlen(zText); data/fossil-2.13/src/makeheaders.c:479:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&pStr->zText[pStr->nUsed],zText,nByte); data/fossil-2.13/src/makeheaders.c:492: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(z); data/fossil-2.13/src/makeheaders.c:510: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(zName); data/fossil-2.13/src/makeheaders.c:621: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). nId = strlen(zId); data/fossil-2.13/src/makeheaders.c:654: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). nId = strlen(zId); data/fossil-2.13/src/makeheaders.c:734: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). fwrite(zOutput,1,strlen(zOutput),pOut); data/fossil-2.13/src/makeheaders.c:1435:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). StringAppend(&str,zTerm,strlen(zTerm)); data/fossil-2.13/src/makeheaders.c:2073:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nByte += strlen(zPrefix) + 2; data/fossil-2.13/src/makeheaders.c:2185:57: [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). pInclude = SafeMalloc( sizeof(Include) + nArg*2 + strlen(zIf) + 10 ); data/fossil-2.13/src/makeheaders.c:2257:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). PushIfMacro("!",pIf->zCondition,strlen(pIf->zCondition),pIf->nLine,0); data/fossil-2.13/src/makeheaders.c:2496: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). i = strlen(pDecl->zDecl) - 1; data/fossil-2.13/src/makeheaders.c:2871: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). pFile->zHdr, (int)strlen(pFile->zHdr), ""); data/fossil-2.13/src/makeheaders.c:2927: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). int n = strlen(z); data/fossil-2.13/src/makeheaders.c:3032: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). pDecl->zIf ? (int)strlen(pDecl->zIf)+1 : 0, data/fossil-2.13/src/makeheaders.c:3033: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). zDecl ? (int)strlen(zDecl) : 0, data/fossil-2.13/src/makeheaders.c:3202:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(in); data/fossil-2.13/src/makeheaders.c:3205:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(in); data/fossil-2.13/src/makeheaders.c:3213:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(in); data/fossil-2.13/src/manifest.c:933: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). if( validate16(&zName[1], strlen(&zName[1])) ){ data/fossil-2.13/src/manifest.c:1566: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). i = (int)strlen(zName); data/fossil-2.13/src/manifest.c:1901:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = (int)strlen(zValue); data/fossil-2.13/src/manifest.c:2368: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). nWiki = strlen(p->zWiki); data/fossil-2.13/src/manifest.c:2437: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). nWiki = strlen(p->zWiki); data/fossil-2.13/src/md5.c:328: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). nBytes = strlen(zText); data/fossil-2.13/src/merge3.c:371: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). int len = (int)strlen(mergeMarker[0]); data/fossil-2.13/src/merge3.c:374: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). assert( len==(int)strlen(mergeMarker[1]) ); data/fossil-2.13/src/merge3.c:375: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). assert( len==(int)strlen(mergeMarker[2]) ); data/fossil-2.13/src/merge3.c:376: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). assert( len==(int)strlen(mergeMarker[3]) ); data/fossil-2.13/src/merge3.c:478: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 n = strlen(azSubst[j]); data/fossil-2.13/src/miniz.c:3483:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const mz_uint filename_len = (mz_uint)strlen(pFilename); data/fossil-2.13/src/miniz.c:3505: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). name_len = strlen(pName); if (name_len > 0xFFFF) return -1; data/fossil-2.13/src/miniz.c:3506: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). comment_len = pComment ? strlen(pComment) : 0; if (comment_len > 0xFFFF) return -1; data/fossil-2.13/src/miniz.c:4297:23: [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). archive_name_size = strlen(pArchive_name); data/fossil-2.13/src/miniz.c:4432:23: [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). archive_name_size = strlen(pArchive_name); data/fossil-2.13/src/mkbuiltin.c:298: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). nPrefix = (int)strlen(argv[2]); data/fossil-2.13/src/mkbuiltin.c:361: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). nName = (int)strlen(aRes[i].zName); data/fossil-2.13/src/mkbuiltin.c:399: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(z)>=nPrefix ) z += nPrefix; data/fossil-2.13/src/mkindex.c:161:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( n<0 ) n = strlen(zSrc); data/fossil-2.13/src/mkindex.c:164:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(z, zSrc, n); data/fossil-2.13/src/mkindex.c:193: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). int len = strlen(zLabel); data/fossil-2.13/src/mkindex.c:284:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(&zLine[i]); data/fossil-2.13/src/mkindex.c:305: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). len = (int)strlen(z); data/fossil-2.13/src/mkindex.c:320:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && strlen(zLine)<sizeof(zHelp)-nHelp-1 data/fossil-2.13/src/mkindex.c:332:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nHelp += strlen(&zHelp[nHelp]); data/fossil-2.13/src/mkindex.c:445: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). int n = strlen(z); data/fossil-2.13/src/mkindex.c:456:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (int)(29-strlen(aEntry[i].zFunc)), "", data/fossil-2.13/src/mkindex.c:481:42: [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). printf(" { \"%s\",%*s", z, (int)(20-strlen(z)), ""); data/fossil-2.13/src/mkindex.c:483:44: [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). printf(" \"%s\",%*s", zVar, (int)(15-strlen(zVar)), ""); data/fossil-2.13/src/mkindex.c:492: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). zDef, (int)(10-strlen(zDef)), "" data/fossil-2.13/src/mkversion.c:114: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(b); data/fossil-2.13/src/name.c:59:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = (int)strlen(zIn); data/fossil-2.13/src/name.c:124:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = (int)strlen(zDate); data/fossil-2.13/src/name.c:331:10: [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). nTag = strlen(zTag); data/fossil-2.13/src/name.c:339:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nDate = strlen(zDate); data/fossil-2.13/src/name.c:517:10: [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). nLen = strlen(zName); data/fossil-2.13/src/name.c:622: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). canonical16(z, strlen(z)); data/fossil-2.13/src/pikchr.c:4467: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). if( n<0 ) n = (int)strlen(zText); data/fossil-2.13/src/pikchr.c:4501: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). if( n<0 ) n = (int)strlen(zText); data/fossil-2.13/src/pikchr.c:6769: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). dot.aTxt[0].n = (int)strlen(pObj->zName); data/fossil-2.13/src/pikchr.c:7525: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). s.sIn.n = (unsigned int)strlen(zText); data/fossil-2.13/src/printf.c:679:23: [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). length = (int)strlen(bufpt); data/fossil-2.13/src/printf.c:739: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). if( limit<0 ) limit = strlen(escarg); data/fossil-2.13/src/printf.c:767: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). length = strlen(bufpt); data/fossil-2.13/src/printf.c:776: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). length = strlen(bufpt); data/fossil-2.13/src/printf.c:785: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). length = strlen(bufpt); data/fossil-2.13/src/printf.c:794: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). length = strlen(bufpt); data/fossil-2.13/src/printf.c:944:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = (int)strlen(z); data/fossil-2.13/src/purge.c:523:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(zSubcmd); data/fossil-2.13/src/rebuild.c:979: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). cchPathInitial = strlen(zPath); data/fossil-2.13/src/rebuild.c:1078:23: [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). cchUuidAsFilePath = strlen(zUuidAsFilePath); data/fossil-2.13/src/rebuild.c:1143: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). cchFNamePrefix = strlen(zDest); data/fossil-2.13/src/rebuild.c:1343: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). cchFNamePrefix = strlen(zDestDir); data/fossil-2.13/src/regexp.c:161: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). in.mx = nIn>=0 ? nIn : (int)strlen((char const*)zIn); data/fossil-2.13/src/regexp.c:601: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). pRe->sIn.mx = (int)strlen(zIn); data/fossil-2.13/src/regexp.c:712: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). n = (int)strlen(zLine); data/fossil-2.13/src/repolist.c:164: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). int nName = (int)strlen(zName); data/fossil-2.13/src/report.c:111: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). i = strlen(zOrig); data/fossil-2.13/src/report.c:141: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). n = strlen(&zOrig[j]); data/fossil-2.13/src/search.c:1902: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). n = (int)strlen(zSubCmd); data/fossil-2.13/src/security_audit.c:57: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). nAll = (int)strlen(zAll); data/fossil-2.13/src/setup.c:236: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). const int nZQ = (int)strlen(zQ); data/fossil-2.13/src/setup.c:269: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). const int nZQ = (int)strlen(zQ); data/fossil-2.13/src/setup.c:308: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). const int nZQ = (int)strlen(zQ); data/fossil-2.13/src/setup.c:427:72: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. @ positive number. The default is 8766 hours which is approximately equal data/fossil-2.13/src/setupuser.c:385: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(zLogin)==0 ){ data/fossil-2.13/src/setupuser.c:858:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). @ so anybody who can read should be able to login as anonymous. data/fossil-2.13/src/sha1.c:297: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). nBytes = strlen(zText); data/fossil-2.13/src/sha1.c:408:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). SHA1Update(&ctx, (unsigned const char*)zIn, strlen(zIn)); data/fossil-2.13/src/sha1.c:455:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). SHA1Update(&ctx, (unsigned char*)zProjCode, strlen(zProjCode)); data/fossil-2.13/src/sha1.c:457:44: [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). SHA1Update(&ctx, (unsigned char*)zLogin, strlen(zLogin)); data/fossil-2.13/src/sha1.c:459:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). SHA1Update(&ctx, (unsigned const char*)zPw, strlen(zPw)); data/fossil-2.13/src/sha3.c:511: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). nBytes = strlen(zText); data/fossil-2.13/src/sha3.c:615:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). SHA3Update(&ctx, (unsigned const char*)zIn, strlen(zIn)); data/fossil-2.13/src/shell.c:1286:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dirp->d_first.d_name, data.name, NAME_MAX); data/fossil-2.13/src/shell.c:1319:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dirp->d_next.d_name, data.name, NAME_MAX); data/fossil-2.13/src/shell.c:1343:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(entry->d_name, dirp->d_first.d_name, NAME_MAX); data/fossil-2.13/src/shell.c:1363:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(entry->d_name, data.name, NAME_MAX); data/fossil-2.13/src/shell.c:1934:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(zBuf); data/fossil-2.13/src/shell.c:2017: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). n = (int)strlen(z); data/fossil-2.13/src/shell.c:2426: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). int nCopy = (int)strlen(zCopy); data/fossil-2.13/src/shell.c:2955: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). pCur->nBase = (int)strlen(pCur->zBase)+1; data/fossil-2.13/src/shell.c:6100: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). nFile = (int)strlen(zFile)+1; data/fossil-2.13/src/shell.c:7151: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(z)!=10 ) goto parse_error; data/fossil-2.13/src/shell.c:7182:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nA = (int)strlen(zA); data/fossil-2.13/src/shell.c:7305: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). int nDelete = (int)strlen(zDelete); data/fossil-2.13/src/shell.c:7373: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). nPath = (int)strlen(zPath); data/fossil-2.13/src/shell.c:7389: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). nPath = (int)strlen(zPath); data/fossil-2.13/src/shell.c:7795: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). nName = (int)strlen(zName); data/fossil-2.13/src/shell.c:8266: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). #define STRLEN (int)strlen data/fossil-2.13/src/shell.c:11624: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). if( n<0 ) n = (int)strlen(z); data/fossil-2.13/src/shell.c:14501: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). nNL = (int)strlen(zNL); data/fossil-2.13/src/shell.c:14505: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). nCR = (int)strlen(zCR); data/fossil-2.13/src/shell.c:15018:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(p->in); data/fossil-2.13/src/shell.c:15029:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(p->in); data/fossil-2.13/src/shell.c:15065:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(p->in); data/fossil-2.13/src/shell.c:15068:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(p->in); data/fossil-2.13/src/shell.c:15078:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(p->in); data/fossil-2.13/src/shell.c:15108:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(p->in); data/fossil-2.13/src/shell.c:15115:9: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(p->in); data/fossil-2.13/src/shell.c:18439: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). lenPK = (int)strlen(zCollist); data/fossil-2.13/src/shell.c:19022:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(mainPrompt,azArg[1],(int)ArraySize(mainPrompt)-1); data/fossil-2.13/src/shell.c:19025:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(continuePrompt,azArg[2],(int)ArraySize(continuePrompt)-1); data/fossil-2.13/src/shell.c:20185: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). lenOpt = (int)strlen(zOpt); data/fossil-2.13/src/shell.c:20855:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fgetc(stdin); data/fossil-2.13/src/shell.c:20895: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). n = (int)strlen(z); data/fossil-2.13/src/shun.c:73: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). zCanonical = fossil_malloc(strlen(zUuid)+2); data/fossil-2.13/src/shun.c:89: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 nUuid = strlen(p); data/fossil-2.13/src/shun.c:113:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen(p)+1; data/fossil-2.13/src/shun.c:117:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for( p = zUuid ; *p ; p += strlen(p)+1 ){ data/fossil-2.13/src/shun.c:123:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for( p = zUuid ; *p ; p += strlen(p)+1 ){ data/fossil-2.13/src/shun.c:152:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen(p)+1; data/fossil-2.13/src/shun.c:155: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). for( p = zUuid ; *p ; p += strlen(p)+1 ){ data/fossil-2.13/src/shun.c:194: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(zShun) ){ data/fossil-2.13/src/shun.c:221: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(zAccept) ){ data/fossil-2.13/src/smtp.c:679:43: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). @ estate INT, -- 0: Unread, 1: read, 2: trash 3: sent data/fossil-2.13/src/sqlcmd.c:287: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). *pnKey = (int)strlen(zKey); data/fossil-2.13/src/sqlite3.c:19423: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). #define sqlite3Strlen30NN(C) (strlen(C)&0x3fffffff) data/fossil-2.13/src/sqlite3.c:28104: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). n = strlen(z) + 1; data/fossil-2.13/src/sqlite3.c:28983:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pAccum->nChar = 0x7fffffff & (int)strlen(bufpt); data/fossil-2.13/src/sqlite3.c:29003:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = 0x7fffffff & (int)strlen(bufpt); data/fossil-2.13/src/sqlite3.c:31341: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). return 0x3fffffff & (int)strlen(z); data/fossil-2.13/src/sqlite3.c:31353: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). return pCol->zName + strlen(pCol->zName) + 1; data/fossil-2.13/src/sqlite3.c:34048:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { "read", (sqlite3_syscall_ptr)read, 0 }, data/fossil-2.13/src/sqlite3.c:34596:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(zAbsoluteName); data/fossil-2.13/src/sqlite3.c:37311: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). for(ii=(int)strlen(zDirname); ii>0 && zDirname[ii]!='/'; ii--); data/fossil-2.13/src/sqlite3.c:38189:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nShmFilename = 6 + (int)strlen(zBasePath); data/fossil-2.13/src/sqlite3.c:39309: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). nFilename = (int)strlen(zFilename) + 6; data/fossil-2.13/src/sqlite3.c:39712:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert( (flags & SQLITE_OPEN_URI) || zName[strlen(zName)+1]==0 ); data/fossil-2.13/src/sqlite3.c:39725: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). assert( zName[strlen(zName)+1]==0 ); data/fossil-2.13/src/sqlite3.c:40207:30: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. if( microseconds%1000000 ) usleep(microseconds%1000000); data/fossil-2.13/src/sqlite3.c:40503:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dbLen = (int)strlen(dbPath); data/fossil-2.13/src/sqlite3.c:40524: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). len = (int)strlen(lockPath); data/fossil-2.13/src/sqlite3.c:40955:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). writeSize = PROXY_PATHINDEX + strlen(&writeBuffer[PROXY_PATHINDEX]); data/fossil-2.13/src/sqlite3.c:41086: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). int len = (int)strlen(dbPath); /* Length of database filename - dbPath */ data/fossil-2.13/src/sqlite3.c:41112:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert( (int)strlen(conchPath) == len+7 ); data/fossil-2.13/src/sqlite3.c:41162: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). assert( (int)strlen((char*)pFile->lockingContext)<=MAXPATHLEN ); data/fossil-2.13/src/sqlite3.c:41170: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((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX); data/fossil-2.13/src/sqlite3.c:41170:55: [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((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX); data/fossil-2.13/src/sqlite3.c:41174: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). assert( strlen((char*)pFile->lockingContext)<=MAXPATHLEN ); data/fossil-2.13/src/sqlite3.c:56546:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). z += strlen(z)+1; data/fossil-2.13/src/sqlite3.c:56547:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). z += strlen(z)+1; data/fossil-2.13/src/sqlite3.c:77078: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). nByte = 0x7fffffff & (int)strlen(z); data/fossil-2.13/src/sqlite3.c:128445: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). assert( strlen(zBuf) < sizeof(zBuf)-1 ); data/fossil-2.13/src/sqlite3.c:142658: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). assert( zAff==0 || (int)strlen(zAff)>=nEq ); data/fossil-2.13/src/sqlite3.c:165910:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n = strlen(z); data/fossil-2.13/src/sqlite3.c:165934: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). nByte = strlen(zDatabase) + strlen(zJournal) + strlen(zWal) + 10; data/fossil-2.13/src/sqlite3.c:165934: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). nByte = strlen(zDatabase) + strlen(zJournal) + strlen(zWal) + 10; data/fossil-2.13/src/sqlite3.c:165934:50: [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). nByte = strlen(zDatabase) + strlen(zJournal) + strlen(zWal) + 10; data/fossil-2.13/src/sqlite3.c:165936: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). nByte += strlen(azParam[i])+1; data/fossil-2.13/src/sqlite3.c:168400: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). nRet = 2 + (int)strlen(zInput)*2 + 1; data/fossil-2.13/src/sqlite3.c:168685: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). nStr += strlen(zCol) + 1; data/fossil-2.13/src/sqlite3.c:168696: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). int n = (int)strlen(zCol)+1; data/fossil-2.13/src/sqlite3.c:168762: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). assert( strlen(argv[0])==4 ); data/fossil-2.13/src/sqlite3.c:168767: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). nDb = (int)strlen(argv[1]) + 1; data/fossil-2.13/src/sqlite3.c:168768:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nName = (int)strlen(argv[2]) + 1; data/fossil-2.13/src/sqlite3.c:168802: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). && strlen(z)>8 data/fossil-2.13/src/sqlite3.c:168837:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( strlen(zVal)!=4 || sqlite3_strnicmp(zVal, "fts3", 4) ){ data/fossil-2.13/src/sqlite3.c:168863: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). if( (strlen(zVal)!=3 || sqlite3_strnicmp(zVal, "asc", 3)) data/fossil-2.13/src/sqlite3.c:168864: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). && (strlen(zVal)!=4 || sqlite3_strnicmp(zVal, "desc", 4)) data/fossil-2.13/src/sqlite3.c:168902: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). nString += (int)(strlen(z) + 1); data/fossil-2.13/src/sqlite3.c:169027: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). int n = (int)strlen(p->azColumn[iCol]); data/fossil-2.13/src/sqlite3.c:169030: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). if( zNot && n==(int)strlen(zNot) data/fossil-2.13/src/sqlite3.c:173737: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). nDb = (int)strlen(zDb); data/fossil-2.13/src/sqlite3.c:173741: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). nDb = (int)strlen(zDb); data/fossil-2.13/src/sqlite3.c:173749:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nFts3 = (int)strlen(zFts3); data/fossil-2.13/src/sqlite3.c:174074: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). pCsr->filter.nTerm = (int)strlen(pCsr->filter.zTerm); data/fossil-2.13/src/sqlite3.c:174081: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). pCsr->nStop = (int)strlen(pCsr->zStop); data/fossil-2.13/src/sqlite3.c:174730: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). int nStr = (int)strlen(zStr); data/fossil-2.13/src/sqlite3.c:175190: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). n = (int)strlen(z); data/fossil-2.13/src/sqlite3.c:175599: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( nKey<=0 ) nKey = (int) strlen(z); data/fossil-2.13/src/sqlite3.c:175990: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). c->nInput = (int)strlen(zInput); data/fossil-2.13/src/sqlite3.c:176452: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). *pnOut = i = (int)strlen(z); data/fossil-2.13/src/sqlite3.c:176730:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). zEnd = &zCopy[strlen(zCopy)]; data/fossil-2.13/src/sqlite3.c:176740:68: [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). m = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash,z,(int)strlen(z)+1); data/fossil-2.13/src/sqlite3.c:177150: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). int i, n = (int)strlen(argv[1]); data/fossil-2.13/src/sqlite3.c:177202: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). c->nBytes = (int)strlen(pInput); data/fossil-2.13/src/sqlite3.c:177394: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 nName = (int)strlen(zName); data/fossil-2.13/src/sqlite3.c:177432: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). nByte += (int)(strlen(argv[i]) + 1); data/fossil-2.13/src/sqlite3.c:177441: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). int n = (int)strlen(argv[i]); data/fossil-2.13/src/sqlite3.c:183701: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). sqlite3_int64 nStr = strlen(zMatchinfo); data/fossil-2.13/src/sqlite3.c:184171: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). nAppend = (int)strlen(zAppend); data/fossil-2.13/src/sqlite3.c:185551: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). int n = (int)strlen(z); data/fossil-2.13/src/sqlite3.c:185606:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pCsr->nInput = (int)strlen(aInput); data/fossil-2.13/src/sqlite3.c:186377: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). p->nUsed += (int)strlen(p->zBuf+p->nUsed); data/fossil-2.13/src/sqlite3.c:188390:44: [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). jsonAppendRaw(&x, p->zRoot, (int)strlen(p->zRoot)); data/fossil-2.13/src/sqlite3.c:190611:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). || (idxStr && (int)strlen(idxStr)==argc*2) ); data/fossil-2.13/src/sqlite3.c:192472: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). nDb = (int)strlen(argv[1]); data/fossil-2.13/src/sqlite3.c:192473:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nName = (int)strlen(argv[2]); data/fossil-2.13/src/sqlite3.c:194344: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). nDb = strlen(argv[1]); data/fossil-2.13/src/sqlite3.c:194345: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). nName = strlen(argv[2]); data/fossil-2.13/src/sqlite3.c:195716: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(argv[0])+1; data/fossil-2.13/src/sqlite3.c:195772: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). nInput = strlen(zInput); data/fossil-2.13/src/sqlite3.c:197481: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). if( strlen(zIn)>4 && memcmp("data", zIn, 4)==0 ){ data/fossil-2.13/src/sqlite3.c:197637: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). size_t nCopy = strlen(zStr) + 1; data/fossil-2.13/src/sqlite3.c:198425: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). if( (int)strlen(zMask)!=pIter->nTblCol ){ data/fossil-2.13/src/sqlite3.c:199386: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). if( strlen(p->zRbu)>=5 && 0==memcmp("file:", p->zRbu, 5) ){ data/fossil-2.13/src/sqlite3.c:199471: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). sz = (int)strlen(z)&0xffffff; data/fossil-2.13/src/sqlite3.c:200480: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_t nTarget = zTarget ? strlen(zTarget) : 0; data/fossil-2.13/src/sqlite3.c:200481:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t nRbu = strlen(zRbu); data/fossil-2.13/src/sqlite3.c:200662: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). int n = strlen(zState); data/fossil-2.13/src/sqlite3.c:200691: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). size_t nErrmsg = strlen(p->zErrmsg); data/fossil-2.13/src/sqlite3.c:201533: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). nCopy = strlen(zBase); data/fossil-2.13/src/sqlite3.c:201778: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). nName = strlen(zName); data/fossil-2.13/src/sqlite3.c:205458: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). sessionAppendBlob(pBuf, (u8 *)pTab->zName, (int)strlen(pTab->zName)+1, pRc); data/fossil-2.13/src/sqlite3.c:207008:53: [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). sessionAppendBlob(&p->rebase, (u8*)zTab, (int)strlen(zTab)+1, &rc); data/fossil-2.13/src/sqlite3.c:207491: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). nTab = (int)strlen(zTab); data/fossil-2.13/src/sqlite3.c:207943:23: [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 nNew = (int)strlen(zNew); data/fossil-2.13/src/sqlite3.c:208391:53: [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). sessionAppendBlob(&sOut,(u8*)pIter->zTab,(int)strlen(pIter->zTab)+1,&rc); data/fossil-2.13/src/sqlite3.c:211664: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( n<0 ) n = (int)strlen(z); data/fossil-2.13/src/sqlite3.c:212328: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 nStr = (int)strlen(zStr); data/fossil-2.13/src/sqlite3.c:212522: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). nIn = (int)strlen(pIn); data/fossil-2.13/src/sqlite3.c:212855: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 nEnum = (int)strlen(zEnum); data/fossil-2.13/src/sqlite3.c:212887: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 nCmd = (int)strlen(zCmd); data/fossil-2.13/src/sqlite3.c:212943: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). sqlite3_int64 nArg = strlen(zArg) + 1; data/fossil-2.13/src/sqlite3.c:213071:23: [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). sqlite3_int64 nIn = strlen(zIn); data/fossil-2.13/src/sqlite3.c:213908: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). i64 nText = strlen(zText); data/fossil-2.13/src/sqlite3.c:214523:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pExpr->pIndex, p->zTerm, (int)strlen(p->zTerm), data/fossil-2.13/src/sqlite3.c:215387: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). n = (int)strlen(z); data/fossil-2.13/src/sqlite3.c:215467:66: [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). rc = fts5ParseTokenize((void*)&sCtx, tflags, zTerm, (int)strlen(zTerm), data/fossil-2.13/src/sqlite3.c:216028: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). nByte += (int)strlen(pTerm->zTerm) * 2 + 3 + 2; data/fossil-2.13/src/sqlite3.c:216520: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). int nTerm = (int)strlen(pTerm->zTerm); data/fossil-2.13/src/sqlite3.c:216839: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). (int)strlen(fts5EntryKey(p))); data/fossil-2.13/src/sqlite3.c:217161:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert( p->nKey+1==(int)strlen(zKey) ); data/fossil-2.13/src/sqlite3.c:217211: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). int nTerm = (int)strlen(zKey); data/fossil-2.13/src/sqlite3.c:219162:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sqlite3Fts5BufferSet(&p->rc,&pIter->term, (int)strlen(zTerm), (u8*)zTerm); data/fossil-2.13/src/sqlite3.c:219242:55: [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). sqlite3Fts5BufferSet(&p->rc, &pIter->term, (int)strlen(zTerm), data/fossil-2.13/src/sqlite3.c:219691: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). n = (z ? (int)strlen((const char*)z) : 0); data/fossil-2.13/src/sqlite3.c:221759:44: [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). fts5WriteAppendTerm(p, &writer, (int)strlen(zTerm), (const u8*)zTerm); data/fossil-2.13/src/sqlite3.c:224459: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). idxStr += strlen(&idxStr[iIdxStr]); data/fossil-2.13/src/sqlite3.c:224470: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). idxStr += strlen(&idxStr[iIdxStr]); data/fossil-2.13/src/sqlite3.c:226461: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). nName = strlen(zName) + 1; data/fossil-2.13/src/sqlite3.c:226499: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). nName = strlen(zName) + 1; data/fossil-2.13/src/sqlite3.c:227083: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). iOff = (int)strlen(zDefn); data/fossil-2.13/src/sqlite3.c:227086: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). iOff += (int)strlen(&zDefn[iOff]); data/fossil-2.13/src/sqlite3.c:228191:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = (int)strlen(z); data/fossil-2.13/src/sqlite3.c:228568: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). assert( strlen(p->zSuffix)==p->nSuffix ); data/fossil-2.13/src/sqlite3.c:228569: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). assert( strlen(p->zOutput)==p->nOutput ); data/fossil-2.13/src/sqlite3.c:230658: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). bDb = (argc==6 && strlen(argv[1])==4 && memcmp("temp", argv[1], 4)==0); data/fossil-2.13/src/sqlite3.c:230668: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 nDb = (int)strlen(zDb)+1; data/fossil-2.13/src/sqlite3.c:230669: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). int nTab = (int)strlen(zTab)+1; data/fossil-2.13/src/stash.c:581:10: [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). nCmd = strlen(zCmd); data/fossil-2.13/src/statrep.c:164: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). strlen(zTimeframe), data/fossil-2.13/src/statrep.c:592: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). if( zYear==0 || strlen(zYear)!=4 ){ data/fossil-2.13/src/style.c:938: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). int selectorLen = (int)strlen(zSelector); data/fossil-2.13/src/sync.c:424: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). nArg = (int)strlen(zArg); data/fossil-2.13/src/tag.c:336: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). if( validate16(zTagname, strlen(zTagname)) ){ data/fossil-2.13/src/tag.c:457: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). n = strlen(g.argv[2]); data/fossil-2.13/src/tag.c:559: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 l = strlen(zTagType); data/fossil-2.13/src/tag.c:678: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). blob_append(&value, zUuid, strlen(zUuid)); data/fossil-2.13/src/tar.c:241: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 blen = strlen(zField) + nValue + 3; data/fossil-2.13/src/tar.c:374: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 nName = strlen(zName); data/fossil-2.13/src/tar.c:742:10: [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). nRid = strlen(zRid); data/fossil-2.13/src/tar.c:747: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). nName = strlen(zName); data/fossil-2.13/src/tar.c:755: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). for(nName=strlen(zName)-1; nName>5; nName--){ data/fossil-2.13/src/th_main.c:388: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). if( n<0 ) n = strlen(z); data/fossil-2.13/src/th_main.c:391: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). n = strlen(z); data/fossil-2.13/src/th_main.c:2089: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(urlData.path)>0 && zParams!=argv[nArg] ){ data/fossil-2.13/src/th_main.c:2356:44: [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). Th_SetVar(g.interp, zName, -1, zValue, strlen(zValue)); data/fossil-2.13/src/th_main.c:2369:44: [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). Th_SetVar(g.interp, zName, -1, zValue, strlen(zValue)); data/fossil-2.13/src/th_main.c:2430:42: [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). Th_SetVar(g.interp, zName, -1, zValue, strlen(zValue)); data/fossil-2.13/src/timeline.c:881: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(zIn)!=7 || zIn[0]!='#' ) return zIn; data/fossil-2.13/src/timeline.c:1574:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = (int)strlen(zIn); data/fossil-2.13/src/timeline.c:2222: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). if( strlen(zYearWeek)==7 ){ data/fossil-2.13/src/timeline.c:2702: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). n = strlen(zPrefix); data/fossil-2.13/src/timeline.c:2712: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). n = strlen(zPrefix); data/fossil-2.13/src/timeline.c:2716:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n += strlen(zPrefix+n); data/fossil-2.13/src/timeline.c:2720:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n += strlen(zPrefix+n); data/fossil-2.13/src/timeline.c:2808:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(z)==10 data/fossil-2.13/src/timeline.c:2924: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). k = strlen(g.argv[2]); data/fossil-2.13/src/timeline.c:2951: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). k = strlen(zOrigin); data/fossil-2.13/src/tkt.c:503: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(zName); data/fossil-2.13/src/tkt.c:747: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). || strlen(aField[i].zValue)!=nValue data/fossil-2.13/src/tkt.c:875: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). if( zName==0 || (nName = strlen(zName))<4 || nName>HNAME_LEN_SHA1 data/fossil-2.13/src/tkt.c:1042:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). canonical16(zGlobPattern, strlen(zGlobPattern)); data/fossil-2.13/src/tkt.c:1316: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). if( zTktUuid && (strlen(zTktUuid)!=40 || !validate16(zTktUuid,40)) ){ data/fossil-2.13/src/tkt.c:1330: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). n = strlen(g.argv[2]); data/fossil-2.13/src/tkt.c:1339: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). n = strlen(g.argv[3]); data/fossil-2.13/src/tkt.c:1545:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). zValue = db_conceal(zValue, strlen(zValue)); data/fossil-2.13/src/tkt.c:1549:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). aField[i].zName, strlen(zValue), zValue); data/fossil-2.13/src/translate.c:120:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). i += strlen(&zLine[i]); data/fossil-2.13/src/unversioned.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). nCmd = (int)strlen(zCmd); data/fossil-2.13/src/update.c:404: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). assert( strlen(g.zLocalRoot)>0 ); data/fossil-2.13/src/update.c:405: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). assert( g.zLocalRoot[strlen(g.zLocalRoot)-1]=='/' ); data/fossil-2.13/src/url.c:186: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). n = strlen(pUrlData->name); data/fossil-2.13/src/user.c:76:37: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). zPwd[i] = useGetch ? _getch() : getc(stdin); data/fossil-2.13/src/user.c:78:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). zPwd[i] = getc(stdin); data/fossil-2.13/src/user.c:170: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). assert( nA==(int)strlen((char*)zA) ); data/fossil-2.13/src/user.c:210:65: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ** passphrase as a single line on stdout. This function will read the data/fossil-2.13/src/user.c:322: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). int n = (int)strlen(z); data/fossil-2.13/src/user.c:366: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). n = strlen(g.argv[2]); data/fossil-2.13/src/utf8.c:154: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). nIn = n = strlen(zIn); data/fossil-2.13/src/util.c:329: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(zLine); data/fossil-2.13/src/util.c:381:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( nByte<0 ) nByte = strlen(zB); data/fossil-2.13/src/util.c:393: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). nByte = strlen(zB); data/fossil-2.13/src/util.c:562: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). int sz = zSym ? (int)strlen(zSym) : 0; data/fossil-2.13/src/vfile.c:58:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sz = strlen(zUuid); data/fossil-2.13/src/vfile.c:295:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nRepos = strlen(g.zLocalRoot); data/fossil-2.13/src/vfile.c:417:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(azTemp[i]); data/fossil-2.13/src/webmail.c:129: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 nName = (int)strlen(zName); data/fossil-2.13/src/wiki.c:1845:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nETime = strlen(zETime); data/fossil-2.13/src/wiki.c:1865: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(zETime)>4) { data/fossil-2.13/src/wiki.c:1971: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). n = strlen(g.argv[2]); data/fossil-2.13/src/wiki.c:2032: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). for(i=strlen(zBody); i>0 && fossil_isspace(zBody[i-1]); i--){} data/fossil-2.13/src/wikiformat.c:896: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). n = strlen(z); data/fossil-2.13/src/wikiformat.c:958:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). j = (int)strlen(zTag); data/fossil-2.13/src/wikiformat.c:1080: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). int n = strlen(z); data/fossil-2.13/src/wikiformat.c:1099:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = (int)strlen(zUuid); data/fossil-2.13/src/wikiformat.c:1125: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). n = strlen(zTarget); data/fossil-2.13/src/wikiformat.c:1277: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(zTarget)<=HNAME_MAX && is_ticket(zTarget, &isClosed) ){ data/fossil-2.13/src/wikiformat.c:1325: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). }else if( strlen(zTarget)>=10 && fossil_isdigit(zTarget[0]) && zTarget[4]=='-' data/fossil-2.13/src/wikiformat.c:1348: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). assert( strlen(zTerm)<nClose ); data/fossil-2.13/src/wikiformat.c:1388:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). i += (int)strlen(z+i); data/fossil-2.13/src/wikiformat.c:1414:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pikchr_to_html(p->pOut, z, i, zClass, (int)strlen(zClass)); data/fossil-2.13/src/wikiformat.c:2180:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nAttr = (int)strlen(zAttr); data/fossil-2.13/src/winfile.c:292:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(zBuf, zUtf8, nBuf); data/fossil-2.13/src/winhttp.c:407: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). fwrite(zCmd, 1, strlen(zCmd), aux); data/fossil-2.13/src/winhttp.c:1038: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). n = strlen(zMethod); data/fossil-2.13/src/winhttp.c:1076: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). if( strncmp(zStart, "auto", strlen(zStart))==0 ){ data/fossil-2.13/src/winhttp.c:1078:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). }else if( strncmp(zStart, "manual", strlen(zStart))==0 ){ data/fossil-2.13/src/zip.c:189: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). int n = strlen(zIn); data/fossil-2.13/src/zip.c:279: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). nameLen = (int)strlen(zName); data/fossil-2.13/src/zip.c:388: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 nName = (int)strlen(zName); data/fossil-2.13/src/zip.c:901: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). nName = strlen(zName); data/fossil-2.13/src/zip.c:903:10: [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). nRid = strlen(zRid); data/fossil-2.13/src/zip.c:925: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). for(nName=strlen(zName)-1; nName>5; nName--){ data/fossil-2.13/tools/decode-email.c:106: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). n = (int)strlen(zLine); data/fossil-2.13/win/include/dirent.h:373:17: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = wcslen(dirname); ANALYSIS SUMMARY: Hits = 2493 Lines analyzed = 477339 in approximately 13.89 seconds (34370 lines/second) Physical Source Lines of Code (SLOC) = 310574 Hits@level = [0] 881 [1] 676 [2] 1613 [3] 41 [4] 149 [5] 14 Hits@level+ = [0+] 3374 [1+] 2493 [2+] 1817 [3+] 204 [4+] 163 [5+] 14 Hits/KSLOC@level+ = [0+] 10.8638 [1+] 8.02707 [2+] 5.85046 [3+] 0.656848 [4+] 0.524835 [5+] 0.0450778 Dot directories skipped = 3 (--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.