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/vncterm-0.9.10/LinuxVNC.c
Examining data/vncterm-0.9.10/VNCommand.c
Examining data/vncterm-0.9.10/VNConsole.c
Examining data/vncterm-0.9.10/VNConsole.h
Examining data/vncterm-0.9.10/example.c
Examining data/vncterm-0.9.10/vga.h

FINAL RESULTS:

data/vncterm-0.9.10/VNCommand.c:52:7:  [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(argv[programArg0],argv+programArg0);
data/vncterm-0.9.10/VNConsole.c:301:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(buf, format, args);
data/vncterm-0.9.10/VNConsole.c:311:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(buf, format, args);
data/vncterm-0.9.10/LinuxVNC.c:54:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  static char device[64];
data/vncterm-0.9.10/LinuxVNC.c:56: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(device,"/dev/tty%d",tty);
data/vncterm-0.9.10/LinuxVNC.c:57: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).
	  tty_inject_device=open(device,O_WRONLY);
data/vncterm-0.9.10/LinuxVNC.c:85:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tty_device[64],title[128];
data/vncterm-0.9.10/LinuxVNC.c:91:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if((tty=atoi(argv[1]))<1) {
data/vncterm-0.9.10/LinuxVNC.c:102: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(tty_device,"/dev/tty%d",tty);
data/vncterm-0.9.10/LinuxVNC.c:103: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((tty_inject_device=open(tty_device,O_WRONLY))<0) {
data/vncterm-0.9.10/LinuxVNC.c:114: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(title,"LinuxVNC: /dev/tty%d",tty);
data/vncterm-0.9.10/LinuxVNC.c:139: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(tty_device,"/dev/vcs%d",tty);
data/vncterm-0.9.10/LinuxVNC.c:141: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(tty_device,"/dev/vcsa%d",tty);
data/vncterm-0.9.10/LinuxVNC.c:146: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).
      tty_file=fopen(tty_device,"rb");
data/vncterm-0.9.10/VNCommand.c:56:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[1024];
data/vncterm-0.9.10/VNConsole.c:7:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char colourMap16[16*3]={
data/vncterm-0.9.10/VNConsole.c:32: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(colourMap->data.bytes,colourMap16,16*3);
data/vncterm-0.9.10/VNConsole.c:299:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[4096];
data/vncterm-0.9.10/VNConsole.c:309:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[4096];
data/vncterm-0.9.10/VNConsole.c:345:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buffer,bufferBackup,i);
data/vncterm-0.9.10/VNConsole.c:351: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(buffer,bufferBackup,c->inputCount);
data/vncterm-0.9.10/VNConsole.c:449:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(c->selection,c->screenBuffer+i,j-i);
data/vncterm-0.9.10/VNConsole.c:463: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(c->selection,str,len);
data/vncterm-0.9.10/example.c:7:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[1024];
data/vncterm-0.9.10/vga.h:1:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char vgaFontData[2399]={
data/vncterm-0.9.10/VNCommand.c:111:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    c=read(out[0],buffer,1024);
data/vncterm-0.9.10/VNCommand.c:116:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    c=read(err[0],buffer,1024);
data/vncterm-0.9.10/example.c:19:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    l=strlen(buffer)-1;

ANALYSIS SUMMARY:

Hits = 28
Lines analyzed = 1205 in approximately 0.07 seconds (16806 lines/second)
Physical Source Lines of Code (SLOC) = 1062
Hits@level = [0]   2 [1]   3 [2]  22 [3]   0 [4]   3 [5]   0
Hits@level+ = [0+]  30 [1+]  28 [2+]  25 [3+]   3 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 28.2486 [1+] 26.3653 [2+] 23.5405 [3+] 2.82486 [4+] 2.82486 [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.