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/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c
Examining data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.h
Examining data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c
Examining data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c
Examining data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.h
Examining data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3ext.h

FINAL RESULTS:

data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:272: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(db_name_copy, db_name);
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:689: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(column_name_copy, column_name);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:105: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.
# ifndef access
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:106: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.
#  define access(f,m) _access((f),(m))
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:108:9:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
# undef popen
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:109:10:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
# define popen _popen
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:119:17:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
   extern FILE *popen(const char*,const char*);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2471:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if( access(zNewDb,0)==0 ){
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2824:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(p->out, p->nErr ? "ROLLBACK; -- due to errors\n" : "COMMIT;\n");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3007:17:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      sCtx.in = popen(sCtx.zFile+1, "r");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3395:16:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      p->out = popen(zFile + 1, "w");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3661:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    x = system(zCmd);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4029:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(p->out, "SQLite %s %s\n" /*extra-version-info*/,
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4625:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if( access(data.zDbFilename, 0)==0 ){
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:26320:42:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  { "access",       (sqlite3_syscall_ptr)access,     0  },
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:42456:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define sqlite3DebugPrintf printf
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:53824:42:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
# define TRACE(X)  if(sqlite3BtreeTrace){printf X;fflush(stdout);}
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:67185:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(pOut, zFormat1, pc, 
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:99272:14:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    FUNCTION(printf,            -1, 0, 0, printfFunc       ),
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:103125:12:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  char * (*snprintf)(int,char*,const char*,...);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:103237:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  char *(*vsnprintf)(int,char*,const char*,va_list);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:103377:53:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define sqlite3_snprintf               sqlite3_api->snprintf
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:103476:53:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define sqlite3_uri_vsnprintf          sqlite3_api->vsnprintf
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3ext.h:139:12:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  char * (*snprintf)(int,char*,const char*,...);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3ext.h:251:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  char *(*vsnprintf)(int,char*,const char*,va_list);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3ext.h:391:53:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define sqlite3_snprintf               sqlite3_api->snprintf
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3ext.h:490:53:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define sqlite3_uri_vsnprintf          sqlite3_api->vsnprintf
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:240:26:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
  const char *log_file = tempnam(NULL, "erlang-sqlite3-log-");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:257:28:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
      HINSTANCE hinstLib = LoadLibrary(TEXT("Kernel32.dll"));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4286:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    home_dir = getenv("USERPROFILE");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4291: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4298:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    zDrive = getenv("HOMEDRIVE");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4299:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    zPath = getenv("HOMEPATH");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:20385:7:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
      InitializeCriticalSection(&winMutex_staticMutexes[i].mutex);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:20479:9:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
        InitializeCriticalSection(&p->mutex);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:20545:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(&p->mutex);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:28823:10:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    lk = random(); 
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31411:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if( !azDirs[1] ) azDirs[1] = getenv("SQLITE_TMPDIR");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31412:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if( !azDirs[2] ) azDirs[2] = getenv("TMPDIR");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31845:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:38131:34:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if( !azDirs[0] ) azDirs[0] = getenv("SQLITE_TMPDIR");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:38132:34:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:38133:34:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if( !azDirs[2] ) azDirs[2] = getenv("TMP");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:38134:34:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if( !azDirs[3] ) azDirs[3] = getenv("TEMP");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:38135:34:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if( !azDirs[4] ) azDirs[4] = getenv("USERPROFILE");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:99290:15:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    VFUNCTION(random,            0, 0, 0, randomFunc       ),
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:242:5:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fopen(log_file, "ax");
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:438: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(script_copy, script, sizeof(char) * script_length);
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:584:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char param_name[MAXATOMLEN + 1]; // parameter names shouldn't be longer than 256!
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:822: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(binary->orig_bytes,
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:837: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(binary->orig_bytes,
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:1016: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(binary->orig_bytes,
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:1031: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(binary->orig_bytes,
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:354: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:355: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:539:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char colSeparator[20]; /* Column separator character for several modes */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:540:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char rowSeparator[20]; /* Row separator character for MODE_Ascii */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/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 nullValue[20];    /* The text to print when a NULL comes back from
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:546:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:1131: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(&zIn[nIn], zAppend, nAppend);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.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(zErrMsg, sqlite3_errmsg(db), nErrMsg);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:1873:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  in = fopen(zName, "rb");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:1906:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  out = fopen(zFile, "wb");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2108:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(zFile, "wb");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2314:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zInsert+i, ",?", 2);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2317:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(zInsert+i, ");", 3);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2565:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char aHdr[100];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2625:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2857: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->normalMode.colWidth,p->colWidth,sizeof(p->colWidth));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3012:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      sCtx.in = fopen(sCtx.zFile, "rb");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3202:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      iotrace = fopen(azArg[1], "w");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3447:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    alt = fopen(azArg[1], "rb");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3532: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3546: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3622:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char zBuf[200];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4189:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(zLine,";",2);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4205:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(zSql, zLine+i, nLine+1-i);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4210:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(zSql+nSql, zLine, nLine+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4222: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 zPrefix[100];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4316:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    if( z ) memcpy(z, home_dir, n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4349: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4417:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(data->colSeparator,SEP_Column, 2);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4418:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(data->rowSeparator,SEP_Row, 2);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4656:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(data.colSeparator,",",2);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:12365:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zSelName[12];     /* Symbolic name of this SELECT use for debugging */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:12551:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  typedef unsigned char yDbMask[(SQLITE_MAX_ATTACHED+9)/8];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:13974:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:14900:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zBase[100];   /* Initial space */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:15990:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:16256: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:16276: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:16295: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:16332:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:16520:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:17527:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zTitle[100];  /* The title text */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:17697:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pBt, &aAddr[1], pHdr->nBacktrace*sizeof(void*));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:17706:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(z, mem.zTitle, mem.nTitle);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:17773:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pNew, pPrior, (int)(nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:17879:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(mem.zTitle, zTitle, n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:17903:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  out = fopen(zFilename, "w");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:18492:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(p, pPrior, nOld);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:18494:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(p, pPrior, nBytes);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:18550:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out = fopen(zFilename, "w");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:19048:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, pPrior, nOld);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:19170:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out = fopen(zFilename, "w");
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:21358:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pNew, p, db->lookaside.sz);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:21406: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:21418:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zNew, z, (size_t)n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:21678:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22248:35:  [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( zOld==0 && p->nChar>0 ) memcpy(zNew, p->zText, p->nChar);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22282:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&p->zText[p->nChar], z, N);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22301:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&p->zText[p->nChar-N], z, N);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22324: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->zText, p->zBase, p->nChar+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22372:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zBase[SQLITE_PRINT_BUF_SIZE];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22404:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zBase[SQLITE_PRINT_BUF_SIZE];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22490:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zMsg[SQLITE_PRINT_BUF_SIZE*3];    /* Complete log message */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22519:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zBuf[500];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22599:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zBuf[500];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22651:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char zLine[100];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:22723:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zFlgs[30];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:23003:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char s[256];          /* State variables */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:23056: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:23097:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:23104:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:23599: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:23709: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:23866:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char zBuf[20];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:24522:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pOut, &u, 8);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:24563:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pValue, &u, 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:24997:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&x,p,4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:25001:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&x,p,4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:25005:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&x,p,4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:25014:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p,&v,4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:25017:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p,&x,4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:25020:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p,&x,4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:25291:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&a, &x, 8);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:25997:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char aPadding[32];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:26283:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  return open(zFile, flags, mode);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:26869:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pNew->zCanonicalName, zAbsoluteName, n+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:27047:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char aSemName[MAX_PATHNAME+2];  /* Name of that semaphore */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:27087:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char aErr[80];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:27275:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pInode->fileId, &fileId, sizeof(fileId));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:29179:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:29183:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:29298:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char oldCntr[4];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:29314:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:29318:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:29496:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zDirname[MAX_PATHNAME+1];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31565:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char zDb[MAX_PATHNAME+1];     /* Database file path */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31592:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zDb, zPath, nDb);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31670:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zTmpname[MAX_PATHNAME+2];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31851:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      useProxy = atoi(envforce)>0;
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32104:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(zBuf, &t, sizeof(t));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32105:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&zBuf[sizeof(t)], &randomnessPid, sizeof(randomnessPid));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32448:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[MAXPATHLEN];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32626:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tPath[MAXPATHLEN];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32627:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[PROXY_MAXCONCHLEN];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32631:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char errmsg[64] = "";
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32720:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char tBuf[PROXY_MAXCONCHLEN];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32770:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char readBuf[PROXY_MAXCONCHLEN];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32771:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char lockPath[MAXPATHLEN];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32827:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(lockPath, &readBuf[PROXY_PATHINDEX], pathLen);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32873:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char writeBuffer[PROXY_MAXCONCHLEN];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32877:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&writeBuffer[PROXY_HEADERLEN], myHostID, PROXY_HOSTIDLEN);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:33024:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(conchPath, dbPath, len+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:33040:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&conchPath[i+1], "-conch", 7);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:33100:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dbPath, (char *)pFile->lockingContext, len + 1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:33119:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char dbPath[MAXPATHLEN+1];       /* Name of the database file */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:34583:41:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  { "MultiByteToWideChar",     (SYSCALL)MultiByteToWideChar,     0 },
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:35001:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:35008:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zDbgBuf, zBuf, nMin);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:35024:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zDbgBuf, zBuf, nMin);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:35613:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zMsg[500];                 /* Human readable error text */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:36257:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:36263:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:36335:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:36341:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:39113: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[n], &x, sizeof(x));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:39118: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[n], &pid, sizeof(pid));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:39124: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[n], &cnt, sizeof(cnt));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:39130: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[n], &cnt, sizeof(cnt));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:39137: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[n], &i, sizeof(i));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:39145: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[n], &id, sizeof(UUID));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:39152: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[n], &id, sizeof(UUID));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:39584:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:39624:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:43008:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char dbFileVers[16];        /* Changes whenever database file changes */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:43316:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char zRet[1024];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:43397: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:43416:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char ac[4];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:43586:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char aMagic[8];   /* A buffer to hold the magic header */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:43677:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      static const char zeroHdr[28] = {0};
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:43765:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:43842:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char aMagic[8];     /* A buffer to hold the magic header */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:44677:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pData, (u8*)aData, pPager->pageSize);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:46459:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:46961: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(pPager->zFilename, zPathname, nPathname);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:46962:16:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    if( nUri ) memcpy(&pPager->zFilename[nPathname+1], zUri, nUri);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:46963: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(pPager->zJournal, zPathname, nPathname);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:46964: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(&pPager->zJournal[nPathname], "-journal\000", 8+2);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:46968: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(pPager->zWal, zPathname, nPathname);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:46969: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(&pPager->zWal[nPathname], "-wal\000", 4+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:47457:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char dbFileVers[sizeof(pPager->dbFileVers)];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:48350:54:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          const void *pCopy = (const void *)&((const char *)zBuf)[24];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:50263:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy((void*)&aHdr[1], (const void*)&pWal->hdr, sizeof(WalIndexHdr));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:50265:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy((void*)&aHdr[0], (const void*)&pWal->hdr, sizeof(WalIndexHdr));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:50293: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(&aFrame[8], pWal->hdr.aSalt, 8);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:50371:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char zName[15];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:50740:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pWal->hdr.aSalt, &aBuf[16], 8);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:51040:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(aLeft, aTmp, sizeof(aTmp[0])*iOut);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:51267:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&pWal->hdr.aSalt[1], &salt1, 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:51617:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pWal->hdr, &h1, sizeof(WalIndexHdr));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:52186:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:52434:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&aWalHdr[16], pWal->hdr.aSalt, 8);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:54528:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char aSpace[200];          /* Temp space for pIdxKey - to avoid a malloc */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:55142:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&temp[x], &data[x], (cbrk+size) - x);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:55145:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&data[cbrk], &src[pc], size);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:55208:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&aData[iAddr], &aData[pc], 2);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:55901:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char zDbHeader[100];  /* Database header content */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:55963:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(zFullPathname, zFilename, nFilename);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:56795:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(data, zMagicHeader, sizeof(zMagicHeader));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:58138:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pPayload, pBuf, nByte);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:58141:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pBuf, pPayload, nByte);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:58336:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(aSave, aWrite, 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:58339:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(aWrite, aSave, 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:59355:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:59379:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:59385:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:59408:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&pNewTrunk->aData[0], &pTrunk->aData[0], 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:59410:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&pNewTrunk->aData[8], &pTrunk->aData[12], (k-1)*4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:59475:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(&aData[8+closest*4], &aData[4+k*4], 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:59957:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pPayload, pSrc, n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60067:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pTemp, pCell, sz);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60102:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&data[idx], pCell, sz);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60199:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&pTmp[i], &aData[i], usableSize - i);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60211:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pData, pCell, szCell[i]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60275: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(pSlot, pCArray->apCell[i], sz);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60368:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pTmp, aData, pPg->pBt->usableSize);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60642:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&aTo[iData], &aFrom[iData], pBt->usableSize-iData);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60643:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60840:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(&aOvflSpace[iOff], apDiv[i], szNew[i]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60957:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pTemp, apDiv[i], sz);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:60966:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:61205:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&apNew[nNew-1]->aData[8], &pOld->aData[8], 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:61280:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&pNew->aData[8], pCell, 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:61511:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pChild->aiOvfl, pRoot->aiOvfl,
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:61513:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pChild->apOvfl, pRoot->apOvfl,
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:61770:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(newCell, oldCell, 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:62497:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:63001:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zErr[100];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:63687:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(zOut, zIn, nCopy);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:64321:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pMem->zMalloc, pMem->z, pMem->n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:64518:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pMem, &t, sizeof(t));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:64963:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pTo, pFrom, MEMCELLSIZE);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:64984:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pTo, pFrom, MEMCELLSIZE);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:65008:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pTo, pFrom, sizeof(Mem));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:65083:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pMem->z, z, nAlloc);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:66145:16:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if( p4copy ) memcpy(p4copy, zP4, 8);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:66994: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(&zTemp[i],",...",4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:67001:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&zTemp[i], zColl, n+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:67172:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[50];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:67173:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zCom[100];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:67477:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char z[1000];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:67689:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->azVar, pParse->azVar, p->nzVar*sizeof(p->azVar[0]));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:68561: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:68580:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char zHdr[100];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:68972: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(buf, pMem->z, len);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:69029:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pMem->u.r, &x, sizeof(x));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:70399:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pNew, pOrig, MEMCELLSIZE);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:71892:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zBase[100];         /* Initial working space */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:72468: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:73475:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pOut->z, pIn2->z, pIn2->n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:73477:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&pOut->z[pIn2->n], pIn1->z, pIn1->n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:74670:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pDest->z, zData, len);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:74939:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pNew->zName, zName, nName+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:75981:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*4 + 7];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:79792:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->aAlloc, &p->aBuffer[iBuf], nAvail);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:79808:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&p->aAlloc[nByte - nRem], aNext, nCopy);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:80215:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pKeyInfo, pCsr->pKeyInfo, szKeyInfo);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:80712:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&p->aBuffer[p->iBufEnd], &pData[nData-nRem], nCopy);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:81087:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(SRVAL(pNew), pVal->z, pVal->n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:81914:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pOut->z, pKey, nKey);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:82073: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, &p->zBuf[iOfst], iAmt);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:82096: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->zBuf[iOfst], zBuf, iAmt);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:82326:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zOut, &pChunk->zChunk[iChunkOffset], nCopy);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:82378:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&p->endpoint.pChunk->zChunk[iChunkOffset], zWrite, iSpace);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:82772: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(pExpr, pDup, sizeof(*pExpr));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:84635:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        if( pToken->n ) memcpy(pNew->u.zToken, pToken->z, pToken->n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:85047: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(zAlloc, p, nNewSize);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:85050: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(zAlloc, p, nSize);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:85062: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(zToken, p->u.zToken, nToken);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:89131:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pNew->aCol, pTab->aCol, sizeof(Column)*pNew->nCol);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:89476:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->u.aRowid, pData, n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:89503:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pTo->anEq, pFrom->anEq, sizeof(tRowcnt)*p->nCol);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:89504:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pTo->anLt, pFrom->anLt, sizeof(tRowcnt)*p->nCol);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:89505:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pTo->anDLt, pFrom->anDLt, sizeof(tRowcnt)*p->nCol);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:90933: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(pSample->p, sqlite3_column_blob(pStmt, 4), pSample->n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:91130:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  zFile = (const char *)sqlite3_value_text(argv[0]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:91131:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  zName = (const char *)sqlite3_value_text(argv[1]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:91166: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:91239:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        zKey = (char *)sqlite3_value_blob(argv[2]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:91317:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char *zName = (const char *)sqlite3_value_text(argv[0]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:91321:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zErr[128];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:92169:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char saveBuf[SAVE_SZ];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:92180:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(saveBuf, &pParse->nVar, SAVE_SZ);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:92185: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(&pParse->nVar, saveBuf, SAVE_SZ);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:92403: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:93478:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&zStmt[k], zType, len);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:93498:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(zExtra, pIdx->azColl, sizeof(char*)*pIdx->nColumn);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:93501:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(zExtra, pIdx->aiColumn, sizeof(i16)*pIdx->nColumn);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:93504:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(zExtra, pIdx->aSortOrder, pIdx->nColumn);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:94279:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char zTab[24];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:94530: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:94558: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:94964:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pIndex->zName, zName, nName+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:95018:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(zExtra, zColl, nColl);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:95273:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&a[1], aVal, nCopy*sizeof(LogEst));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:96291:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pColl, pColl2, sizeof(CollSeq));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:96401:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pColl[0].zName, zName, nName);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:96640: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(pBest->zName, zName, nName);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:98518:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char zBuf[50];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:98762:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&zOut[j], zRep, nRep);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:98768:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&zOut[j], &zStr[i], nStr-i);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:98876:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:98925:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char *zFile = (const char *)sqlite3_value_text(argv[0]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:98931:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    zProc = (const char *)sqlite3_value_text(argv[1]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:99228:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(aWc, pDef->pUserData, 3);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:100635:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy((char *)pStep->zTarget, zFrom, nFrom);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:102951: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(*pzErrMsg, sqlite3_errmsg(db), nErrMsg);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:103101:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int  (*open)(const char*,sqlite3**);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:103352:53:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define sqlite3_open                   sqlite3_api->open
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:104009:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zAltEntry, "sqlite3_", 8);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:104018:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zAltEntry+iEntry, "_init", 6);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:104053:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(aHandle, db->aExtension, sizeof(handle)*db->nExtension);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:104912: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(pI64, &value, sizeof(value));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:105019:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *aFcntl[4];       /* Argument to SQLITE_FCNTL_PRAGMA */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:106687: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 zKey[40];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:106869:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[4];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:113331:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(z, argv[i], n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:113817:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(z, pName->z, pName->n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:115768: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(zCopy, zName, nName+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:116775: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->zName, pDef->zName, sqlite3Strlen30(pDef->zName)+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:117520:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char zBuf[100];               /* Initial space for EQP output string */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:118581:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pOrTab->a, pTabItem, sizeof(*pTabItem));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:118982:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pWC->a, pOld, sizeof(pWC->a[0])*pWC->nTerm);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:119108:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char wc[3];                /* Wildcard characters */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:120246:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(aiCur, pWInfo->aiCurOnePass, sizeof(int)*2);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:120255:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pDest->a, pSrc->a, pDest->n*sizeof(pDest->a[0]));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:121722:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char zType[4];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:121723:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zType, "...", 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:121833:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(paNew, p->aLTerm, sizeof(p->aLTerm[0])*p->nLSlot);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:121849:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pTo, pFrom, WHERE_LOOP_XFER_SZ);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:121850:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pTo->aLTerm, pFrom->aLTerm, pTo->nLTerm*sizeof(pTo->aLTerm[0]));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:123486:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char zName[65];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:123773:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pTo->aLoop, pFrom->aLoop, sizeof(WhereLoop*)*iLoop);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:128340:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const char zText[553] = {
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:128373:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char aHash[127] = {
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:128385:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char aNext[124] = {
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:128397:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char aLen[124] = {
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:128421:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char aCode[124] = {
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:129703:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&y, &x, 8);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:130748:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char zBuf[50];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:132053: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(zFile, zUri, nUri);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:133494:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(pNew, aArg, nArg*sizeof(void *));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135543:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(p, zCol, n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135839:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(p->aIndex, aIndex, sizeof(struct Fts3Index) * nIndex);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135849:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(zCsr, argv[2], nName);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135852:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(zCsr, argv[1], nDb);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135859:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    z = (char *)sqlite3Fts3NextToken(aCol[iCol], &n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135860: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(zCsr, z, n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135865:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    assert( zCsr <= &((char *)p)[nByte] );
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:136284:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&zBuffer[nPrefix], zCsr, nSuffix);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:136436:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, *ppPoslist, n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:136474:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, *ppPoslist, n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:136799:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char *aaOutput[16];             /* Malloc'd output buffers */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:137191:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pTS->aaOutput[0], aDoclist, nDoclist);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:137988:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&pRet, sqlite3_value_blob(pVal), sizeof(Fts3Cursor *));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:138109:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      zArg = (const char *)sqlite3_value_text(apVal[1]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:139008:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(aDoclist, a[p->nToken-1].pList, nByte+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:140483:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy((char *)p->pFts3Tab->zDb, zDb, nDb);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:140484:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:141141:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pRet->pPhrase->aToken[0].z, zToken, nToken);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:141256:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&zTemp[nTemp], zByte, nByte);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:141284:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(zBuf, zTemp, nTemp);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:142031:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy((void *)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:142130:34:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                          (const char *)sqlite3_value_text(argv[0]), &pModule);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:142147:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  zExpr = (const char *)sqlite3_value_text(argv[1]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:142156:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    azCol[ii] = (char *)sqlite3_value_text(argv[ii+2]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:142580: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:142940:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zReverse[28];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143519:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char *azArg[64];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143536:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  zName = (const char *)sqlite3_value_text(argv[0]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143538:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  zInput = (const char *)sqlite3_value_text(argv[argc-1]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143554:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    azArg[i-1] = (const char *)sqlite3_value_text(argv[i]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143634:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy((void *)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143796:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char delim[128];             /* flag ASCII delimiters */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:144129:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pSpace, argv[i], n+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:144343:32:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char *zByte = (const char *)sqlite3_value_text(apVal[0]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:144349:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pCsr->zInput, zByte, nByte);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:145374:34:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      const char *zText = (const char *)sqlite3_value_text(apVal[i]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:145837:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&pReader->zTerm[nPrefix], pNext, nSuffix);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:146067: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(pReader->aNode, zRoot, nRoot);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:146190:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(pReader->ppNextElem, aElem, nElem*sizeof(Fts3HashElem *));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:146481:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&pTree->aData[nData], &zTerm[nPrefix], nSuffix);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:146495:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pTree->zTerm, zTerm, nTerm);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:146745:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&pWriter->aData[nData], &zTerm[nPrefix], nSuffix);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:146748:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&pWriter->aData[nData], aDoclist, nDoclist);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:146767:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pWriter->zTerm, zTerm, nTerm);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:147075:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pMsr->aBuffer, pList, nList);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:147419:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(&pCsr->aBuffer[nDoclist], pList, nList);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:148171:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&p->term.a[nPrefix], &p->aNode[p->iOff], nSuffix);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:148275:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&pBlk->a[pBlk->n], &zTerm[nPrefix], nSuffix);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:148278:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pNode->key.a, zTerm, nTerm);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:148351:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pPrev->a, zTerm, nTerm);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:148358:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&pNode->a[pNode->n], &zTerm[nPrefix], nSuffix);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:148363:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pNode->a[pNode->n], aDoclist, nDoclist);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:148694:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pNode->block.a, aRoot, nRoot);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:148706: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(pNode->key.a, reader.term.a, reader.term.n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:148716:15:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
              memcpy(pNode->block.a, aBlock, nBlock);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:149180:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(pHint->a, aHint, nHint);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:149742: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).
    p->nNodeSize = atoi(&zVal[9]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:149745: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->nMaxPendingData = atoi(&zVal[11]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:149748:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    p->bNoIncrDoclist = atoi(&zVal[21]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:149870:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pRet, &p->pList->aData[nSkip], *pnData);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:150263:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pRet->zMatchinfo, zMatchinfo, nStr+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:150304:24:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      if( p->bGlobal ) memcpy(aOut, &p->aMatchinfo[1], p->nElem*sizeof(u32));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:150314:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&p->aMatchinfo[2+p->nElem], &p->aMatchinfo[1], p->nElem*sizeof(u32));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:150738:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&pStr->z[pStr->n], zAppend, nAppend);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:151768:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char aBuffer[64];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:153140:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(pNode->zData, zBlob, pRtree->iNodeSize);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:153518:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&c.u,a,4);                                           \
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:153526:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&c.u,a,4);                                           \
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154088:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pBlob, sqlite3_value_blob(pValue), nBlob);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154270:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zIdxStr[RTREE_MAX_DIMENSIONS*8+1];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154412:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&cell, p, sizeof(RtreeCell));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154594:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(aSpare, aLeft, sizeof(int)*nLeft);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154663:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(aSpare, aLeft, sizeof(int)*nLeft);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154754:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&left, &aCell[aaSorted[ii][0]], sizeof(RtreeCell));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154755:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154784:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pBboxLeft, &aCell[aaSorted[iBestDim][0]], sizeof(RtreeCell));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154785:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pBboxRight, &aCell[aaSorted[iBestDim][iBestSplit]], sizeof(RtreeCell));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154852:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:155144:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&aCell[ii], pCell, sizeof(RtreeCell));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:155622:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const char *azSql[N_STATEMENT] = {
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:155811:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pRtree->zDb, argv[1], nDb);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:155812:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(pRtree->zName, argv[2], nName);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:155888: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 zCell[512];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:156317:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zBuf[128];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:156445:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    zLocale = (const char *)sqlite3_value_text(apArg[1]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:156533:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  zLocale = (const char *)sqlite3_value_text(apArg[0]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:156534:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  zName = (const char *)sqlite3_value_text(apArg[1]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:156686:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->zLocale, argv[0], n);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:157608:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zStateDb[5];               /* Db name for state ("stat" or "main") */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:158006:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(zRet, zStr, nCopy);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:158159:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pIter->abIndexed, pIter->abTblPk, sizeof(u8)*pIter->nTblCol);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:159103:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pUp->zMask, zMask, pIter->nTblCol);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:159156:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->zStateDb, "stat", 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:159158:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->zStateDb, "main", 4);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:159945:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char zRnd[64];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:159993: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->zTarget, zTarget, nTarget+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:159995:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(p->zRbu, zRbu, nRbu+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:159998: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->zState, zState, nState+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:160695:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(zCopy, zName, nCopy);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:160939:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&pNew->base, &vfs_template, sizeof(sqlite3_vfs));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:160944:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(zSpace, zName, nName);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3ext.h:115:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int  (*open)(const char*,sqlite3**);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3ext.h:366:53:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define sqlite3_open                   sqlite3_api->open
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:138:62:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ERL_DRV_STRING, (ErlDrvTermData) error, (ErlDrvTermData) strlen(error),
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:270: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).
  db_name_len = strlen(db_name) + 1; // include terminator
data/erlang-p1-sqlite3-1.1.8/c_src/sqlite3_drv.c:687:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t column_name_length = strlen(column_name);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2122:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int i = (int)strlen(z);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2184:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = fgetc(p->in);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2195:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = fgetc(p->in);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2229:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = fgetc(p->in);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2258:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = fgetc(p->in);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2265:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc(p->in);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2291: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 nTable = (int)strlen(zTable);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:2312:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i = (int)strlen(zInsert);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3306:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int n2 = (int)strlen(zMode);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3429: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3432: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/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3978: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).
                                    (int)strlen(azArg[3]));
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:3990: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).
                            azArg[3], (int)strlen(azArg[3]),
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/shell.c:4003:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                              azArg[3], (int)strlen(azArg[3]),
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:24023:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return 0x3fffffff & (int)strlen(z);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:26349:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  { "read",         (sqlite3_syscall_ptr)read,       0  },
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:26865:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  n = (int)strlen(zAbsoluteName);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:29499:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for(ii=(int)strlen(zDirname); ii>1 && zDirname[ii]!='/'; ii--);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:30261:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nShmFilename = 6 + (int)strlen(zBasePath);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31339:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nFilename = (int)strlen(zFilename) + 6;
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31448:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if( (strlen(zDir) + strlen(SQLITE_TEMP_FILE_PREFIX) + 18) >= (size_t)nBuf ){
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31448:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if( (strlen(zDir) + strlen(SQLITE_TEMP_FILE_PREFIX) + 18) >= (size_t)nBuf ){
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31454: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).
    j = (int)strlen(zBuf);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31727:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert( (flags & SQLITE_OPEN_URI) || zName[strlen(zName)+1]==0 );
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:31740:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert( zName[strlen(zName)+1]==0 );
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32007: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).
    nCwd = (int)strlen(zOut);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32136: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(microseconds);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32432:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  dbLen = (int)strlen(dbPath);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32453:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = (int)strlen(lockPath);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32709:9:  [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(500000); /* wait 0.5 sec and try the lock again*/
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32735:9:  [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(10000000); /* wait 10 sec and try the lock again */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:32884:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        writeSize = PROXY_PATHINDEX + strlen(&writeBuffer[PROXY_PATHINDEX]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:33015:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = (int)strlen(dbPath); /* Length of database filename - dbPath */
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:33041:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  assert( (int)strlen(conchPath) == len+7 );
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:33091:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert( (int)strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:33099:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:33099:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:33103:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert( strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:117920:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  assert( zAff==0 || (int)strlen(zAff)>=nEq );
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135260:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nRet = 2 + (int)strlen(zInput)*2 + 1;
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135531: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).
      nStr += (int)strlen(zCol) + 1;
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135542:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int n = (int)strlen(zCol)+1;
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135608:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  assert( strlen(argv[0])==4 );
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135613:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nDb = (int)strlen(argv[1]) + 1;
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135614:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nName = (int)strlen(argv[2]) + 1;
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135648:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     && strlen(z)>8
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135687: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( strlen(zVal)!=4 || sqlite3_strnicmp(zVal, "fts3", 4) ){
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135713: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( (strlen(zVal)!=3 || sqlite3_strnicmp(zVal, "asc", 3)) 
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135714:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
               && (strlen(zVal)!=4 || sqlite3_strnicmp(zVal, "desc", 4)) 
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135747:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      nString += (int)(strlen(z) + 1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135870:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int n = (int)strlen(p->azColumn[iCol]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:135873:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if( zNot && n==(int)strlen(zNot)
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:140455:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nDb = (int)strlen(zDb);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:140459:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      nDb = (int)strlen(zDb);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:140467:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nFts3 = (int)strlen(zFts3);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:141451:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int nStr = (int)strlen(zStr);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:141885:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    n = (int)strlen(z);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:142311:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if( nKey<=0 ) nKey = (int) strlen(z);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:142702:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    c->nInput = (int)strlen(zInput);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143164:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  *pnOut = i = (int)strlen(z);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143425:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  zEnd = &zCopy[strlen(zCopy)];
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143435:68:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  m = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash,z,(int)strlen(z)+1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143836:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int i, n = (int)strlen(argv[1]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:143888:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    c->nBytes = (int)strlen(pInput);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:144080:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int nName = (int)strlen(zName);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:144118:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      nByte += (int)(strlen(argv[i]) + 1);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:144127:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int n = (int)strlen(argv[i]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:150254:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int nStr = (int)strlen(zMatchinfo);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:150719:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nAppend = (int)strlen(zAppend);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:152063:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int n = (int)strlen(z);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:152115:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    pCsr->nInput = (int)strlen(aInput);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:154168:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                || (idxStr && (int)strlen(idxStr)==argc*2) );
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:155797:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nDb = (int)strlen(argv[1]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:155798:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nName = (int)strlen(argv[2]);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:155895: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).
    nCell = (int)strlen(zCell);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:155904: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).
      nCell = (int)strlen(zCell);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:156676:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    n = strlen(argv[0])+1;
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:156732:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nInput = strlen(zInput);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:158003: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 nCopy = strlen(zStr) + 1;
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:158556: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(zMask)!=pIter->nTblCol ){
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:159978: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 nTarget = strlen(zTarget);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:159979: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 nRbu = strlen(zRbu);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:159980: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).
  int nState = zState ? strlen(zState) : 0;
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:160108: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 nErrmsg = strlen(p->zErrmsg);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:160666: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(zName);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:160692: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 nCopy = strlen(zName);
data/erlang-p1-sqlite3-1.1.8/sqlite3_amalgamation/sqlite3.c:160926: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);

ANALYSIS SUMMARY:

Hits = 557
Lines analyzed = 176396 in approximately 5.64 seconds (31282 lines/second)
Physical Source Lines of Code (SLOC) = 104314
Hits@level = [0] 434 [1]  90 [2] 421 [3]  19 [4]  27 [5]   0
Hits@level+ = [0+] 991 [1+] 557 [2+] 467 [3+]  46 [4+]  27 [5+]   0
Hits/KSLOC@level+ = [0+] 9.50016 [1+] 5.33965 [2+] 4.47687 [3+] 0.440976 [4+] 0.258834 [5+]   0
Dot directories skipped = 2 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.