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/djtools-1.2.8/djscript/print.C
Examining data/djtools-1.2.8/hptools/hp.c

FINAL RESULTS:

data/djtools-1.2.8/djscript/print.C:554:21:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      if((printer = popen(printer_name + 1, "w")) == NULL) {
data/djtools-1.2.8/hptools/hp.c:102:15:  [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( ( o = getopt( argc, argv,"ho:c" ) ) != -1)
data/djtools-1.2.8/djscript/print.C:316: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 paper[256];
data/djtools-1.2.8/djscript/print.C:564:21:  [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).
      if((printer = fopen(printer_name, "w")) == NULL) {
data/djtools-1.2.8/djscript/print.C:1406:18:  [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).
  else if((fil = fopen(filename, "r")) == NULL) {
data/djtools-1.2.8/hptools/hp.c:20: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 *prtvect[256][2] =
data/djtools-1.2.8/hptools/hp.c:125: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 *t,line[256];
data/djtools-1.2.8/hptools/hp.c:174:12:  [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).
		device = fopen( choosen_device,"a" );
data/djtools-1.2.8/djscript/print.C:576:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(paper,paper_opt,256);
data/djtools-1.2.8/djscript/print.C:580:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(paper,systempapername(), 256);
data/djtools-1.2.8/djscript/print.C:582:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(paper,defaultpapername(),256);
data/djtools-1.2.8/djscript/print.C:1152:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  (ch = fgetc(stream)) != EOF) {
data/djtools-1.2.8/djscript/print.C:1177:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  if((ch = fgetc(stream)) != '\n' && ch != EOF)
data/djtools-1.2.8/djscript/print.C:1419:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while((ch = getc(fil)) != EOF) 

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 1607 in approximately 0.08 seconds (20780 lines/second)
Physical Source Lines of Code (SLOC) = 1139
Hits@level = [0] 112 [1]   6 [2]   6 [3]   1 [4]   1 [5]   0
Hits@level+ = [0+] 126 [1+]  14 [2+]   8 [3+]   2 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 110.623 [1+] 12.2915 [2+] 7.02371 [3+] 1.75593 [4+] 0.877963 [5+]   0
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.