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/tclx8.4-8.4.1/win/tclXwinPort.h
Examining data/tclx8.4-8.4.1/win/nmakehlp.c
Examining data/tclx8.4-8.4.1/win/tclXwinDup.c
Examining data/tclx8.4-8.4.1/win/tclXwinId.c
Examining data/tclx8.4-8.4.1/win/tclXwinCmds.c
Examining data/tclx8.4-8.4.1/win/tclXwinTest.c
Examining data/tclx8.4-8.4.1/win/tclXwinOS.c
Examining data/tclx8.4-8.4.1/win/tclXAppInit.c
Examining data/tclx8.4-8.4.1/win/cattcl.c
Examining data/tclx8.4-8.4.1/unix/tclXunixDup.c
Examining data/tclx8.4-8.4.1/unix/tclXunixCmds.c
Examining data/tclx8.4-8.4.1/unix/tclXunixPort.h
Examining data/tclx8.4-8.4.1/unix/tclXunixTest.c
Examining data/tclx8.4-8.4.1/unix/tclXAppInit.c
Examining data/tclx8.4-8.4.1/unix/tclXunixSock.c
Examining data/tclx8.4-8.4.1/unix/tclXunixId.c
Examining data/tclx8.4-8.4.1/unix/tclXunixOS.c
Examining data/tclx8.4-8.4.1/generic/tclXfcntl.c
Examining data/tclx8.4-8.4.1/generic/tclXgeneral.c
Examining data/tclx8.4-8.4.1/generic/tclXdup.c
Examining data/tclx8.4-8.4.1/generic/tclXlgets.c
Examining data/tclx8.4-8.4.1/generic/tclXoscmds.c
Examining data/tclx8.4-8.4.1/generic/tclXsignal.c
Examining data/tclx8.4-8.4.1/generic/tclXflock.c
Examining data/tclx8.4-8.4.1/generic/tclXlist.c
Examining data/tclx8.4-8.4.1/generic/tclXutil.c
Examining data/tclx8.4-8.4.1/generic/tclXcmdloop.c
Examining data/tclx8.4-8.4.1/generic/tclXstring.c
Examining data/tclx8.4-8.4.1/generic/tclXmsgcat.c
Examining data/tclx8.4-8.4.1/generic/tclXsocket.c
Examining data/tclx8.4-8.4.1/generic/tclXinit.c
Examining data/tclx8.4-8.4.1/generic/tclXfstat.c
Examining data/tclx8.4-8.4.1/generic/tclXkeylist.c
Examining data/tclx8.4-8.4.1/generic/tclXtest.c
Examining data/tclx8.4-8.4.1/generic/tclXbsearch.c
Examining data/tclx8.4-8.4.1/generic/tclXmath.c
Examining data/tclx8.4-8.4.1/generic/tclXdebug.c
Examining data/tclx8.4-8.4.1/generic/tclExtend.h
Examining data/tclx8.4-8.4.1/generic/tclXselect.c
Examining data/tclx8.4-8.4.1/generic/tclXfilescan.c
Examining data/tclx8.4-8.4.1/generic/tclXprofile.c
Examining data/tclx8.4-8.4.1/generic/tclXhandles.c
Examining data/tclx8.4-8.4.1/generic/tclXprocess.c
Examining data/tclx8.4-8.4.1/generic/tclExtdInt.h
Examining data/tclx8.4-8.4.1/generic/tclXchmod.c
Examining data/tclx8.4-8.4.1/generic/tclXlib.c
Examining data/tclx8.4-8.4.1/generic/tclXfilecmds.c

FINAL RESULTS:

data/tclx8.4-8.4.1/unix/tclXunixOS.c:1081:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    if (chmod (fileName, mode) < 0) {
data/tclx8.4-8.4.1/unix/tclXunixOS.c:1290:13:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
        if (chown (filePath, ownerId, groupId) < 0)
data/tclx8.4-8.4.1/win/tclXwinOS.c:1249:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    if (chmod (fileName, (unsigned short) mode) < 0) {
data/tclx8.4-8.4.1/generic/tclExtdInt.h:139:17:  [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.
    int         access;       /* TCL_READABLE and/or TCL_WRITABLE */
data/tclx8.4-8.4.1/generic/tclExtdInt.h:182:4:  [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 (ckalloc (strlen (sourceStr) + 1), sourceStr))
data/tclx8.4-8.4.1/generic/tclXflock.c:79:65:  [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.
                                                   lockInfoPtr->access);
data/tclx8.4-8.4.1/generic/tclXflock.c:148:22:  [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.
            lockInfo.access |= TCL_READABLE;
data/tclx8.4-8.4.1/generic/tclXflock.c:152:22:  [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.
            lockInfo.access |= TCL_WRITABLE;
data/tclx8.4-8.4.1/generic/tclXhandles.c:324: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 (tblHdrPtr->handleBase, (char *) handleBase);
data/tclx8.4-8.4.1/generic/tclXhandles.c:406:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (handlePtr, "%s%d", tblHdrPtr->handleBase, entryIdx);
data/tclx8.4-8.4.1/generic/tclXhandles.c:547:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (handlePtr, "%s%d", tblHdrPtr->handleBase, walkKey);
data/tclx8.4-8.4.1/generic/tclXlgets.c:342:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf,
data/tclx8.4-8.4.1/generic/tclXlib.c:241:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (buf, "\n    (file \"%s\" line %d)", fileName,
data/tclx8.4-8.4.1/generic/tclXlib.c:504:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat (msg, indexName);
data/tclx8.4-8.4.1/generic/tclXlib.c:800:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access (filePath.string, R_OK) < 0)
data/tclx8.4-8.4.1/generic/tclXprofile.c:223: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 (entryPtr->cmdName, cmdName);
data/tclx8.4-8.4.1/generic/tclXsignal.c:769:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (errorInfo, "\n    while executing signal trap code for %s%s",
data/tclx8.4-8.4.1/generic/tclXutil.c:380:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy (buf, staticBuf);
data/tclx8.4-8.4.1/generic/tclXutil.c:382:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat (buf, exprStr + 3);
data/tclx8.4-8.4.1/generic/tclXutil.c:734:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat (valueList, FormatTranslationOption (readValue));
data/tclx8.4-8.4.1/generic/tclXutil.c:736:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat (valueList, FormatTranslationOption (writeValue));
data/tclx8.4-8.4.1/generic/tclXutil.c:1017:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(cmdnamebuf, "tclx_%s", cmdName);
data/tclx8.4-8.4.1/unix/tclXunixOS.c:426:9:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execl ("/bin/sh", "sh", "-c", command, (char *) NULL);
data/tclx8.4-8.4.1/unix/tclXunixOS.c:897:5:  [4] (shell) execvp:
  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.
    execvp (path, argList);
data/tclx8.4-8.4.1/unix/tclXunixOS.c:1536:62:  [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.
    fnum = ChannelToFnum (lockInfoPtr->channel, lockInfoPtr->access);
data/tclx8.4-8.4.1/unix/tclXunixOS.c:1593:62:  [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.
    fnum = ChannelToFnum (lockInfoPtr->channel, lockInfoPtr->access);
data/tclx8.4-8.4.1/win/nmakehlp.c:41:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define   snprintf	_snprintf
data/tclx8.4-8.4.1/win/nmakehlp.c:41:20:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define   snprintf	_snprintf
data/tclx8.4-8.4.1/win/nmakehlp.c:253:5:  [4] (buffer) lstrcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcat(cmdline, option);
data/tclx8.4-8.4.1/win/nmakehlp.c:387:5:  [4] (buffer) lstrcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
    lstrcat(cmdline, option);
data/tclx8.4-8.4.1/win/nmakehlp.c:726:6:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	    printf(szBuffer);
data/tclx8.4-8.4.1/win/tclXwinDup.c:215:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (channelName, "sock%s", fileNumStr);
data/tclx8.4-8.4.1/win/tclXwinDup.c:217:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (channelName, "file%s", fileNumStr);
data/tclx8.4-8.4.1/win/tclXwinOS.c:643:24:  [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.
    FILETIME creation, access, modify;
data/tclx8.4-8.4.1/win/tclXwinOS.c:692:47:  [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 (!GetFileTime (handle, &creation, &access, &modify)) {
data/tclx8.4-8.4.1/win/tclXwinOS.c:696:48:  [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.
        statBuf->st_mtime = ConvertToUnixTime (access);
data/tclx8.4-8.4.1/generic/tclXmath.c:25:24:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#  define tclx_srandom srandom
data/tclx8.4-8.4.1/generic/tclXmath.c:26:23:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#  define tclx_random random
data/tclx8.4-8.4.1/unix/tclXunixCmds.c:60:9:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    if (chroot (chrootString) < 0) {
data/tclx8.4-8.4.1/unix/tclXunixPort.h:110:13:  [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.
extern long random ();
data/tclx8.4-8.4.1/win/nmakehlp.c:261:10:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    ok = CreateProcess(
data/tclx8.4-8.4.1/win/nmakehlp.c:261:10:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    ok = CreateProcess(
data/tclx8.4-8.4.1/win/nmakehlp.c:389:10:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    ok = CreateProcess(
data/tclx8.4-8.4.1/win/nmakehlp.c:389:10:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    ok = CreateProcess(
data/tclx8.4-8.4.1/win/tclXwinPort.h:88:13:  [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.
extern long	random(void);
data/tclx8.4-8.4.1/win/tclXwinPort.h:90:13:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
extern void	srandom(unsigned int x);
data/tclx8.4-8.4.1/win/tclXwinPort.h:92:12:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
extern int	getopt(int nargc, char * const *nargv, const char *ostr);
data/tclx8.4-8.4.1/generic/tclExtdInt.h:185: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.
  ((char *) memcpy (ckalloc (length + 1), sourceStr, length + 1))
data/tclx8.4-8.4.1/generic/tclXbsearch.c:109:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    CONST84 char *cmdArgv [3];
data/tclx8.4-8.4.1/generic/tclXcmdloop.c:149: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 msg [64];
data/tclx8.4-8.4.1/generic/tclXcmdloop.c:157:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(msg, "Error: ");
data/tclx8.4-8.4.1/generic/tclXcmdloop.c:159:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(msg, "Bad return code (%d): ", intResult);
data/tclx8.4-8.4.1/generic/tclXdebug.c:206:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf [32];
data/tclx8.4-8.4.1/generic/tclXdebug.c:208:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf (buf, "%2d:", level);
data/tclx8.4-8.4.1/generic/tclXdebug.c:299: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          numBuf [32];
data/tclx8.4-8.4.1/generic/tclXdebug.c:318:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf (numBuf, "%d", level);
data/tclx8.4-8.4.1/generic/tclXdebug.c:321:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf (numBuf, "%d",  ((iPtr->varFramePtr == NULL) ? 0 : 
data/tclx8.4-8.4.1/generic/tclXfcntl.c:110:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char attrNameUp [MAX_ATTR_NAME_LEN];
data/tclx8.4-8.4.1/generic/tclXfilecmds.c:74:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    CONST84 char *channelNames [2];
data/tclx8.4-8.4.1/generic/tclXfilescan.c:38: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         contextHandle [16];
data/tclx8.4-8.4.1/generic/tclXfilescan.c:515: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 key [32];
data/tclx8.4-8.4.1/generic/tclXfilescan.c:588:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (key, "subindex%d", idx);
data/tclx8.4-8.4.1/generic/tclXfilescan.c:602:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (key, "submatch%d", idx);
data/tclx8.4-8.4.1/generic/tclXgeneral.c:405:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf [64];
data/tclx8.4-8.4.1/generic/tclXgeneral.c:407:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf (buf, "\n    (\"loop\" body line %d)", 
data/tclx8.4-8.4.1/generic/tclXhandles.c:62: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     handleBase [1];    /* Base handle name.  MUST BE LAST FIELD!  */
data/tclx8.4-8.4.1/generic/tclXhandles.c:170:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy (tblHdrPtr->bodyPtr, oldbodyPtr, 
data/tclx8.4-8.4.1/generic/tclXkeylist.c:811:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(keyEntryPtr->key, key, keyLen);
data/tclx8.4-8.4.1/generic/tclXkeylist.c:862:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(keyEntryPtr->key, key, keyLen);
data/tclx8.4-8.4.1/generic/tclXlgets.c:261:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char buf[100];
data/tclx8.4-8.4.1/generic/tclXlgets.c:268:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(buf,
data/tclx8.4-8.4.1/generic/tclXlgets.c:335:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char buf[100];
data/tclx8.4-8.4.1/generic/tclXlib.c:503:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy (msg, "\n    while loading Tcl library index \"");
data/tclx8.4-8.4.1/generic/tclXmath.c:322:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf [18];
data/tclx8.4-8.4.1/generic/tclXmath.c:324:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (buf, "%ld", RANDOM_RANGE);
data/tclx8.4-8.4.1/generic/tclXmsgcat.c:189: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    handleName[16];
data/tclx8.4-8.4.1/generic/tclXoscmds.c:335: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   numBuf [32];
data/tclx8.4-8.4.1/generic/tclXoscmds.c:346:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (numBuf, "%o", mask);
data/tclx8.4-8.4.1/generic/tclXprocess.c:83: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  *staticArgv [STATIC_ARG_SIZE];
data/tclx8.4-8.4.1/generic/tclXprofile.c:48: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                cmdName [1];      /* Command name. MUST BE LAST!   */
data/tclx8.4-8.4.1/generic/tclXprofile.c:798:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    CONST84 char *dataArgv [3];
data/tclx8.4-8.4.1/generic/tclXprofile.c:799: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 countBuf [32], realTimeBuf [32], cpuTimeBuf [32], *dataListPtr;
data/tclx8.4-8.4.1/generic/tclXprofile.c:814:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (countBuf,    "%ld", (long) dataEntryPtr->count);
data/tclx8.4-8.4.1/generic/tclXprofile.c:815:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (realTimeBuf, "%ld", (long) dataEntryPtr->realTime);
data/tclx8.4-8.4.1/generic/tclXprofile.c:816:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (cpuTimeBuf,  "%ld", (long) dataEntryPtr->cpuTime);
data/tclx8.4-8.4.1/generic/tclXselect.c:398: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.
            ckfree ((char *) descLists [idx]);
data/tclx8.4-8.4.1/generic/tclXsignal.c:234: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 *signalTrapCmds[MAXSIG];
data/tclx8.4-8.4.1/generic/tclXsignal.c:255:36:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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  signals [MAXSIG]));
data/tclx8.4-8.4.1/generic/tclXsignal.c:295:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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  signals [MAXSIG]));
data/tclx8.4-8.4.1/generic/tclXsignal.c:299:40:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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    signals [MAXSIG],
data/tclx8.4-8.4.1/generic/tclXsignal.c:316:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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  signals [MAXSIG]));
data/tclx8.4-8.4.1/generic/tclXsignal.c:552: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  sigNameUp [SIG_NAME_MAX+1];  /* Upshifted signal name */
data/tclx8.4-8.4.1/generic/tclXsignal.c:715: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 badSpec [2];
data/tclx8.4-8.4.1/generic/tclXsignal.c:767: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 errorInfo [128];
data/tclx8.4-8.4.1/generic/tclXsignal.c:959:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char  signals [MAXSIG];
data/tclx8.4-8.4.1/generic/tclXsignal.c:1043:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char    signals [MAXSIG];
data/tclx8.4-8.4.1/generic/tclXsignal.c:1176:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char signals [MAXSIG];
data/tclx8.4-8.4.1/generic/tclXsignal.c:1279:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char  signals [MAXSIG];
data/tclx8.4-8.4.1/generic/tclXsignal.c:1354:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char signals [MAXSIG];
data/tclx8.4-8.4.1/generic/tclXsocket.c:227:13:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            bcopy ((VOID *) hostEntry->h_addr_list [idx],
data/tclx8.4-8.4.1/generic/tclXsocket.c:243:13:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            bcopy ((VOID *) hostEntry->h_addr_list [idx],
data/tclx8.4-8.4.1/generic/tclXstring.c:117: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 *str, buf [TCL_UTF_MAX];
data/tclx8.4-8.4.1/generic/tclXstring.c:552:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char from [MAX_EXPANSION+1];
data/tclx8.4-8.4.1/generic/tclXstring.c:554:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char to   [MAX_EXPANSION+1];
data/tclx8.4-8.4.1/generic/tclXstring.c:674: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 charBuf[TCL_UTF_MAX];
data/tclx8.4-8.4.1/generic/tclXutil.c:354: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 staticBuf [32];
data/tclx8.4-8.4.1/generic/tclXutil.c:373:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf (staticBuf, "%d",
data/tclx8.4-8.4.1/generic/tclXutil.c:681:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char valueList [64];
data/tclx8.4-8.4.1/generic/tclXutil.c:771:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    CONST84 char *joinArgv [2];
data/tclx8.4-8.4.1/generic/tclXutil.c:1016:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cmdnamebuf[80];
data/tclx8.4-8.4.1/unix/tclXunixCmds.c:87: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       timesBuf [48];
data/tclx8.4-8.4.1/unix/tclXunixCmds.c:94:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf (timesBuf, "%ld %ld %ld %ld", 
data/tclx8.4-8.4.1/unix/tclXunixDup.c:171: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        channelName[20];
data/tclx8.4-8.4.1/unix/tclXunixDup.c:216:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (channelName, "sock%d", fileNum);
data/tclx8.4-8.4.1/unix/tclXunixDup.c:218:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (channelName, "file%d", fileNum);
data/tclx8.4-8.4.1/unix/tclXunixDup.c:221: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 numBuf [32];
data/tclx8.4-8.4.1/unix/tclXunixDup.c:224:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (numBuf, "%d", fileNum);
data/tclx8.4-8.4.1/unix/tclXunixDup.c:262:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char numBuf [32];
data/tclx8.4-8.4.1/unix/tclXunixDup.c:265:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf (numBuf, "%d", fileNum);
data/tclx8.4-8.4.1/unix/tclXunixId.c:157: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          userIdString[16];
data/tclx8.4-8.4.1/unix/tclXunixId.c:160:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf (userIdString, "%d", uid);
data/tclx8.4-8.4.1/unix/tclXunixId.c:202: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          groupIdString[16];
data/tclx8.4-8.4.1/unix/tclXunixId.c:204:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf (groupIdString, "%d", gid);
data/tclx8.4-8.4.1/unix/tclXunixId.c:423:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char    groupIdString[16];
data/tclx8.4-8.4.1/unix/tclXunixId.c:425:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf (groupIdString, "%d", groupId);
data/tclx8.4-8.4.1/unix/tclXunixId.c:468: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 hostNameBuf[MAXHOSTNAMELEN];
data/tclx8.4-8.4.1/unix/tclXunixOS.c:609: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 pidStr [32];
data/tclx8.4-8.4.1/unix/tclXunixOS.c:615:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf (pidStr, "%d", pid);
data/tclx8.4-8.4.1/unix/tclXunixOS.c:619:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf (pidStr, "%d", getpgrp ());
data/tclx8.4-8.4.1/unix/tclXunixOS.c:626:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf (pidStr, "%d", -pid);
data/tclx8.4-8.4.1/unix/tclXunixPort.h:90:13:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#    define bcopy(from, to, length) memmove((to), (from), (length))
data/tclx8.4-8.4.1/win/cattcl.c:110:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fh = fopen (argv [idx], "r");
data/tclx8.4-8.4.1/win/nmakehlp.c:63: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 buffer[STATICBUFFERSIZE];
data/tclx8.4-8.4.1/win/nmakehlp.c:78: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 msg[300];
data/tclx8.4-8.4.1/win/nmakehlp.c:204: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 msg[300];
data/tclx8.4-8.4.1/win/nmakehlp.c:207: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 cmdline[100];
data/tclx8.4-8.4.1/win/nmakehlp.c:247:5:  [2] (buffer) lstrcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer. Risk is low because the source is a constant string.
    lstrcpy(cmdline, "cl.exe -nologo -c -TC -Zs -X -Fp.\\_junk.pch ");
data/tclx8.4-8.4.1/win/nmakehlp.c:259:5:  [2] (buffer) lstrcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Risk is low because the source is a constant string.
    lstrcat(cmdline, " .\\nul");
data/tclx8.4-8.4.1/win/nmakehlp.c:338: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 msg[300];
data/tclx8.4-8.4.1/win/nmakehlp.c:341: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 cmdline[100];
data/tclx8.4-8.4.1/win/nmakehlp.c:381:5:  [2] (buffer) lstrcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer. Risk is low because the source is a constant string.
    lstrcpy(cmdline, "link.exe -nologo ");
data/tclx8.4-8.4.1/win/nmakehlp.c:499: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 s1[51], s2[51], s3[51];
data/tclx8.4-8.4.1/win/nmakehlp.c:500:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *f = fopen(file, "rt");
data/tclx8.4-8.4.1/win/nmakehlp.c:558: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 szBuffer[100];
data/tclx8.4-8.4.1/win/nmakehlp.c:560:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fp = fopen(filename, "rt");
data/tclx8.4-8.4.1/win/nmakehlp.c:589: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(szBuffer, p, q - p);
data/tclx8.4-8.4.1/win/nmakehlp.c:664: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 szBuffer[1024], szCopy[1024];
data/tclx8.4-8.4.1/win/nmakehlp.c:669:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fp = fopen(filename, "rt");
data/tclx8.4-8.4.1/win/nmakehlp.c:676:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	sp = fopen(substitutions, "rt");
data/tclx8.4-8.4.1/win/nmakehlp.c:723: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(szBuffer, szCopy, sizeof(szCopy));
data/tclx8.4-8.4.1/win/nmakehlp.c:747: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 szCwd[MAX_PATH + 1];
data/tclx8.4-8.4.1/win/nmakehlp.c:748: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 szTmp[MAX_PATH + 1];
data/tclx8.4-8.4.1/win/tclXwinDup.c:184: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 channelName[20];
data/tclx8.4-8.4.1/win/tclXwinDup.c:185: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 fileNumStr[20];
data/tclx8.4-8.4.1/win/tclXwinDup.c:212:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf (fileNumStr, "%d", fileNum);
data/tclx8.4-8.4.1/win/tclXwinId.c:82: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 hostName [TCL_RESULT_SIZE];
data/tclx8.4-8.4.1/win/tclXwinOS.c:751: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 drivePattern[4] = "?:\\";
data/tclx8.4-8.4.1/win/tclXwinOS.c:1049: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 numBuf [32];
data/tclx8.4-8.4.1/win/tclXwinOS.c:1058:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf (numBuf, "%d", pid);
data/tclx8.4-8.4.1/win/tclXwinPort.h:83:9:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define bcopy(from, to, length)    memmove((to), (from), (length))
data/tclx8.4-8.4.1/generic/tclExtdInt.h:182: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).
  (strcpy (ckalloc (strlen (sourceStr) + 1), sourceStr))
data/tclx8.4-8.4.1/generic/tclXdebug.c:151:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (numChars < (int) strlen (string))
data/tclx8.4-8.4.1/generic/tclXdebug.c:174: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).
    argLen = strlen (argStr);
data/tclx8.4-8.4.1/generic/tclXdebug.c:217: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).
        cmdLen = printLen = strlen (command);
data/tclx8.4-8.4.1/generic/tclXfcntl.c:113: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 (attrName) >= MAX_ATTR_NAME_LEN)
data/tclx8.4-8.4.1/generic/tclXhandles.c:300:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int          baseLength = strlen ((char *) handleBase);
data/tclx8.4-8.4.1/generic/tclXkeylist.c:230: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 (key) != (size_t) keyLen) {
data/tclx8.4-8.4.1/generic/tclXkeylist.c:413: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).
	keyLen = strlen (key);
data/tclx8.4-8.4.1/generic/tclXlib.c:240: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).
    buf = ckalloc (strlen (fileName) + 64);
data/tclx8.4-8.4.1/generic/tclXlib.c:502: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).
    msg = ckalloc (strlen (indexName) + 60);
data/tclx8.4-8.4.1/generic/tclXlib.c:505:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat (msg, "\"");
data/tclx8.4-8.4.1/generic/tclXlib.c:780: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).
    nameLen = strlen (chkName);
data/tclx8.4-8.4.1/generic/tclXlib.c:957: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).
    pathLen = strlen (pathName);
data/tclx8.4-8.4.1/generic/tclXlist.c:447: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).
    if ((mode != EXACT) && (strlen (patternStr) != (size_t) patternLen)) {
data/tclx8.4-8.4.1/generic/tclXlist.c:461:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (strlen (valueStr) != (size_t) valueLen) {
data/tclx8.4-8.4.1/generic/tclXlist.c:468:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (strlen (valueStr) != (size_t) valueLen) {
data/tclx8.4-8.4.1/generic/tclXoscmds.c:344:16:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        mask = umask (0);
data/tclx8.4-8.4.1/generic/tclXoscmds.c:345:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        umask ((unsigned short) mask);
data/tclx8.4-8.4.1/generic/tclXoscmds.c:357:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        umask ((unsigned short) mask);
data/tclx8.4-8.4.1/generic/tclXprofile.c:208:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                        strlen (cmdName));
data/tclx8.4-8.4.1/generic/tclXsignal.c:559: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 (sigName) > SIG_NAME_MAX)
data/tclx8.4-8.4.1/generic/tclXstring.c:296:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if ((strlen (string1) != (size_t) string1Len) ||
data/tclx8.4-8.4.1/generic/tclXstring.c:297:3:  [1] (buffer) strlen:
  Does not handle 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 (string1) != (size_t) string1Len)) {
data/tclx8.4-8.4.1/generic/tclXutil.c:236: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).
        targetStr = ckalloc (strlen ((char *) sourceStr) + 1);
data/tclx8.4-8.4.1/generic/tclXutil.c:273: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).
        targetStr = ckalloc (strlen ((char *) sourceStr) + 1);
data/tclx8.4-8.4.1/generic/tclXutil.c:375: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).
    exprLen = strlen (staticBuf) + exprStrLen - 2;
data/tclx8.4-8.4.1/generic/tclXutil.c:735:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat (valueList, " ");
data/tclx8.4-8.4.1/unix/tclXunixOS.c:432:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read (errPipes [0], &childErrno, sizeof (childErrno)) > 0) {
data/tclx8.4-8.4.1/win/cattcl.c:116:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((c = fgetc (fh)) != EOF) {
data/tclx8.4-8.4.1/win/nmakehlp.c:507:10:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	int r = fscanf(f, "%50s", s1);
data/tclx8.4-8.4.1/win/nmakehlp.c:514:10:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	    r = fscanf(f, "%50s %50s", s2, s3);
data/tclx8.4-8.4.1/win/nmakehlp.c:720: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).
		    op += strlen(p->key);
data/tclx8.4-8.4.1/win/tclXwinOS.c:136: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).
	    + strlen(cmdLine) + 1));

ANALYSIS SUMMARY:

Hits = 193
Lines analyzed = 24704 in approximately 0.62 seconds (39987 lines/second)
Physical Source Lines of Code (SLOC) = 14859
Hits@level = [0]  16 [1]  33 [2] 113 [3]  11 [4]  33 [5]   3
Hits@level+ = [0+] 209 [1+] 193 [2+] 160 [3+]  47 [4+]  36 [5+]   3
Hits/KSLOC@level+ = [0+] 14.0655 [1+] 12.9888 [2+] 10.7679 [3+] 3.16307 [4+] 2.42277 [5+] 0.201898
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.