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/termrec-0.19/cat/termcat.c
Examining data/termrec-0.19/common/args.c
Examining data/termrec-0.19/common/common.h
Examining data/termrec-0.19/common/open_out.c
Examining data/termrec-0.19/common/rec_args.c
Examining data/termrec-0.19/common/rec_args.h
Examining data/termrec-0.19/export.h
Examining data/termrec-0.19/gettext.h
Examining data/termrec-0.19/libstream/compress.c
Examining data/termrec-0.19/libstream/compress.h
Examining data/termrec-0.19/libstream/prefix.c
Examining data/termrec-0.19/libstream/stream.c
Examining data/termrec-0.19/libstream/stream.h
Examining data/termrec-0.19/libstream/url_curl.c
Examining data/termrec-0.19/libstream/url_file.c
Examining data/termrec-0.19/libstream/url_tcp.c
Examining data/termrec-0.19/libstream/url_telnet.c
Examining data/termrec-0.19/libstream/url_termcast.c
Examining data/termrec-0.19/libtty/asciicast.c
Examining data/termrec-0.19/libtty/charsets.c
Examining data/termrec-0.19/libtty/charsets.h
Examining data/termrec-0.19/libtty/colors.c
Examining data/termrec-0.19/libtty/dosrecorder.c
Examining data/termrec-0.19/libtty/files.c
Examining data/termrec-0.19/libtty/formats.c
Examining data/termrec-0.19/libtty/formats.h
Examining data/termrec-0.19/libtty/timeline.c
Examining data/termrec-0.19/libtty/tty.c
Examining data/termrec-0.19/libtty/tty.h
Examining data/termrec-0.19/libtty/ttyrec.h
Examining data/termrec-0.19/libtty/vtredir.c
Examining data/termrec-0.19/libtty/wcwidth.c
Examining data/termrec-0.19/libtty/wcwidth.h
Examining data/termrec-0.19/play/player.c
Examining data/termrec-0.19/play/player.h
Examining data/termrec-0.19/play/termplay.c
Examining data/termrec-0.19/rec/pty.c
Examining data/termrec-0.19/rec/pty.h
Examining data/termrec-0.19/rec/termrec.c
Examining data/termrec-0.19/sys/asprintf.c
Examining data/termrec-0.19/sys/compat.h
Examining data/termrec-0.19/sys/debuglog.c
Examining data/termrec-0.19/sys/error.h
Examining data/termrec-0.19/sys/threads.h
Examining data/termrec-0.19/sys/ttysize.h
Examining data/termrec-0.19/sys/unix/threads.h
Examining data/termrec-0.19/sys/unix/ttysize.c
Examining data/termrec-0.19/sys/unix/utils.c
Examining data/termrec-0.19/sys/utils.h
Examining data/termrec-0.19/sys/win32/compat.c
Examining data/termrec-0.19/sys/win32/conssize.c
Examining data/termrec-0.19/sys/win32/net.c
Examining data/termrec-0.19/sys/win32/net.h
Examining data/termrec-0.19/sys/win32/threads.h
Examining data/termrec-0.19/sys/win32/winutils.c
Examining data/termrec-0.19/sys/win32/winutils.h
Examining data/termrec-0.19/tests/loadsave.c
Examining data/termrec-0.19/tests/rec.c
Examining data/termrec-0.19/tests/seeks.c
Examining data/termrec-0.19/tests/tarith.c
Examining data/termrec-0.19/tests/vt.c
Examining data/termrec-0.19/tests/vtgen.c
Examining data/termrec-0.19/tests/vtmir.c
Examining data/termrec-0.19/time/termtime.c
Examining data/termrec-0.19/win32/draw.c
Examining data/termrec-0.19/win32/draw.h
Examining data/termrec-0.19/win32/term.c
Examining data/termrec-0.19/win32/winrec.c

FINAL RESULTS:

data/termrec-0.19/libtty/asciicast.c:555: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(f, as->version==1? "\"]" : "\"]\n");
data/termrec-0.19/libtty/tty.c:1264:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len=vsnprintf(buf, BUFFER_SIZE, fmt, ap);
data/termrec-0.19/libtty/tty.c:1281:13:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        len=vsnprintf(bigstr, len+1, fmt, ap);
data/termrec-0.19/libtty/tty.h:122:36:  [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.
            __attribute__((format (printf, 2, 3)));
data/termrec-0.19/rec/pty.c:125: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(PtyName, PtyProto);
data/termrec-0.19/rec/pty.c:126: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(TtyName, TtyProto);
data/termrec-0.19/rec/pty.c:140:15:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
          if (access(TtyName, R_OK | W_OK))
data/termrec-0.19/sys/asprintf.c:23:13:  [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.
        n = vsnprintf (p, size, fmt, ap);
data/termrec-0.19/sys/asprintf.c:57:13:  [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.
        n = vsnprintf (p, size, fmt, ap);
data/termrec-0.19/sys/debuglog.c:23:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(f, txt, ap);
data/termrec-0.19/sys/error.h:1:55:  [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.
void die(const char *txt, ...) __attribute__((format (printf, 1, 2)))
data/termrec-0.19/sys/unix/utils.c:15:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, txt, ap);
data/termrec-0.19/sys/win32/winutils.c:17:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len=vsnprintf(buf, BUFFER_SIZE, txt, ap);
data/termrec-0.19/tests/vt.c:21:16:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        return sprintf(b, "%s", color_names[c&0xf]);
data/termrec-0.19/tests/vt.c:37:48:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define A(f, name) if (attr&VT100_ATTR_##f) b+=sprintf(b, " " name);
data/termrec-0.19/tests/vtmir.c:33:13:  [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((c>=32 && c<127)?"%lc":"[U+%04X]", c);
data/termrec-0.19/win32/draw.c:148: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(lf.lfFaceName, df->lfFaceName);
data/termrec-0.19/win32/term.c:901:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(errmsg, "Can't write to %s: %s", fn, strerror(errno));
data/termrec-0.19/win32/winrec.c:31:25:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
# define EVLOG(...) do {fprintf(evlog, __VA_ARGS__); fflush(evlog);} while(0)
data/termrec-0.19/win32/winrec.c:65:64:  [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.
void vtrec_printf(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
data/termrec-0.19/win32/winrec.c:71:9:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vb+=vsprintf(vb,fmt,ap);
data/termrec-0.19/common/rec_args.c:61:17:  [3] (buffer) getopt_long:
  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.
        switch (getopt_long(argc, argv, "f:e:rah", rec_opts, 0))
data/termrec-0.19/common/rec_args.c:63:17:  [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.
        switch (getopt(argc, argv, "f:e:rah"))
data/termrec-0.19/play/termplay.c:45:19:  [3] (buffer) getopt_long:
  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.
    while ((opt = getopt_long(argc, argv, "f:s:ph", play_opts, 0)) != -1)
data/termrec-0.19/play/termplay.c:47:19:  [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.
    while ((opt = getopt(argc, argv, "f:s:ph")) != -1)
data/termrec-0.19/rec/termrec.c:148:17:  [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.
        command=getenv("SHELL");
data/termrec-0.19/sys/win32/net.c:8:10:  [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.
    hdll=LoadLibrary(dll);
data/termrec-0.19/sys/win32/threads.h:5:23:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
#define mutex_lock(x) EnterCriticalSection(&x)
data/termrec-0.19/sys/win32/threads.h:7:23:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
#define mutex_init(x) InitializeCriticalSection(&x);
data/termrec-0.19/tests/vt.c:271:17:  [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.
        switch (getopt(argc, argv, "eda"))
data/termrec-0.19/win32/term.c:107:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&vt_mutex);
data/termrec-0.19/win32/term.c:714:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&vt_mutex);
data/termrec-0.19/win32/term.c:736:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&vt_mutex);
data/termrec-0.19/win32/term.c:790:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&vt_mutex);
data/termrec-0.19/win32/term.c:1007:17:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
                EnterCriticalSection(&vt_mutex);
data/termrec-0.19/win32/winrec.c:573:14:  [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.
    if ((dll=LoadLibrary("user32")))
data/termrec-0.19/win32/winrec.c:599:17:  [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.
        command=getenv("COMSPEC");
data/termrec-0.19/win32/winrec.c:609: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.
    if (!CreateProcess(0, (char*)command,
data/termrec-0.19/win32/winrec.c:609: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.
    if (!CreateProcess(0, (char*)command,
data/termrec-0.19/common/open_out.c:59: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 add[10],date[24];
data/termrec-0.19/common/open_out.c:72:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            fd=open(*file_name, (append?O_APPEND:O_CREAT|O_EXCL)|O_WRONLY|O_BINARY, 0666);
data/termrec-0.19/common/open_out.c:90:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!(fd=open(*file_name, (append?O_APPEND:O_CREAT|O_TRUNC)|O_WRONLY|O_BINARY, 0666)))
data/termrec-0.19/libstream/compress.c:54: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[BUFFER_SIZE];
data/termrec-0.19/libstream/compress.c:94: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[BUFFER_SIZE];
data/termrec-0.19/libstream/compress.c:128: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[BUFFER_SIZE];
data/termrec-0.19/libstream/compress.c:160: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[BUFFER_SIZE];
data/termrec-0.19/libstream/url_file.c:39:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fd=open(url, fmode|O_BINARY, 0666))==-1)
data/termrec-0.19/libstream/url_tcp.c:34: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 portstr[10];
data/termrec-0.19/libstream/url_tcp.c:71: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(portstr, "%u", port);
data/termrec-0.19/libstream/url_tcp.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 buf[BUFSIZ];
data/termrec-0.19/libstream/url_tcp.c:133: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 host[128], *cp;
data/termrec-0.19/libstream/url_telnet.c:55:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[BUFSIZ],out[BUFSIZ],*bp,*op,neg[3];
data/termrec-0.19/libstream/url_termcast.c:73: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[BUFSIZ+64], *cp, ses;
data/termrec-0.19/libstream/url_termcast.c:92:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(buf, buf+(inbuf+1)/2, inbuf/2);
data/termrec-0.19/libtty/asciicast.c:36: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[NIH_FILE_BUFFER];
data/termrec-0.19/libtty/asciicast.c:238:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(nih_f.buf, obuf, olen);
data/termrec-0.19/libtty/asciicast.c:242:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFFER_SIZE];
data/termrec-0.19/libtty/asciicast.c:349:22:  [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.
    synch_print(buf, sprintf(buf, "\e%%G\e[8;%d;%dt", sy, sx), arg);
data/termrec-0.19/libtty/asciicast.c:421: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 putf[4];
data/termrec-0.19/libtty/asciicast.c:509: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(buf2, as->putf, skip);
data/termrec-0.19/libtty/asciicast.c:510: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(buf2+skip, buf, len);
data/termrec-0.19/libtty/asciicast.c:518:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(as->putf, buf+len, skip);
data/termrec-0.19/libtty/dosrecorder.c:24: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 rgbbgr[8]="04261537";
data/termrec-0.19/libtty/dosrecorder.c:86:25:  [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.
                    bp+=sprintf(bp, "\e[%d;%df", (cy=y)+1, cx=x+1);
data/termrec-0.19/libtty/dosrecorder.c:102:25:  [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.
                    bp+=sprintf(bp, "\e[%dX", sp);
data/termrec-0.19/libtty/dosrecorder.c:140: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[BUFFER_SIZE], *bp;
data/termrec-0.19/libtty/dosrecorder.c:154:12:  [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.
    bp=buf+sprintf(buf, "\ec\e%%G\e[8;25;80t");
data/termrec-0.19/libtty/dosrecorder.c:158: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(&scr, &screens[fh.sscr], sizeof(screen));
data/termrec-0.19/libtty/dosrecorder.c:170: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(&screens[fh.dscr], &scr, sizeof(screen));
data/termrec-0.19/libtty/formats.c:119: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[BUFFER_SIZE];
data/termrec-0.19/libtty/formats.c:160: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[BUFFER_SIZE];
data/termrec-0.19/libtty/formats.c:236: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[BUFFER_SIZE];
data/termrec-0.19/libtty/formats.c:342: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[BUFFER_SIZE];
data/termrec-0.19/libtty/formats.c:451: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[BUFFER_SIZE];
data/termrec-0.19/libtty/timeline.c:61:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(nf->data, buf, len);
data/termrec-0.19/libtty/tty.c:190:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(nvt, vt, sizeof(struct tty));
data/termrec-0.19/libtty/tty.c:193:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(nvt->scr, vt->scr, SX*SY*sizeof(attrchar));
data/termrec-0.19/libtty/tty.c:198: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(nvt->combs, vt->combs, NCOMBS*sizeof(combc));
data/termrec-0.19/libtty/tty.c:203: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(nvt->oscbuf, vt->oscbuf, vt->osclen);
data/termrec-0.19/libtty/tty.c:1260: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[BUFFER_SIZE], *bigstr;
data/termrec-0.19/play/player.c:207: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 keycode[10];
data/termrec-0.19/rec/pty.c:64:27:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (0 > (filedes[1] = open(line, O_RDWR)))
data/termrec-0.19/rec/pty.c:75:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[80];
data/termrec-0.19/rec/pty.c:83:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    master=open("/dev/ptmx", O_RDWR);
data/termrec-0.19/rec/pty.c:100:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    slave=open(name,O_RDWR);
data/termrec-0.19/rec/pty.c:123:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char PtyName[32], TtyName[32];
data/termrec-0.19/rec/pty.c:136:25:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          if ((master = open(PtyName, O_RDWR | O_NOCTTY)) == -1)
data/termrec-0.19/rec/pty.c:145:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          if ((slave=open(TtyName, O_RDWR|O_NOCTTY))==-1)
data/termrec-0.19/rec/pty.c:217: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.
            const char *argv[4];
data/termrec-0.19/rec/termrec.c:98: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[20], *bp;
data/termrec-0.19/rec/termrec.c:104: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.
        bp+=sprintf(bp, "\e%%G"), need_utf=0;
data/termrec-0.19/rec/termrec.c:106: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.
        bp+=sprintf(bp, "\e[8;%d;%dt", sy, sx);
data/termrec-0.19/rec/termrec.c:135: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[BS];
data/termrec-0.19/sys/debuglog.c:19:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f=fopen(DEBUGLOG, once?"a":"w");
data/termrec-0.19/sys/win32/net.c:74:5:  [2] (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 *)&sin->sin_addr, hp->h_addr, sizeof(sin->sin_addr));
data/termrec-0.19/sys/win32/net.c:75: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).
    sin->sin_port=htons(atoi(service));
data/termrec-0.19/sys/win32/net.c:90: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 buff[1024 + 1];
data/termrec-0.19/sys/win32/winutils.c:11: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[BUFFER_SIZE];
data/termrec-0.19/tests/seeks.c:12: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[BUFFER_SIZE], *bptr;
data/termrec-0.19/tests/seeks.c:40: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 word[2]="x";
data/termrec-0.19/tests/vt.c:23:16:  [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.
        return sprintf(b, "C%u", c&0xff);
data/termrec-0.19/tests/vt.c:25:16:  [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.
        return sprintf(b, "#%06x", c&0xffffff);
data/termrec-0.19/tests/vt.c:27:16:  [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.
        return sprintf(b, "bad_color:%x", c&VT100_ATTR_COLOR_MASK);
data/termrec-0.19/tests/vt.c:33:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char buf[128];
data/termrec-0.19/tests/vt.c:48:12:  [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.
        b+=sprintf(b, " fg="), b+=describe_color(b, attr);
data/termrec-0.19/tests/vt.c:50:12:  [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.
        b+=sprintf(b, " bg="), b+=describe_color(b, attr>>32);
data/termrec-0.19/tests/vt.c:53:12:  [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.
        b+=sprintf(b, "bad_attr:%lx", attr & INVALID_ATTRS);
data/termrec-0.19/tests/vt.c:263:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFFER_SIZE];
data/termrec-0.19/tests/vtmir.c:17: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[BUFFER_SIZE];
data/termrec-0.19/tests/vtmir.c:46:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUF2];
data/termrec-0.19/win32/draw.c:72:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t linebuf[512*2]; // same as the max in tty.c
data/termrec-0.19/win32/term.c:58:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char filename[MAXFILENAME];
data/termrec-0.19/win32/term.c:185: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, "%d/%d", x, d);
data/termrec-0.19/win32/term.c:187: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, "%d", x);
data/termrec-0.19/win32/term.c:228: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(lf.lfFaceName, "Microsoft Sans Serif");
data/termrec-0.19/win32/term.c:429: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[1024];
data/termrec-0.19/win32/term.c:597: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[MAXFILENAME+20];
data/termrec-0.19/win32/term.c:627: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 fn[MAXFILENAME];
data/termrec-0.19/win32/term.c:762: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/termrec-0.19/win32/term.c:772:25:  [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.
    vulgar_fraction(buf+sprintf(buf, "Speed: x"), speed);
data/termrec-0.19/win32/term.c:872: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 fn[MAXFILENAME],errmsg[MAXFILENAME+20+128];
data/termrec-0.19/win32/term.c:899:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((record_f=open(fn, O_WRONLY|O_CREAT|O_TRUNC, 0666))==-1)
data/termrec-0.19/win32/term.c:922: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(df.lfFaceName, "Courier New");
data/termrec-0.19/win32/winrec.c:49:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char vtrec_buf[0x10000], *vb;
data/termrec-0.19/win32/winrec.c:277:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(cscr, scr, vtrec_rows*vtrec_cols*sizeof(CHAR_INFO));
data/termrec-0.19/win32/winrec.c:629: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).
    evlog=fopen("evlog", "w");
data/termrec-0.19/libstream/compress.c:45: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).
#define ERRORMSG(x) do if (write(fd,(x),strlen(x))) {} while(0)
data/termrec-0.19/libstream/compress.c:108:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((nBuf=read(fd, buf, BUFFER_SIZE))>0)
data/termrec-0.19/libstream/compress.c:169:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((nBuf=read(fd, buf, BUFFER_SIZE))>0)
data/termrec-0.19/libstream/compress.c:195:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
           || (xz.avail_in = read(f, (uint8_t*)(xz.next_in = inbuf), BUFFER_SIZE)) > 0)
data/termrec-0.19/libstream/compress.c:238:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
           || (xz.avail_in = read(fd, (uint8_t*)(xz.next_in = inbuf), BUFFER_SIZE)) > 0)
data/termrec-0.19/libstream/compress.c:291:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((s = read(f, (void*)zin.src, inbufsz)) > 0)
data/termrec-0.19/libstream/compress.c:334:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((s = read(fd, (void*)zin.src, inbufsz)) > 0)
data/termrec-0.19/libstream/prefix.c:11: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).
    tl=strlen(txt);
data/termrec-0.19/libstream/prefix.c:12: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).
    el=strlen(ext);
data/termrec-0.19/libstream/prefix.c:21:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return !strncasecmp(txt, ext, strlen(ext));
data/termrec-0.19/libstream/url_tcp.c:115:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while ((len=read(file, buf, BUFSIZ))>0)
data/termrec-0.19/libstream/url_termcast.c:95:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        len=read(in, buf+inbuf, BUFSIZ-inbuf);
data/termrec-0.19/libstream/url_termcast.c:127:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((len=read(in, buf, BUFSIZ))>0)
data/termrec-0.19/libtty/asciicast.c:51:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        f->len = read(f->fd, f->buf, NIH_FILE_BUFFER);
data/termrec-0.19/libtty/asciicast.c:65:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#undef getc
data/termrec-0.19/libtty/asciicast.c:67:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define getc(f) nih_getc(f)
data/termrec-0.19/libtty/asciicast.c:70:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define EAT(x) do c=getc(f); while (c==' ' || c=='\t' || c=='\r' || c=='\n' x)
data/termrec-0.19/libtty/asciicast.c:88:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c=getc(f);
data/termrec-0.19/libtty/asciicast.c:104:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c=getc(f);
data/termrec-0.19/libtty/asciicast.c:106:25:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        x=x*10+c-'0', c=getc(f);
data/termrec-0.19/libtty/asciicast.c:112:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c=getc(f);
data/termrec-0.19/libtty/asciicast.c:114:36:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            x+= (c-'0')*(y/=10), c=getc(f);
data/termrec-0.19/libtty/asciicast.c:120:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c=getc(f);
data/termrec-0.19/libtty/asciicast.c:122:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            c=getc(f);
data/termrec-0.19/libtty/asciicast.c:124:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            c=getc(f), minus=true;
data/termrec-0.19/libtty/asciicast.c:127:29:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            e=e*10+c-'0', c=getc(f);
data/termrec-0.19/libtty/asciicast.c:142:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int c=getc(f);
data/termrec-0.19/libtty/asciicast.c:161:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int c=getc(f);
data/termrec-0.19/libtty/asciicast.c:166:24:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        else switch (c=getc(f))
data/termrec-0.19/libtty/asciicast.c:225:61:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define FAIL(x) do {const char* t=(x);return synch_print(t, strlen(t), arg);} while (0)
data/termrec-0.19/libtty/asciicast.c:258:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        switch (c = getc(f))
data/termrec-0.19/libtty/asciicast.c:283:39:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                else if (c=='n' && (c=getc(f))=='u'
data/termrec-0.19/libtty/asciicast.c:284:39:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                                && (c=getc(f))=='l'
data/termrec-0.19/libtty/asciicast.c:285:39:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                                && (c=getc(f))=='l')
data/termrec-0.19/libtty/asciicast.c:310:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (getc(f) != '[')
data/termrec-0.19/libtty/asciicast.c:505:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int skip = strlen(as->putf);
data/termrec-0.19/libtty/files.c:50: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).
            skip=strlen(ci->ext);
data/termrec-0.19/libtty/files.c:167: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).
            skip=strlen(ci->ext);
data/termrec-0.19/libtty/formats.c:172:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((len=read(fileno(f), buf, BUFFER_SIZE))>0)
data/termrec-0.19/libtty/formats.c:459:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ((len=read(fileno(f), ((char*)&tth)+got, 12-got))<=0)
data/termrec-0.19/play/player.c:210:17:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ((ch=getchar())==EOF)\
data/termrec-0.19/rec/termrec.c:197:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            r=read(0, buf, BS);
data/termrec-0.19/rec/termrec.c:205:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            r=read(ptym, buf, BS);
data/termrec-0.19/sys/compat.h:20:6:  [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.
void usleep(unsigned int usec);
data/termrec-0.19/sys/win32/compat.c:20:6:  [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.
void usleep(unsigned int usec)
data/termrec-0.19/tests/vt.c:297:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((len=read(0, buf, BUFFER_SIZE))>0)
data/termrec-0.19/tests/vtgen.c:14: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).
    return s[rnd(strlen(s))];
data/termrec-0.19/tests/vtmir.c:20:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((len=read(fd, buf, BUFFER_SIZE))>0)
data/termrec-0.19/tests/vtmir.c:58:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((len=read(0, buf, BUF2))>0)
data/termrec-0.19/win32/term.c:660:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(filename, fn, MAXFILENAME);
data/termrec-0.19/win32/term.c:948:69:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    RegSetValueEx(reg, "FontName", 0, REG_SZ, (BYTE*)df.lfFaceName, strlen(df.lfFaceName)+1);
data/termrec-0.19/win32/term.c:1189:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(filename, lpCmdLine+1, MAXFILENAME-1);
data/termrec-0.19/win32/term.c:1190: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).
        filename[strlen(filename)-1]=0;
data/termrec-0.19/win32/term.c:1193:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(filename, lpCmdLine, MAXFILENAME-1);

ANALYSIS SUMMARY:

Hits = 180
Lines analyzed = 9937 in approximately 0.27 seconds (36403 lines/second)
Physical Source Lines of Code (SLOC) = 8435
Hits@level = [0] 121 [1]  54 [2]  87 [3]  18 [4]  21 [5]   0
Hits@level+ = [0+] 301 [1+] 180 [2+] 126 [3+]  39 [4+]  21 [5+]   0
Hits/KSLOC@level+ = [0+] 35.6846 [1+] 21.3397 [2+] 14.9378 [3+] 4.62359 [4+] 2.48963 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.