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/sqlite-2.8.17/src/copy.c Examining data/sqlite-2.8.17/src/attach.c Examining data/sqlite-2.8.17/src/auth.c Examining data/sqlite-2.8.17/src/btree.c Examining data/sqlite-2.8.17/src/btree.h Examining data/sqlite-2.8.17/src/build.c Examining data/sqlite-2.8.17/src/date.c Examining data/sqlite-2.8.17/src/delete.c Examining data/sqlite-2.8.17/src/expr.c Examining data/sqlite-2.8.17/src/func.c Examining data/sqlite-2.8.17/src/hash.c Examining data/sqlite-2.8.17/src/hash.h Examining data/sqlite-2.8.17/src/insert.c Examining data/sqlite-2.8.17/src/main.c Examining data/sqlite-2.8.17/src/os.c Examining data/sqlite-2.8.17/src/os.h Examining data/sqlite-2.8.17/src/pager.c Examining data/sqlite-2.8.17/src/pager.h Examining data/sqlite-2.8.17/src/pragma.c Examining data/sqlite-2.8.17/src/printf.c Examining data/sqlite-2.8.17/src/random.c Examining data/sqlite-2.8.17/src/select.c Examining data/sqlite-2.8.17/src/sqliteInt.h Examining data/sqlite-2.8.17/src/table.c Examining data/sqlite-2.8.17/src/test1.c Examining data/sqlite-2.8.17/src/test2.c Examining data/sqlite-2.8.17/src/test3.c Examining data/sqlite-2.8.17/src/test4.c Examining data/sqlite-2.8.17/src/tokenize.c Examining data/sqlite-2.8.17/src/trigger.c Examining data/sqlite-2.8.17/src/update.c Examining data/sqlite-2.8.17/src/util.c Examining data/sqlite-2.8.17/src/vacuum.c Examining data/sqlite-2.8.17/src/vdbe.c Examining data/sqlite-2.8.17/src/vdbe.h Examining data/sqlite-2.8.17/src/vdbeInt.h Examining data/sqlite-2.8.17/src/vdbeaux.c Examining data/sqlite-2.8.17/src/where.c Examining data/sqlite-2.8.17/src/btree_rb.c Examining data/sqlite-2.8.17/src/encode.c Examining data/sqlite-2.8.17/src/shell.c Examining data/sqlite-2.8.17/src/tclsqlite.c Examining data/sqlite-2.8.17/src/md5.c Examining data/sqlite-2.8.17/test/crashtest1.c Examining data/sqlite-2.8.17/test/threadtest1.c Examining data/sqlite-2.8.17/test/threadtest2.c Examining data/sqlite-2.8.17/tool/diffdb.c Examining data/sqlite-2.8.17/tool/lempar.c Examining data/sqlite-2.8.17/tool/showdb.c Examining data/sqlite-2.8.17/tool/showjournal.c Examining data/sqlite-2.8.17/tool/lemon.c FINAL RESULTS: data/sqlite-2.8.17/src/btree.c:847: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(pP1->zMagic, zMagicHeader); data/sqlite-2.8.17/src/build.c:849: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(zStmt, p->iDb==1 ? "CREATE TEMP TABLE " : "CREATE TABLE "); data/sqlite-2.8.17/src/build.c:854: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(&zStmt[k], zSep); data/sqlite-2.8.17/src/build.c:859: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(&zStmt[k], zEnd); data/sqlite-2.8.17/src/build.c:1600: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(pIndex->zName, zName); data/sqlite-2.8.17/src/func.c:544: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(p->z, argv[0]); data/sqlite-2.8.17/src/insert.c:805: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(zErrMsg, pIdx->nColumn>1 ? "columns " : "column "); data/sqlite-2.8.17/src/insert.c:819:13: [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(&zErrMsg[n1], zCol); data/sqlite-2.8.17/src/insert.c:823: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(&zErrMsg[n1], data/sqlite-2.8.17/src/os.c:99:27: [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 TRACE1(X) fprintf(stderr,X) data/sqlite-2.8.17/src/os.c:100:27: [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 TRACE2(X,Y) fprintf(stderr,X,Y) data/sqlite-2.8.17/src/os.c:101:27: [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 TRACE3(X,Y,Z) fprintf(stderr,X,Y,Z) data/sqlite-2.8.17/src/os.c:102:27: [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 TRACE4(X,Y,Z,A) fprintf(stderr,X,Y,Z,A) data/sqlite-2.8.17/src/os.c:103:27: [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 TRACE5(X,Y,Z,A,B) fprintf(stderr,X,Y,Z,A,B) data/sqlite-2.8.17/src/os.c:408:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return access(zFilename, 0)==0; data/sqlite-2.8.17/src/os.c:414:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return access(zFilename, 0)==0; data/sqlite-2.8.17/src/os.c:592: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(zFilename, 0)==0 ){ data/sqlite-2.8.17/src/os.c:813: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. if( access(azDirs[i], 07) ) continue; data/sqlite-2.8.17/src/os.c:818:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(zBuf, "%s/"TEMP_FILE_PREFIX, zDir); data/sqlite-2.8.17/src/os.c:825: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. }while( access(zBuf,0)==0 ); data/sqlite-2.8.17/src/os.c:844:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(zBuf, "%s\\"TEMP_FILE_PREFIX, zDir); data/sqlite-2.8.17/src/os.c:879: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(zTempPath, zdirName); data/sqlite-2.8.17/src/os.c:893:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(zBuf, "%s"TEMP_FILE_PREFIX, zDir); data/sqlite-2.8.17/src/pager.c:36:47: [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 TRACE1(X) if( pPager==mainPager ) fprintf(stderr,X) data/sqlite-2.8.17/src/pager.c:37:47: [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 TRACE2(X,Y) if( pPager==mainPager ) fprintf(stderr,X,Y) data/sqlite-2.8.17/src/pager.c:38:47: [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 TRACE3(X,Y,Z) if( pPager==mainPager ) fprintf(stderr,X,Y,Z) data/sqlite-2.8.17/src/pager.c:964: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(pPager->zFilename, zFullPathname); data/sqlite-2.8.17/src/pager.c:965: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(pPager->zDirectory, zFullPathname); data/sqlite-2.8.17/src/pager.c:968: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(pPager->zJournal, zFullPathname); data/sqlite-2.8.17/src/shell.c:763:10: [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(p->outfile,azArg[1]); data/sqlite-2.8.17/src/shell.c:1044: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(zSql, zLine); data/sqlite-2.8.17/src/shell.c:1054: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(&zSql[nSql], zLine); data/sqlite-2.8.17/src/shell.c:1120:13: [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). if( z ) strcpy(z, home_dir); data/sqlite-2.8.17/src/shell.c:1151:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(zBuf,"%s/.sqliterc",home_dir); data/sqlite-2.8.17/src/shell.c:1339:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(zHistory,"%s/.sqlite_history", zHome); data/sqlite-2.8.17/src/table.c:82: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(z, colv[i]); data/sqlite-2.8.17/src/table.c:106: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(z, argv[i]); data/sqlite-2.8.17/src/tclsqlite.c:108: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(cbData->azColName[i], Tcl_DStringValue(&dCol)); data/sqlite-2.8.17/src/tclsqlite.c:552: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(pDb->zAuth, zAuth); data/sqlite-2.8.17/src/tclsqlite.c:590: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(pDb->zBusy, zBusy); data/sqlite-2.8.17/src/tclsqlite.c:627: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(pDb->zProgress, zProgress); data/sqlite-2.8.17/src/tclsqlite.c:717: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(pDb->zCommit, zCommit); data/sqlite-2.8.17/src/tclsqlite.c:861: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(pFunc->zScript, zScript); data/sqlite-2.8.17/src/tclsqlite.c:973: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(pDb->zTrace, zTrace); data/sqlite-2.8.17/src/test1.c:34:7: [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. if( sscanf(zA, PTR_FMT, (void**)ppDb)!=1 && data/sqlite-2.8.17/src/test1.c:35:36: [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. (zA[0]!='0' || zA[1]!='x' || sscanf(&zA[2], PTR_FMT, (void**)ppDb)!=1) data/sqlite-2.8.17/src/test1.c:47:7: [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. if( sscanf(zArg, PTR_FMT, (void**)ppVm)!=1 ){ data/sqlite-2.8.17/src/test1.c:69:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(zPtr, PTR_FMT, p); data/sqlite-2.8.17/src/test1.c:70:7: [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. if( sscanf(zPtr, PTR_FMT, &p2)!=1 || p2!=p ){ data/sqlite-2.8.17/src/test1.c:71:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(zPtr, "0x" PTR_FMT, p); data/sqlite-2.8.17/src/test1.c:72:9: [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. if( sscanf(zPtr, PTR_FMT, &p2)!=1 || p2!=p ){ data/sqlite-2.8.17/src/util.c:215: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(zNew, *pz); data/sqlite-2.8.17/src/util.c:227:14: [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). if( zNew ) strcpy(zNew, z); data/sqlite-2.8.17/src/util.c:311:14: [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). if( zNew ) strcpy(zNew, z); data/sqlite-2.8.17/src/util.c:354: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(zResult, z); data/sqlite-2.8.17/src/vacuum.c:233: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(zTemp, zFilename); data/sqlite-2.8.17/test/crashtest1.c:36: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("./test.db-journal",0)==0 ){ data/sqlite-2.8.17/test/crashtest1.c:38:5: [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. system("cp test.db test.db-saved"); data/sqlite-2.8.17/test/crashtest1.c:40:5: [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. system("cp test.db-journal test.db-journal-saved"); data/sqlite-2.8.17/tool/lemon.c:1283:3: [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. vsnprintf(errmsg,sizeof errmsg,format,ap); data/sqlite-2.8.17/tool/lemon.c:2505: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(name,lemp->filename); data/sqlite-2.8.17/tool/lemon.c:2508:3: [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(name,suffix); data/sqlite-2.8.17/tool/lemon.c:2713: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. extern int access(); data/sqlite-2.8.17/tool/lemon.c:2724:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. if( path ) sprintf(path,"%s/%s",argv0,name); data/sqlite-2.8.17/tool/lemon.c:2737:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path,"%s/%s",pathlist,name); data/sqlite-2.8.17/tool/lemon.c:2741: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. if( access(path,modemask)==0 ) break; data/sqlite-2.8.17/tool/lemon.c:2821: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(buf,004)==0 ){ data/sqlite-2.8.17/tool/lemon.c:2823: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. }else if( access(templatename,004)==0 ){ data/sqlite-2.8.17/tool/lemon.c:2825: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. }else if( access("/usr/share/lemon/lempar.c",004)==0 ){ data/sqlite-2.8.17/tool/lemon.c:3089: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(types[hash],stddt); data/sqlite-2.8.17/tool/lemon.c:3735: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(z,y); data/sqlite-2.8.17/src/os.c:1730:7: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&cs); data/sqlite-2.8.17/src/os.c:1736:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&cs); data/sqlite-2.8.17/src/shell.c:1106: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/sqlite-2.8.17/src/shell.c:1108: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. home_dir = getenv("HOMEPATH"); /* Windows? */ data/sqlite-2.8.17/test/crashtest1.c:50:3: [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(getpid()); data/sqlite-2.8.17/tool/lemon.c:2727: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. extern char *getenv(); data/sqlite-2.8.17/tool/lemon.c:2728: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. pathlist = getenv("PATH"); data/sqlite-2.8.17/src/attach.c:77: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(aNew, db->aDb, sizeof(db->aDb[0])*2); data/sqlite-2.8.17/src/btree.c:144:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zMagic[MAGIC_SIZE]; /* String that identifies the file as a database */ data/sqlite-2.8.17/src/btree.c:246:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char aPayload[MX_LOCAL_PAYLOAD]; /* Key and data */ data/sqlite-2.8.17/src/btree.c:279:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char aPayload[OVERFLOW_SIZE]; data/sqlite-2.8.17/src/btree.c:323: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 aDisk[SQLITE_PAGE_SIZE]; /* Page data stored on disk */ data/sqlite-2.8.17/src/btree.c:424:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char newPage[SQLITE_USABLE_SIZE]; data/sqlite-2.8.17/src/btree.c:430: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(newPage, pPage->u.aDisk, pc); data/sqlite-2.8.17/src/btree.c:441: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(&newPage[pc], pCell, n); data/sqlite-2.8.17/src/btree.c:446: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(pPage->u.aDisk, newPage, pc); data/sqlite-2.8.17/src/btree.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(pTempCur, pCur, sizeof(*pCur)); data/sqlite-2.8.17/src/btree.c:1189: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, &aPayload[offset], a); data/sqlite-2.8.17/src/btree.c:1214: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, &pOvfl->aPayload[offset], a); data/sqlite-2.8.17/src/btree.c:1959: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(pSpace, pPayload, n); data/sqlite-2.8.17/src/btree.c:2071: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(&pPage->u.aDisk[idx], pCell, sz); data/sqlite-2.8.17/src/btree.c:2106: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->u.aDisk, pFrom->u.aDisk, SQLITE_USABLE_SIZE); data/sqlite-2.8.17/src/btree.c:2237: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, pChild, SQLITE_USABLE_SIZE); data/sqlite-2.8.17/src/btree.c:2402: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(&aTemp[i], apDiv[i], szCell[nCell]); data/sqlite-2.8.17/src/btree.c:2916: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, pOvfl, SQLITE_USABLE_SIZE); data/sqlite-2.8.17/src/btree.c:2959: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(pPage, pPageFrom, SQLITE_USABLE_SIZE); data/sqlite-2.8.17/src/btree.c:3040:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char range[20]; data/sqlite-2.8.17/src/btree.c:3041: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 payload[20]; data/sqlite-2.8.17/src/btree.c:3052: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(range,"%d..%d", idx, idx+sz-1); data/sqlite-2.8.17/src/btree.c:3055: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(payload, pCell->aPayload, sz); data/sqlite-2.8.17/src/btree.c:3081: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(range,"%d..%d", idx, idx+p->iSize-1); data/sqlite-2.8.17/src/btree.c:3194: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/sqlite-2.8.17/src/btree.c:3195: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(zBuf, "invalid page number %d", iPage); data/sqlite-2.8.17/src/btree.c:3200: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/sqlite-2.8.17/src/btree.c:3201: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(zBuf, "2nd reference to page %d", iPage); data/sqlite-2.8.17/src/btree.c:3220:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/btree.c:3224: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(zMsg, "%d pages missing from overflow list", N+1); data/sqlite-2.8.17/src/btree.c:3230: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(zMsg, "failed to get page %d", iPage); data/sqlite-2.8.17/src/btree.c:3298:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/btree.c:3299:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zContext[100]; data/sqlite-2.8.17/src/btree.c:3300:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hit[SQLITE_USABLE_SIZE]; data/sqlite-2.8.17/src/btree.c:3307: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(zContext, "On tree page %d: ", iPage); data/sqlite-2.8.17/src/btree.c:3309: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(zMsg, "unable to get the page. error code=%d", rc); data/sqlite-2.8.17/src/btree.c:3314: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(zMsg, "initPage() returns error code %d", rc); data/sqlite-2.8.17/src/btree.c:3325: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(zKey1, zLowerBound, nLower); data/sqlite-2.8.17/src/btree.c:3340: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(zContext, "On page %d cell %d: ", iPage, i); data/sqlite-2.8.17/src/btree.c:3368: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(zContext, "On page %d at right child: ", iPage); data/sqlite-2.8.17/src/btree.c:3390: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(zMsg, "Unused space at byte %d of page %d", i, iPage); data/sqlite-2.8.17/src/btree.c:3394: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(zMsg, "Multiple uses for byte %d of page %d", i, iPage); data/sqlite-2.8.17/src/btree.c:3404: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(zMsg, "free space (%d) greater than max (%d)", pPage->nFree, data/sqlite-2.8.17/src/btree.c:3461: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/sqlite-2.8.17/src/btree.c:3462: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(zBuf, "Page %d is never used", i); data/sqlite-2.8.17/src/btree.c:3471: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/sqlite-2.8.17/src/btree.c:3472: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(zBuf, data/sqlite-2.8.17/src/btree.c:3507: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(pBtTo->page1, pBtFrom->page1, SQLITE_USABLE_SIZE); data/sqlite-2.8.17/src/btree_rb.c:281:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/sqlite-2.8.17/src/btree_rb.c:288: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, "%p", pNode); data/sqlite-2.8.17/src/btree_rb.c:361: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 buf[128]; data/sqlite-2.8.17/src/btree_rb.c:362:11: [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, "Red node with red child at %p\n", pNode); data/sqlite-2.8.17/src/btree_rb.c:381: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 buf[128]; data/sqlite-2.8.17/src/btree_rb.c:382:13: [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, "Different black-heights at %p\n", pNode); data/sqlite-2.8.17/src/btree_rb.c:768: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(pData, pDataInput, nData); data/sqlite-2.8.17/src/btree_rb.c:788: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->pKey, pKey, nKey); data/sqlite-2.8.17/src/btree_rb.c:825: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( pOp->pKey, pNode->pKey, pOp->nKey ); data/sqlite-2.8.17/src/btree_rb.c:841: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( pOp->pKey, pCur->pNode->pKey, pOp->nKey ); data/sqlite-2.8.17/src/btree_rb.c:1179: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, ((char*)pCur->pNode->pKey)+offset, amt); data/sqlite-2.8.17/src/btree_rb.c:1181: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, ((char*)pCur->pNode->pKey)+offset, pCur->pNode->nKey-offset); data/sqlite-2.8.17/src/btree_rb.c:1201: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, ((char*)pCur->pNode->pData)+offset, amt); data/sqlite-2.8.17/src/btree_rb.c:1203: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, ((char*)pCur->pNode->pData)+offset ,pCur->pNode->nData-offset); data/sqlite-2.8.17/src/btree_rb.c:1227: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( aMeta, tree->aMetaData, sizeof(int) * SQLITE_N_BTREE_META ); data/sqlite-2.8.17/src/btree_rb.c:1233: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( tree->aMetaData, aMeta, sizeof(int) * SQLITE_N_BTREE_META ); data/sqlite-2.8.17/src/build.c:278: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/sqlite-2.8.17/src/build.c:1397: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/sqlite-2.8.17/src/build.c:1425: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].zName, n); data/sqlite-2.8.17/src/build.c:1551: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/sqlite-2.8.17/src/build.c:1555: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(zBuf,"%d)",n); data/sqlite-2.8.17/src/date.c:460:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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, zBuf[30]; data/sqlite-2.8.17/src/date.c:681: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/sqlite-2.8.17/src/date.c:683: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(zBuf, "%04d-%02d-%02d %02d:%02d:%02d",x.Y, x.M, x.D, x.h, x.m, data/sqlite-2.8.17/src/date.c:697: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/sqlite-2.8.17/src/date.c:699: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(zBuf, "%02d:%02d:%02d", x.h, x.m, (int)x.s); data/sqlite-2.8.17/src/date.c:712: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/sqlite-2.8.17/src/date.c:714: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(zBuf, "%04d-%02d-%02d", x.Y, x.M, x.D); data/sqlite-2.8.17/src/date.c:743:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/date.c:792:20: [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. case 'd': sprintf(&z[j],"%02d",x.D); j+=2; break; data/sqlite-2.8.17/src/date.c:796:11: [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(&z[j],"%02d.%03d",s,ms); data/sqlite-2.8.17/src/date.c:800:20: [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. case 'H': sprintf(&z[j],"%02d",x.h); j+=2; break; data/sqlite-2.8.17/src/date.c:813:13: [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(&z[j],"%02d",(n+7-wd)/7); data/sqlite-2.8.17/src/date.c:816:13: [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(&z[j],"%03d",n+1); data/sqlite-2.8.17/src/date.c:821:20: [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. case 'J': sprintf(&z[j],"%.16g",x.rJD); j+=strlen(&z[j]); break; data/sqlite-2.8.17/src/date.c:822:20: [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. case 'm': sprintf(&z[j],"%02d",x.M); j+=2; break; data/sqlite-2.8.17/src/date.c:823:20: [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. case 'M': sprintf(&z[j],"%02d",x.m); j+=2; break; data/sqlite-2.8.17/src/date.c:825:11: [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(&z[j],"%d",(int)((x.rJD-2440587.5)*86400.0 + 0.5)); data/sqlite-2.8.17/src/date.c:829:20: [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. case 'S': sprintf(&z[j],"%02d",(int)(x.s+0.5)); j+=2; break; data/sqlite-2.8.17/src/date.c:831:20: [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. case 'Y': sprintf(&z[j],"%04d",x.Y); j+=strlen(&z[j]); break; data/sqlite-2.8.17/src/encode.c:202: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[30000]; data/sqlite-2.8.17/src/encode.c:203: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 out[33000]; data/sqlite-2.8.17/src/expr.c:125: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, p, sizeof(*pNew)); data/sqlite-2.8.17/src/expr.c:341: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). *pValue = atoi(p->token.z); data/sqlite-2.8.17/src/expr.c:352: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). *pValue = atoi(p->token.z); data/sqlite-2.8.17/src/expr.c:1055: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). sqliteVdbeAddOp(v, OP_Integer, atoi(pExpr->token.z), 0); data/sqlite-2.8.17/src/expr.c:1115: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(z, "-%.*s", p->n, p->z); data/sqlite-2.8.17/src/expr.c:1117: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). sqliteVdbeAddOp(v, OP_Integer, atoi(z), 0); data/sqlite-2.8.17/src/func.c:106: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). p1 = atoi(argv[1]?argv[1]:0); data/sqlite-2.8.17/src/func.c:107: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). p2 = atoi(argv[2]?argv[2]:0); data/sqlite-2.8.17/src/func.c:145:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/func.c:148: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). n = argc==2 ? atoi(argv[1]) : 0; data/sqlite-2.8.17/src/func.c:152: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(zBuf,"%.*f",n,r); data/sqlite-2.8.17/src/func.c:325:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/func.c:372: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[1000]; data/sqlite-2.8.17/src/func.c:374: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). iMin = atoi(argv[0]); data/sqlite-2.8.17/src/func.c:381: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). iMax = atoi(argv[1]); data/sqlite-2.8.17/src/func.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 zBuf[28]; /* Space that can be used for storage */ data/sqlite-2.8.17/src/hash.c:322: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/sqlite-2.8.17/src/insert.c:804: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 zErrMsg[200]; data/sqlite-2.8.17/src/insert.c:811:13: [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(&zErrMsg[n1], ", "); data/sqlite-2.8.17/src/insert.c:815:13: [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(&zErrMsg[n1], "..."); data/sqlite-2.8.17/src/main.c:83: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). db->init.iDb = atoi(argv[4]); data/sqlite-2.8.17/src/main.c:85: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). db->init.newTnum = atoi(argv[2]); data/sqlite-2.8.17/src/main.c:101: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). iDb = atoi(argv[4]); data/sqlite-2.8.17/src/main.c:112: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). pIndex->tnum = atoi(argv[2]); data/sqlite-2.8.17/src/main.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 const *azArg[6]; data/sqlite-2.8.17/src/main.c:193:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zDbNum[30]; data/sqlite-2.8.17/src/main.c:243: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(zDbNum, "%d", iDb); data/sqlite-2.8.17/src/md5.c:50: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/sqlite-2.8.17/src/md5.c:52: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. typedef char MD5Context[88]; data/sqlite-2.8.17/src/md5.c:204: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/sqlite-2.8.17/src/md5.c:207: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/sqlite-2.8.17/src/md5.c:217: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/sqlite-2.8.17/src/md5.c:226: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/sqlite-2.8.17/src/md5.c:233: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/sqlite-2.8.17/src/md5.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(digest, ctx->buf, 16); data/sqlite-2.8.17/src/md5.c:298: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 digest[16]; data/sqlite-2.8.17/src/md5.c:319: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 digest[16]; data/sqlite-2.8.17/src/md5.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 zBuf[10240]; data/sqlite-2.8.17/src/md5.c:327: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(argv[1],"rb"); data/sqlite-2.8.17/src/md5.c:376: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 digest[16]; data/sqlite-2.8.17/src/md5.c:377:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[33]; data/sqlite-2.8.17/src/os.c:465: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). id->fd = open(zFilename, O_RDWR|O_CREAT|O_LARGEFILE|O_BINARY, 0644); data/sqlite-2.8.17/src/os.c:472: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). id->fd = open(zFilename, O_RDONLY|O_LARGEFILE|O_BINARY); data/sqlite-2.8.17/src/os.c:596: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). id->fd = open(zFilename, data/sqlite-2.8.17/src/os.c:684: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). id->fd = open(zFilename, O_RDONLY|O_LARGEFILE|O_BINARY); data/sqlite-2.8.17/src/os.c:772: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). id->dirfd = open(zDirname, O_RDONLY|O_BINARY, 0644); data/sqlite-2.8.17/src/os.c:834:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zTempPath[SQLITE_TEMPNAME_SIZE]; data/sqlite-2.8.17/src/os.c:861:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zTempPath[SQLITE_TEMPNAME_SIZE]; data/sqlite-2.8.17/src/os.c:862:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[32]; data/sqlite-2.8.17/src/os.c:1657: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[sizeof(time_t)], &pid, sizeof(pid)); data/sqlite-2.8.17/src/os.c:1668: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[sizeof(UnsignedWide)], &pid, sizeof(pid)); data/sqlite-2.8.17/src/os.c:1780: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[5000]; data/sqlite-2.8.17/src/os.c:1800: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[_MAX_PATH+1]; data/sqlite-2.8.17/src/os.c:1807: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[_MAX_PATH+1]; data/sqlite-2.8.17/src/pager.c:217:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char aData[SQLITE_PAGE_SIZE]; /* Original data for page pgno */ data/sqlite-2.8.17/src/pager.c:320: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 ac[4]; data/sqlite-2.8.17/src/pager.c:321: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(ac, &res, 4); data/sqlite-2.8.17/src/pager.c:338: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/sqlite-2.8.17/src/pager.c:360: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(ac, &val, 4); data/sqlite-2.8.17/src/pager.c:571: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(PGHDR_TO_DATA(pPg), pgRec.aData, SQLITE_PAGE_SIZE); data/sqlite-2.8.17/src/pager.c:638: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[sizeof(aJournalMagic1)]; data/sqlite-2.8.17/src/pager.c:730: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[SQLITE_PAGE_SIZE]; data/sqlite-2.8.17/src/pager.c:742: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(PGHDR_TO_DATA(pPg), zBuf, SQLITE_PAGE_SIZE); data/sqlite-2.8.17/src/pager.c:930:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SQLITE_TEMPNAME_SIZE]; data/sqlite-2.8.17/src/pager.c:970:3: [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(&pPager->zJournal[nameLen], "-journal"); data/sqlite-2.8.17/src/pager.c:1896: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(pPage, pData, SQLITE_PAGE_SIZE); data/sqlite-2.8.17/src/pager.c:2112:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[SQLITE_TEMPNAME_SIZE]; data/sqlite-2.8.17/src/pragma.c:27: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). return atoi(z); data/sqlite-2.8.17/src/pragma.c:61: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). return atoi(z); data/sqlite-2.8.17/src/pragma.c:213: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 size = atoi(zRight); data/sqlite-2.8.17/src/pragma.c:253: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 size = atoi(zRight); data/sqlite-2.8.17/src/printf.c:214:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/printf.c:670: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(pM->zText, pM->zBase, pM->nChar); data/sqlite-2.8.17/src/printf.c:679: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(&pM->zText[pM->nChar], zNewText, nNewChar); data/sqlite-2.8.17/src/printf.c:707: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(sM.zText, sM.zBase, sM.nChar+1); data/sqlite-2.8.17/src/printf.c:727:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[1000]; data/sqlite-2.8.17/src/printf.c:738:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[1000]; data/sqlite-2.8.17/src/printf.c:752:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/printf.c:764:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/random.c:46: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 s[256]; /* State variables */ data/sqlite-2.8.17/src/random.c:60: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/sqlite-2.8.17/src/select.c:756: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 zName[30]; data/sqlite-2.8.17/src/select.c:758: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(zName, "column%d", i+1); data/sqlite-2.8.17/src/select.c:816: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[30]; data/sqlite-2.8.17/src/select.c:817:11: [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(zBuf,"_%d",++cnt); data/sqlite-2.8.17/src/select.c:826: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[30]; data/sqlite-2.8.17/src/select.c:827: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(zBuf, "column%d", i+1); data/sqlite-2.8.17/src/select.c:879: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 zFakeName[60]; data/sqlite-2.8.17/src/select.c:880: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(zFakeName, "sqlite_subquery_%p_", data/sqlite-2.8.17/src/shell.c:76: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/sqlite-2.8.17/src/shell.c:77: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/sqlite-2.8.17/src/shell.c:179:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char separator[20]; /* Separator character for MODE_List */ data/sqlite-2.8.17/src/shell.c:182:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/shell.c:187:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/shell.c:203: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 *modeDescr[MODE_NUM_OF] = { data/sqlite-2.8.17/src/shell.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 *azArg[50]; data/sqlite-2.8.17/src/shell.c:619: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 val = atoi(azArg[1]); data/sqlite-2.8.17/src/shell.c:638: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 val = atoi(z); data/sqlite-2.8.17/src/shell.c:652: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->explainPrev.colWidth,p->colWidth,sizeof(p->colWidth)); data/sqlite-2.8.17/src/shell.c:682: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 val = atoi(azArg[1]); data/sqlite-2.8.17/src/shell.c:747: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(p->nullvalue, "%.*s", (int)ArraySize(p->nullvalue)-1, azArg[1]); data/sqlite-2.8.17/src/shell.c:756:7: [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(p->outfile,"stdout"); data/sqlite-2.8.17/src/shell.c:758: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). p->out = fopen(azArg[1], "wb"); data/sqlite-2.8.17/src/shell.c:782: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 *alt = fopen(azArg[1], "rb"); data/sqlite-2.8.17/src/shell.c:817: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/sqlite-2.8.17/src/shell.c:830: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/sqlite-2.8.17/src/shell.c:868: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(p->separator, "%.*s", (int)ArraySize(p->separator)-1, azArg[1]); data/sqlite-2.8.17/src/shell.c:943: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). sqlite_busy_timeout(p->db, atoi(azArg[1])); data/sqlite-2.8.17/src/shell.c:949: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). p->colWidth[j-1] = atoi(azArg[j]); data/sqlite-2.8.17/src/shell.c:1101:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char home_path[_MAX_PATH+1]; data/sqlite-2.8.17/src/shell.c:1155: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(sqliterc,"rb"); data/sqlite-2.8.17/src/shell.c:1203:3: [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(mainPrompt,"sqlite> "); data/sqlite-2.8.17/src/shell.c:1204:3: [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(continuePrompt," ...> "); data/sqlite-2.8.17/src/shell.c:1289: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(data.separator,"%.*s",(int)sizeof(data.separator)-1,argv[i]); data/sqlite-2.8.17/src/shell.c:1292: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(data.nullvalue,"%.*s",(int)sizeof(data.nullvalue)-1,argv[i]); data/sqlite-2.8.17/src/tclsqlite.c:312:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/tclsqlite.c:319: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(zVal, " %d", nTries); data/sqlite-2.8.17/src/tclsqlite.c:324: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( rc!=TCL_OK || atoi(Tcl_GetStringResult(pDb->interp)) ){ data/sqlite-2.8.17/src/tclsqlite.c:339: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( rc!=TCL_OK || atoi(Tcl_GetStringResult(pDb->interp)) ){ data/sqlite-2.8.17/src/tclsqlite.c:372: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( rc!=TCL_OK || atoi(Tcl_GetStringResult(pDb->interp)) ){ data/sqlite-2.8.17/src/tclsqlite.c:1030:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[80]; data/sqlite-2.8.17/src/tclsqlite.c:1104: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(zBuf, "%p", p->db); data/sqlite-2.8.17/src/tclsqlite.c:1106: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(zBuf, "0x%p", p->db); data/sqlite-2.8.17/src/test1.c:97:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test1.c:149:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test1.c:158: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(zBuf, "%d", rc); data/sqlite-2.8.17/src/test1.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[30]; data/sqlite-2.8.17/src/test1.c:220: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(zBuf, "%d", rc); data/sqlite-2.8.17/src/test1.c:223: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(zBuf, "%d", nRow); data/sqlite-2.8.17/src/test1.c:225: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(zBuf, "%d", nCol); data/sqlite-2.8.17/src/test1.c:251:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test1.c:258: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(zBuf, "%d", sqlite_last_insert_rowid(db)); data/sqlite-2.8.17/src/test1.c:327: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[p->nUsed], z, n+1); data/sqlite-2.8.17/src/test1.c:602:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test1.c:603: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(zBuf, "%d %d %d", sqlite_nMalloc, sqlite_nFree, sqlite_iMallocFail); data/sqlite-2.8.17/src/test1.c:641: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). sqlite_set_result_int(context, atoi(argv[1])); data/sqlite-2.8.17/src/test1.c:751:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test1.c:762: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(zBuf, "(%d) ", rc); data/sqlite-2.8.17/src/test1.c:792:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test1.c:801: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(zBuf, "%d", N); data/sqlite-2.8.17/src/test1.c:856: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[50]; data/sqlite-2.8.17/src/test1.c:857: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(zBuf, "(%d) ", rc); data/sqlite-2.8.17/src/test1.c:887: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[50]; data/sqlite-2.8.17/src/test1.c:888: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(zBuf, "(%d) ", rc); data/sqlite-2.8.17/src/test1.c:940: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[50]; data/sqlite-2.8.17/src/test1.c:941: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(zBuf, "(%d) ", rc); data/sqlite-2.8.17/src/test2.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 zBuf[100]; data/sqlite-2.8.17/src/test2.c:84: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(zBuf,"0x%x",(int)pPager); data/sqlite-2.8.17/src/test2.c:276: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/sqlite-2.8.17/src/test2.c:278: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(zBuf,"%d",a[i]); data/sqlite-2.8.17/src/test2.c:296:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test2.c:303: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(zBuf,"%d",sqlitepager_pagecount(pPager)); data/sqlite-2.8.17/src/test2.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 zBuf[100]; data/sqlite-2.8.17/src/test2.c:336: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(zBuf,"0x%x",(int)pPage); data/sqlite-2.8.17/src/test2.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/sqlite-2.8.17/src/test2.c:366: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(zBuf,"0x%x",(int)pPage); data/sqlite-2.8.17/src/test2.c:410:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test2.c:434:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test2.c:442: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(zBuf, "%d", sqlitepager_pagenumber(pPage)); data/sqlite-2.8.17/src/test2.c:528:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test2.c:560: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(zBuf, "%d", SQLITE_PAGE_SIZE); data/sqlite-2.8.17/src/test2.c:562: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(zBuf, "%d", SQLITE_PAGE_RESERVE); data/sqlite-2.8.17/src/test2.c:564: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(zBuf, "%d", SQLITE_USABLE_SIZE); data/sqlite-2.8.17/src/test3.c:64:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test3.c:75: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(zBuf,"%p", pBt); data/sqlite-2.8.17/src/test3.c:77: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(zBuf, "0x%p", pBt); data/sqlite-2.8.17/src/test3.c:204:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test3.c:216: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(zBuf, "%d", iTable); data/sqlite-2.8.17/src/test3.c:306: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/sqlite-2.8.17/src/test3.c:307: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(zBuf,"%d",aMeta[i]); data/sqlite-2.8.17/src/test3.c:330: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/sqlite-2.8.17/src/test3.c:331: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(zBuf,"%d",SQLITE_N_BTREE_META); data/sqlite-2.8.17/src/test3.c:435: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/sqlite-2.8.17/src/test3.c:437: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(zBuf,"%d",a[i]); data/sqlite-2.8.17/src/test3.c:520:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test3.c:535: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(zBuf,"0x%x", (int)pCur); data/sqlite-2.8.17/src/test3.c:582:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test3.c:597: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(zBuf,"%d",res); data/sqlite-2.8.17/src/test3.c:676:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test3.c:689: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(zBuf,"%d",res); data/sqlite-2.8.17/src/test3.c:710:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test3.c:723: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(zBuf,"%d",res); data/sqlite-2.8.17/src/test3.c:743:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test3.c:756: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(zBuf,"%d",res); data/sqlite-2.8.17/src/test3.c:776:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test3.c:789: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(zBuf,"%d",res); data/sqlite-2.8.17/src/test3.c:820: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 zMsg[100]; data/sqlite-2.8.17/src/test3.c:822: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(zMsg, "truncated key: got %d of %d bytes", rc, n); data/sqlite-2.8.17/src/test3.c:858: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 zMsg[100]; data/sqlite-2.8.17/src/test3.c:860: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(zMsg, "truncated data: got %d of %d bytes", rc, n); data/sqlite-2.8.17/src/test3.c:883:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test3.c:893: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(zBuf, "%d", n1+n2); data/sqlite-2.8.17/src/test3.c:923:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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]; data/sqlite-2.8.17/src/test3.c:938: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(&zBuf[j]," %d", aResult[i]); data/sqlite-2.8.17/src/test4.c:251:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/sqlite-2.8.17/src/test4.c:265: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(zBuf, "%d", threadset[i].argc); data/sqlite-2.8.17/src/util.c:185: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, oldP, n>oldN ? oldN : n); data/sqlite-2.8.17/src/util.c:235: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/sqlite-2.8.17/src/util.c:319: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/sqlite-2.8.17/src/util.c:841: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(z, "~~~~~~~~~~~~"); data/sqlite-2.8.17/src/vacuum.c:64: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[p->nUsed], zText, nText+1); data/sqlite-2.8.17/src/vdbe.c:164: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(pElem->zKey, zKey, nKey); data/sqlite-2.8.17/src/vdbe.c:229: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, pStack->z, pStack->n); data/sqlite-2.8.17/src/vdbe.c:253: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, pStack->z, pStack->n); data/sqlite-2.8.17/src/vdbe.c:493:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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]; /* Space to sprintf() an integer */ data/sqlite-2.8.17/src/vdbe.c:763: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(pTos, pFrom, sizeof(*pFrom)-NBFS); data/sqlite-2.8.17/src/vdbe.c:769: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(pTos->zShort, pFrom->zShort, pTos->n); data/sqlite-2.8.17/src/vdbe.c:774: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(pTos->z, pFrom->z, pFrom->n); data/sqlite-2.8.17/src/vdbe.c:940: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[j], pTerm->z, pTerm->n-1); data/sqlite-2.8.17/src/vdbe.c:943: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(&zNew[j], zSep, nSep); data/sqlite-2.8.17/src/vdbe.c:1843:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[NBFS]; /* Temp space for small records */ data/sqlite-2.8.17/src/vdbe.c:1916: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(&zNewRecord[j], &p->uniqueCnt, sizeof(p->uniqueCnt)); data/sqlite-2.8.17/src/vdbe.c:1922: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(&zNewRecord[j], pRec->z, pRec->n); data/sqlite-2.8.17/src/vdbe.c:1931: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(pTos->zShort, zTemp, nByte); data/sqlite-2.8.17/src/vdbe.c:2023:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[NBFS]; data/sqlite-2.8.17/src/vdbe.c:2078: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(&zNewKey[j], pRec->zShort, pRec->n); data/sqlite-2.8.17/src/vdbe.c:2083: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(&zNewKey[j], pRec->z, pRec->n); data/sqlite-2.8.17/src/vdbe.c:2093: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(&zNewKey[j], &iKey, sizeof(u32)); data/sqlite-2.8.17/src/vdbe.c:2104: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(pTos->zShort, zTemp, nByte); data/sqlite-2.8.17/src/vdbe.c:2965: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(pC->pData, pTos->z, pC->nData); data/sqlite-2.8.17/src/vdbe.c:3126: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[10]; data/sqlite-2.8.17/src/vdbe.c:3175: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, &zRec[idxWidth*p2], idxWidth*2); data/sqlite-2.8.17/src/vdbe.c:3966: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, pRec->z, pRec->n); data/sqlite-2.8.17/src/vdbe.c:4022: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(&zNewKey[j], pRec->z, pRec->n-1); data/sqlite-2.8.17/src/vdbe.c:4140: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). p->pFile = fopen(pOp->p3, "r"); data/sqlite-2.8.17/src/vdbe.c:4337: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(pMem->z, pTos->z, pMem->n); data/sqlite-2.8.17/src/vdbe.c:4362: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(pTos, &p->aMem[i], sizeof(pTos[0])-NBFS);; data/sqlite-2.8.17/src/vdbe.c:4832: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[100]; data/sqlite-2.8.17/src/vdbeInt.h:118:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zShort[NBFS]; /* Space for short strings */ data/sqlite-2.8.17/src/vdbeaux.c:424: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->s.zShort, zResult, n); data/sqlite-2.8.17/src/vdbeaux.c:431: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->s.z, zResult, n); data/sqlite-2.8.17/src/vdbeaux.c:512:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zPtr[40]; data/sqlite-2.8.17/src/vdbeaux.c:514: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(zPtr, "ptr(%#lx)", (long)pOp->p3); data/sqlite-2.8.17/src/vdbeaux.c:564: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(p->zArgv[0],"%d",i); data/sqlite-2.8.17/src/vdbeaux.c:565: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(p->zArgv[2],"%d", p->aOp[i].p1); data/sqlite-2.8.17/src/vdbeaux.c:566: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(p->zArgv[3],"%d", p->aOp[i].p2); data/sqlite-2.8.17/src/vdbeaux.c:568: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(p->aStack[4].zShort, "ptr(%#lx)", (long)p->aOp[i].p3); data/sqlite-2.8.17/src/vdbeaux.c:892: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/sqlite-2.8.17/src/vdbeaux.c:969: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( p->azVar[i] ) memcpy(p->azVar[i], zVal, len); data/sqlite-2.8.17/src/vdbeaux.c:1032:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zBuf[sizeof(int)]; data/sqlite-2.8.17/test/threadtest1.c:200: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 t = atoi(zFilename); data/sqlite-2.8.17/test/threadtest1.c:229: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 z1[30], z2[30]; data/sqlite-2.8.17/test/threadtest1.c:231: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(z1, "%d", i*2); data/sqlite-2.8.17/test/threadtest1.c:232: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(z2, "%d", i*i); data/sqlite-2.8.17/test/threadtest1.c:259: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). if( argc<2 || (n=atoi(argv[1]))<1 ) n = 10; data/sqlite-2.8.17/test/threadtest1.c:261: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[200]; data/sqlite-2.8.17/test/threadtest1.c:262: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(zBuf, "testdb-%d", (i+1)/2); data/sqlite-2.8.17/test/threadtest1.c:277: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[200]; data/sqlite-2.8.17/test/threadtest1.c:278: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(zBuf, "testdb-%d", (i+1)/2); data/sqlite-2.8.17/tool/diffdb.c:19: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 a1[PAGESIZE], a2[PAGESIZE]; data/sqlite-2.8.17/tool/diffdb.c:24: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). db1 = open(argv[1], O_RDONLY); data/sqlite-2.8.17/tool/diffdb.c:29: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). db2 = open(argv[2], O_RDONLY); data/sqlite-2.8.17/tool/lemon.c:1264:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[ERRMSGSIZE]; data/sqlite-2.8.17/tool/lemon.c:1265:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[PREFIXLIMIT+10]; data/sqlite-2.8.17/tool/lemon.c:1547:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *set[LISTSIZE]; data/sqlite-2.8.17/tool/lemon.c:1888:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *alias[MAXRHS]; /* Aliases for each RHS symbol (or NULL) */ data/sqlite-2.8.17/tool/lemon.c:2297: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). fp = fopen(ps.filename,"rb"); data/sqlite-2.8.17/tool/lemon.c:2524: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). fp = fopen(lemp->outname,mode); data/sqlite-2.8.17/tool/lemon.c:2676: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 buf[20]; data/sqlite-2.8.17/tool/lemon.c:2784:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINESIZE]; data/sqlite-2.8.17/tool/lemon.c:2810:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[1000]; data/sqlite-2.8.17/tool/lemon.c:2836: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(tpltname,"r"); data/sqlite-2.8.17/tool/lemon.c:2935: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 used[MAXRHS]; /* True for each RHS element which is used */ data/sqlite-2.8.17/tool/lemon.c:3163:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINESIZE]; data/sqlite-2.8.17/tool/lemon.c:3217: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(lemp->stacksize)<=0 ){ data/sqlite-2.8.17/tool/lemon.c:3558:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LINESIZE]; data/sqlite-2.8.17/tool/lemon.c:3559:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pattern[LINESIZE]; data/sqlite-2.8.17/tool/showdb.c:49: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). db = open(argv[1], O_RDONLY); data/sqlite-2.8.17/tool/showjournal.c:46: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[10]; data/sqlite-2.8.17/tool/showjournal.c:47: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 zBuf2[sizeof(u)]; data/sqlite-2.8.17/tool/showjournal.c:52: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). db = open(argv[1], O_RDONLY); data/sqlite-2.8.17/src/attach.c:102: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). nKey = strlen(zKey); data/sqlite-2.8.17/src/attach.c:149: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(pDb->zName)!=pDbname->n ) continue; data/sqlite-2.8.17/src/build.c:111: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). p = sqliteHashFind(&db->aDb[j].tblHash, zName, strlen(zName)+1); data/sqlite-2.8.17/src/build.c:163: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). p = sqliteHashFind(&db->aDb[j].idxHash, zName, strlen(zName)+1); data/sqlite-2.8.17/src/build.c:182: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). strlen(p->zName)+1, 0); data/sqlite-2.8.17/src/build.c:185: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). strlen(pOld->zName)+1, pOld); data/sqlite-2.8.17/src/build.c:340: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). pFKey->zTo, strlen(pFKey->zTo)+1)!=pFKey ); data/sqlite-2.8.17/src/build.c:366:58: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pOld = sqliteHashInsert(&db->aDb[i].tblHash, p->zName, strlen(p->zName)+1, 0); data/sqlite-2.8.17/src/build.c:369: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 nTo = strlen(pF1->zTo) + 1; data/sqlite-2.8.17/src/build.c:850: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(zStmt); data/sqlite-2.8.17/src/build.c:855: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). k += strlen(&zStmt[k]); data/sqlite-2.8.17/src/build.c:944: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). n = z ? strlen(z) : 0; data/sqlite-2.8.17/src/build.c:973: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). p->zName, strlen(p->zName)+1, p); data/sqlite-2.8.17/src/build.c:979: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 nTo = strlen(pFKey->zTo) + 1; data/sqlite-2.8.17/src/build.c:1386: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(pToCol->a[i].zName) + 1; data/sqlite-2.8.17/src/build.c:1423: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(pToCol->a[i].zName); data/sqlite-2.8.17/src/build.c:1587: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). nullId.n = strlen(nullId.z); data/sqlite-2.8.17/src/build.c:1595: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). pIndex = sqliteMalloc( sizeof(Index) + strlen(zName) + 1 + data/sqlite-2.8.17/src/build.c:1630: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). pIndex->zName, strlen(pIndex->zName)+1, pIndex); data/sqlite-2.8.17/src/date.c:594: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/sqlite-2.8.17/src/date.c:797: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). j += strlen(&z[j]); data/sqlite-2.8.17/src/date.c:821: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). case 'J': sprintf(&z[j],"%.16g",x.rJD); j+=strlen(&z[j]); break; data/sqlite-2.8.17/src/date.c:826: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). j += strlen(&z[j]); data/sqlite-2.8.17/src/date.c:831: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). case 'Y': sprintf(&z[j],"%04d",x.Y); j+=strlen(&z[j]); break; data/sqlite-2.8.17/src/encode.c:222: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( nOut!=strlen(out) ){ data/sqlite-2.8.17/src/encode.c:223:65: [1] (buffer) strlen: Does not handle 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(" ERROR return value is %d instead of %d\n", nOut, strlen(out)); data/sqlite-2.8.17/src/encode.c:231: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). printf("size %d->%d (max %d)", n, strlen(out)+1, m); data/sqlite-2.8.17/src/encode.c:232: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(out)+1>m ){ data/sqlite-2.8.17/src/func.c:76: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/sqlite-2.8.17/src/func.c:111: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/sqlite-2.8.17/src/func.c:535: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(argv[0]); data/sqlite-2.8.17/src/func.c:551: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). sqlite_set_result_string(context, p->z, strlen(p->z)); data/sqlite-2.8.17/src/func.c:650: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(azTypeFuncs[i]); data/sqlite-2.8.17/src/insert.c:806: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). n1 = strlen(zErrMsg); data/sqlite-2.8.17/src/insert.c:809: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). n2 = strlen(zCol); data/sqlite-2.8.17/src/main.c:1004: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/sqlite-2.8.17/src/main.c:1026: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/sqlite-2.8.17/src/main.c:1043: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). FuncDef *p = (FuncDef*)sqliteHashFind(&db->aFunc, zName, strlen(zName)); data/sqlite-2.8.17/src/md5.c:306: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). MD5Update(&ctx, (unsigned char*)argv[1], (unsigned)strlen(argv[1])); data/sqlite-2.8.17/src/md5.c:370: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). MD5Update(p, (unsigned char*)argv[i], strlen(argv[i])); data/sqlite-2.8.17/src/md5.c:381: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). sqlite_set_result_string(context, zBuf, strlen(zBuf)); data/sqlite-2.8.17/src/os.c:819: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). j = strlen(zBuf); data/sqlite-2.8.17/src/os.c:837: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(zTempPath); i>0 && zTempPath[i-1]=='\\'; i--){} data/sqlite-2.8.17/src/os.c:845: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). j = strlen(zBuf); data/sqlite-2.8.17/src/os.c:877: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). i = strlen(zdirName); data/sqlite-2.8.17/src/os.c:878: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). memmove(&(zTempPath[i+1]), zTempPath, strlen(zTempPath)); data/sqlite-2.8.17/src/os.c:894: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). j = strlen(zBuf); data/sqlite-2.8.17/src/os.c:974:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). got = read(id->fd, pBuf, amt); data/sqlite-2.8.17/src/os.c:1680:3: [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. usleep(ms*1000); data/sqlite-2.8.17/src/pager.c:953: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). nameLen = strlen(zFullPathname); data/sqlite-2.8.17/src/printf.c:539: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/sqlite-2.8.17/src/printf.c:583: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). (*func)(arg, pItem->zDatabase, strlen(pItem->zDatabase)); data/sqlite-2.8.17/src/printf.c:586: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). (*func)(arg, pItem->zName, strlen(pItem->zName)); data/sqlite-2.8.17/src/select.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). dummy.n = strlen(zCol); data/sqlite-2.8.17/src/select.c:168: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). dummy.n = strlen(dummy.z); data/sqlite-2.8.17/src/select.c:171: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). dummy.n = strlen(dummy.z); data/sqlite-2.8.17/src/select.c:818: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). n = strlen(zBuf); data/sqlite-2.8.17/src/select.c:997: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). pRight->token.n = strlen(zName); data/sqlite-2.8.17/src/select.c:1004: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). pLeft->token.n = strlen(zTabName); data/sqlite-2.8.17/src/select.c:1007: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). pExpr->span.n = strlen(pExpr->span.z); data/sqlite-2.8.17/src/shell.c:289: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 = strlen(azCol[i]); data/sqlite-2.8.17/src/shell.c:309: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). w = strlen(azCol[i] ? azCol[i] : ""); data/sqlite-2.8.17/src/shell.c:311: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). n = strlen(azArg && azArg[i] ? azArg[i] : p->nullvalue); data/sqlite-2.8.17/src/shell.c:515: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 n = p->zKey ? strlen(p->zKey) : 0; data/sqlite-2.8.17/src/shell.c:567: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(azArg[0]); data/sqlite-2.8.17/src/shell.c:721: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(azArg[1]); data/sqlite-2.8.17/src/shell.c:770: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/sqlite-2.8.17/src/shell.c:773: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/sqlite-2.8.17/src/shell.c:802: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). sqlite_rekey(p->db, p->zKey, strlen(p->zKey)); data/sqlite-2.8.17/src/shell.c:879: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(p->outfile) ? p->outfile : "stdout"); data/sqlite-2.8.17/src/shell.c:924: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(azResult[i]); data/sqlite-2.8.17/src/shell.c:1036:7: [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(zLine,";"); data/sqlite-2.8.17/src/shell.c:1042: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). nSql = strlen(zLine); data/sqlite-2.8.17/src/shell.c:1047: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 len = strlen(zLine); data/sqlite-2.8.17/src/shell.c:1053:7: [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(&zSql[nSql++], "\n"); data/sqlite-2.8.17/src/shell.c:1119: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). char *z = malloc( strlen(home_dir)+1 ); data/sqlite-2.8.17/src/shell.c:1146: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). zBuf = malloc(strlen(home_dir) + 15); data/sqlite-2.8.17/src/shell.c:1201:3: [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(data->separator,"|"); data/sqlite-2.8.17/src/shell.c:1338: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). if( zHome && (zHistory = malloc(strlen(zHome)+20))!=0 ){ data/sqlite-2.8.17/src/table.c:77: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). z = malloc( strlen(colv[i])+1 ); data/sqlite-2.8.17/src/table.c:101: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). z = malloc( strlen(argv[i])+1 ); data/sqlite-2.8.17/src/test1.c:312: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/sqlite-2.8.17/src/test2.c:471:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char*)pPage, argv[2], SQLITE_USABLE_SIZE-1); data/sqlite-2.8.17/src/test3.c:590: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). rc = sqliteBtreeMoveto(pCur, argv[2], strlen(argv[2]), &res); data/sqlite-2.8.17/src/test3.c:651: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). rc = sqliteBtreeInsert(pCur, argv[2], strlen(argv[2]), data/sqlite-2.8.17/src/test3.c:652: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). argv[3], strlen(argv[3])); data/sqlite-2.8.17/src/test3.c:939: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). j += strlen(&zBuf[j]); data/sqlite-2.8.17/src/tokenize.c:166: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). aKeywordTable[i].len = strlen(aKeywordTable[i].zName); data/sqlite-2.8.17/src/trigger.c:217: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). nt->name, strlen(nt->name)+1, nt); data/sqlite-2.8.17/src/trigger.c:400: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/sqlite-2.8.17/src/trigger.c:481: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 nName = strlen(zName); data/sqlite-2.8.17/src/trigger.c:588: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). sDb.n = strlen(sDb.z); data/sqlite-2.8.17/src/util.c:209: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). zNew = malloc( strlen(*pz) + 1 ); data/sqlite-2.8.17/src/util.c:226: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). zNew = sqliteMalloc_(strlen(z)+1, 0, zFile, line); data/sqlite-2.8.17/src/util.c:310: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). zNew = sqliteMallocRaw(strlen(z)+1); data/sqlite-2.8.17/src/util.c:343: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(z); data/sqlite-2.8.17/src/util.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). zResult += strlen(zResult); data/sqlite-2.8.17/src/util.c:384: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( n<=0 ) n = strlen(z); data/sqlite-2.8.17/src/util.c:394: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( n<=0 ) n = strlen(z); data/sqlite-2.8.17/src/util.c:395:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(zResult, z, n); data/sqlite-2.8.17/src/util.c:489: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/sqlite-2.8.17/src/util.c:764: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). a += strlen(&a[1]) + 2; data/sqlite-2.8.17/src/util.c:765: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). b += strlen(&b[1]) + 2; data/sqlite-2.8.17/src/vacuum.c:52: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( nText<0 ) nText = strlen(zText); data/sqlite-2.8.17/src/vacuum.c:230: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). nFilename = strlen(zFilename); data/sqlite-2.8.17/src/vdbe.c:207: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). pStack->n = strlen(pStack->zShort)+1; data/sqlite-2.8.17/src/vdbe.c:389:27: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for(i=0; i<nBuf-1 && (c=getc(in))!=EOF; i++){ data/sqlite-2.8.17/src/vdbe.c:394:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(in); data/sqlite-2.8.17/src/vdbe.c:688: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). pTos->n = strlen(pOp->p3)+1; data/sqlite-2.8.17/src/vdbe.c:705: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). pTos->n = strlen(z) + 1; data/sqlite-2.8.17/src/vdbe.c:913: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). nSep = strlen(zSep); data/sqlite-2.8.17/src/vdbe.c:1255:12: [1] (buffer) mismatch: 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. goto mismatch; data/sqlite-2.8.17/src/vdbe.c:1263:14: [1] (buffer) mismatch: 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. goto mismatch; data/sqlite-2.8.17/src/vdbe.c:1269:14: [1] (buffer) mismatch: 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. goto mismatch; data/sqlite-2.8.17/src/vdbe.c:1274:10: [1] (buffer) mismatch: 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. goto mismatch; data/sqlite-2.8.17/src/vdbe.c:1280:1: [1] (buffer) mismatch: 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. mismatch: data/sqlite-2.8.17/src/vdbe.c:2050: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). len = strlen(z); data/sqlite-2.8.17/src/vdbe.c:3746: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). pTos->n = strlen(z) + 1; data/sqlite-2.8.17/src/vdbe.c:4000: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). nField = strlen(pOp->p3); data/sqlite-2.8.17/src/vdbe.c:4217: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). nDelim = strlen(zDelim); data/sqlite-2.8.17/src/vdbe.c:4285: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). pTos->n = strlen(z) + 1; data/sqlite-2.8.17/src/vdbe.c:4625: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). sqliteHashInsert(&p->aSet[i].hash, pOp->p3, strlen(pOp->p3)+1, p); data/sqlite-2.8.17/src/vdbeaux.c:422: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(zResult); data/sqlite-2.8.17/src/vdbeaux.c:965: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(zVal)+1; data/sqlite-2.8.17/test/crashtest1.c:91:5: [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. usleep(rand()%10000 + 1000); data/sqlite-2.8.17/test/threadtest1.c:53:3: [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. usleep(100); data/sqlite-2.8.17/tool/diffdb.c:35:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while( read(db1, a1, PAGESIZE)==PAGESIZE && read(db2,a2,PAGESIZE)==PAGESIZE ){ data/sqlite-2.8.17/tool/diffdb.c:35:47: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while( read(db1, a1, PAGESIZE)==PAGESIZE && read(db2,a2,PAGESIZE)==PAGESIZE ){ data/sqlite-2.8.17/tool/lemon.c:1279: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). prefixsize = strlen(prefix); data/sqlite-2.8.17/tool/lemon.c:1285: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). errmsgsize = strlen(errmsg); data/sqlite-2.8.17/tool/lemon.c:1584: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). spcnt = strlen(argv[0]) + 1; data/sqlite-2.8.17/tool/lemon.c:1587: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). spcnt += strlen(argv[i]+1); data/sqlite-2.8.17/tool/lemon.c:1806: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(op[i].label) + 1; data/sqlite-2.8.17/tool/lemon.c:1835: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)(max-strlen(op[i].label)-9),"",op[i].message); data/sqlite-2.8.17/tool/lemon.c:1840: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)(max-strlen(op[i].label)-6),"",op[i].message); data/sqlite-2.8.17/tool/lemon.c:1845: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)(max-strlen(op[i].label)-8),"",op[i].message); data/sqlite-2.8.17/tool/lemon.c:2500: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). name = malloc( strlen(lemp->filename) + strlen(suffix) + 5 ); data/sqlite-2.8.17/tool/lemon.c:2500: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). name = malloc( strlen(lemp->filename) + strlen(suffix) + 5 ); data/sqlite-2.8.17/tool/lemon.c:2545: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(sp->name); data/sqlite-2.8.17/tool/lemon.c:2723: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). path = (char *)malloc( strlen(argv0) + strlen(name) + 2 ); data/sqlite-2.8.17/tool/lemon.c:2723: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). path = (char *)malloc( strlen(argv0) + strlen(name) + 2 ); data/sqlite-2.8.17/tool/lemon.c:2730: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). path = (char *)malloc( strlen(pathlist)+strlen(name)+2 ); data/sqlite-2.8.17/tool/lemon.c:2730: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). path = (char *)malloc( strlen(pathlist)+strlen(name)+2 ); data/sqlite-2.8.17/tool/lemon.c:2734: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). if( cp==0 ) cp = &pathlist[strlen(pathlist)]; data/sqlite-2.8.17/tool/lemon.c:3030: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). maxdtlength = strlen(lemp->vartype); data/sqlite-2.8.17/tool/lemon.c:3036: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(sp->datatype); data/sqlite-2.8.17/tool/lemon.c:3084: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). types[hash] = (char*)malloc( strlen(stddt)+1 ); data/sqlite-2.8.17/tool/lemon.c:3234: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(lemp->arg); data/sqlite-2.8.17/tool/lemon.c:3734: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( z==0 && (z=malloc( strlen(y)+1 ))!=0 ){ data/sqlite-2.8.17/tool/showdb.c:28:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(db, aData, pagesize); data/sqlite-2.8.17/tool/showjournal.c:27:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(db, aData, pagesize); data/sqlite-2.8.17/tool/showjournal.c:57:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(db, zBuf, 8); data/sqlite-2.8.17/tool/showjournal.c:59:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(db, &u, sizeof(u)); data/sqlite-2.8.17/tool/showjournal.c:61:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(db, &u, sizeof(u)); data/sqlite-2.8.17/tool/showjournal.c:64:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(db, zBuf2, sizeof(zBuf2)); data/sqlite-2.8.17/tool/showjournal.c:67:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while( read(db, zBuf2, sizeof(zBuf2))==sizeof(zBuf2) ){ data/sqlite-2.8.17/tool/showjournal.c:71:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(db, &u, sizeof(u)); ANALYSIS SUMMARY: Hits = 596 Lines analyzed = 47343 in approximately 1.38 seconds (34317 lines/second) Physical Source Lines of Code (SLOC) = 32405 Hits@level = [0] 363 [1] 157 [2] 361 [3] 7 [4] 71 [5] 0 Hits@level+ = [0+] 959 [1+] 596 [2+] 439 [3+] 78 [4+] 71 [5+] 0 Hits/KSLOC@level+ = [0+] 29.5942 [1+] 18.3922 [2+] 13.5473 [3+] 2.40704 [4+] 2.19102 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.