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/trueprint-5.4/replace/replace.h
Examining data/trueprint-5.4/tests/test6.c
Examining data/trueprint-5.4/tests/test1.c
Examining data/trueprint-5.4/tests/OLDtest6.c
Examining data/trueprint-5.4/tests/test2.c
Examining data/trueprint-5.4/src/language.c
Examining data/trueprint-5.4/src/debug.c
Examining data/trueprint-5.4/src/lang_pascal.c
Examining data/trueprint-5.4/src/lang_pike.c
Examining data/trueprint-5.4/src/expand_str.h
Examining data/trueprint-5.4/src/input.h
Examining data/trueprint-5.4/src/debug.h
Examining data/trueprint-5.4/src/headers.h
Examining data/trueprint-5.4/src/main.h
Examining data/trueprint-5.4/src/postscript.h
Examining data/trueprint-5.4/src/lang_verilog.h
Examining data/trueprint-5.4/src/expand_str.c
Examining data/trueprint-5.4/src/index.h
Examining data/trueprint-5.4/src/lang_perl.c
Examining data/trueprint-5.4/src/lang_report.h
Examining data/trueprint-5.4/src/lang_java.h
Examining data/trueprint-5.4/src/printers_fl.h
Examining data/trueprint-5.4/src/output.h
Examining data/trueprint-5.4/src/utils.h
Examining data/trueprint-5.4/src/lang_perl.h
Examining data/trueprint-5.4/src/language.h
Examining data/trueprint-5.4/src/main.c
Examining data/trueprint-5.4/src/lang_c.h
Examining data/trueprint-5.4/src/trueprint.h
Examining data/trueprint-5.4/src/lang_text.h
Examining data/trueprint-5.4/src/openpipe.c
Examining data/trueprint-5.4/src/options.c
Examining data/trueprint-5.4/src/printers_fl.c
Examining data/trueprint-5.4/src/options.h
Examining data/trueprint-5.4/src/index.c
Examining data/trueprint-5.4/src/lang_cxx.c
Examining data/trueprint-5.4/src/headers.c
Examining data/trueprint-5.4/src/lang_c.c
Examining data/trueprint-5.4/src/lang_report.c
Examining data/trueprint-5.4/src/lang_java.c
Examining data/trueprint-5.4/src/getopt1.c
Examining data/trueprint-5.4/src/getopt.h
Examining data/trueprint-5.4/src/utils.c
Examining data/trueprint-5.4/src/lang_sh.c
Examining data/trueprint-5.4/src/lang_verilog.c
Examining data/trueprint-5.4/src/postscript.c
Examining data/trueprint-5.4/src/print_prompt.h
Examining data/trueprint-5.4/src/lang_cxx.h
Examining data/trueprint-5.4/src/lang_pike.h
Examining data/trueprint-5.4/src/print_prompt.c
Examining data/trueprint-5.4/src/diffs.c
Examining data/trueprint-5.4/src/lang_text.c
Examining data/trueprint-5.4/src/input.c
Examining data/trueprint-5.4/src/openpipe.h
Examining data/trueprint-5.4/src/diffs.h
Examining data/trueprint-5.4/src/getopt.c
Examining data/trueprint-5.4/src/lang_pascal.h
Examining data/trueprint-5.4/src/lang_sh.h
Examining data/trueprint-5.4/src/output.c

FINAL RESULTS:

data/trueprint-5.4/src/debug.c:57:3:  [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, message, ap);
data/trueprint-5.4/src/diffs.c:121:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(command,"%s%s",diffs_string,newfile);
data/trueprint-5.4/src/diffs.c:125:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(command,"%s %s%s %s", diff_cmd,diffs_string,newfile,newfile);
data/trueprint-5.4/src/diffs.c:130:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(command, "%s %s %s", diff_cmd, diffs_string, newfile);
data/trueprint-5.4/src/diffs.c:169:4:  [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(stderr, gettext(CMD_NAME ": internal error reading diffs\n"));
data/trueprint-5.4/src/diffs.c:267:7:  [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(stderr, gettext(CMD_NAME ": warning, bad diffs stream format char %c!\n"), diff_type);
data/trueprint-5.4/src/diffs.c:276:7:  [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(stderr, gettext(CMD_NAME ": warning, bad diffs stream format!\n"));
data/trueprint-5.4/src/diffs.c:366:7:  [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(stderr, gettext(CMD_NAME ": diffs stream in unexpected format\n"));
data/trueprint-5.4/src/expand_str.c:148:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(output_buffer, "%s %s %02d %02d:%02d:%02d %4d",
data/trueprint-5.4/src/expand_str.c:202:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(output_buffer, "%s %s %02d %02d:%02d:%02d %4d",
data/trueprint-5.4/src/expand_str.c:242:3:  [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(*buffer_ptr, string);
data/trueprint-5.4/src/index.c:257: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(functions[no_of_functions].name, name);
data/trueprint-5.4/src/index.c:523:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	      sprintf(output_line,"          %-24s %4ld  (%s)",
data/trueprint-5.4/src/index.c:532:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	      sprintf(output_line,"          %-24s %4ld  (%s)\n",
data/trueprint-5.4/src/index.c:634:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(string,"          %-24s %4ld",
data/trueprint-5.4/src/input.c:135:4:  [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(stderr, gettext(CMD_NAME ": cannot read file %s, %s\n"),
data/trueprint-5.4/src/input.c:155:4:  [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(stderr, gettext(CMD_NAME ": cannot read file %s, %s\n"),
data/trueprint-5.4/src/language.c:109: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(stderr, gettext(CMD_NAME ": unrecognized language type: %s\n"), value);
data/trueprint-5.4/src/main.c:242:4:  [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(stderr, gettext(CMD_NAME ": cannot use redirect-output option with stdin\n"));
data/trueprint-5.4/src/main.c:248:7:  [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(output_filename,file_names[0]);
data/trueprint-5.4/src/main.c:288:7:  [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(stderr, gettext(CMD_NAME ": empty input, not submitting print job\n"));
data/trueprint-5.4/src/main.c:312:4:  [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(stderr, gettext(CMD_NAME ": cannot open %s for writing, %s\n"),
data/trueprint-5.4/src/main.c:349:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(print_cmd_line,"%s", getenv("TP_PRINT_CMD"));
data/trueprint-5.4/src/main.c:353:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(print_cmd_line,"%s %s %s%d", PRINT_CMD, printer_destination, PRINT_CMD_COUNT_FLAG, no_of_copies);
data/trueprint-5.4/src/main.c:463: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(stderr, gettext(CMD_NAME ": cannot specify stdin twice on command line\n"));
data/trueprint-5.4/src/main.c:488:4:  [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(stderr, gettext(CMD_NAME ": cannot open file %s, %s\n"),
data/trueprint-5.4/src/main.c:517:4:  [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(stderr, gettext(CMD_NAME ": cannot read %s - possibly an empty file\n"), current_filename);
data/trueprint-5.4/src/main.c:526:8:  [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(stderr, gettext(CMD_NAME ": cannot close %s, %s\n"),
data/trueprint-5.4/src/main.c:688:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(printer_destination, "%s %s", PRINT_CMD_DEST_FLAG, destination);
data/trueprint-5.4/src/main.c:833:4:  [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(gettext(CMD_NAME ": Unrecognized help option:%s\nUse --help for valid options\n"),value);
data/trueprint-5.4/src/main.c:905:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(log_cmd,"%s %s", LOGTOOL, "trueprint");
data/trueprint-5.4/src/main.c:907:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(log_cmd, "%s %s%s%s", log_cmd, "TPOPTS=\"<",tp_opts,">\"");
data/trueprint-5.4/src/main.c:917:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(log_cmd, "%s \" <%s>\"", log_cmd, argv[i]);
data/trueprint-5.4/src/main.c:919:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  system(log_cmd);
data/trueprint-5.4/src/openpipe.c:95:4:  [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(stderr, gettext(CMD_NAME ": cannot redirect %s for child, %s\n"), child_pipe_mode, strerror(errno));
data/trueprint-5.4/src/openpipe.c:110:8:  [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(stderr, gettext(CMD_NAME ": failed to open pipe properly\n"));
data/trueprint-5.4/src/openpipe.c:115:11:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      if (system(command) < 0)
data/trueprint-5.4/src/openpipe.c:129:4:  [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(stderr, gettext(CMD_NAME ": cannot close %s end of pipe for parent, %s\n"), child_pipe_mode, strerror(errno));
data/trueprint-5.4/src/openpipe.c:144:8:  [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(stderr, gettext(CMD_NAME ": failed to open pipe properly\n"));
data/trueprint-5.4/src/options.c:318:4:  [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(stderr, gettext(CMD_NAME ": failed to parse options\n"));
data/trueprint-5.4/src/options.c:955:4:  [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(stderr, gettext(CMD_NAME ": must have one character parameter for %s%s flag, but got '%s'\n"),prefix,option_name,value);
data/trueprint-5.4/src/options.c:975:8:  [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(stderr, gettext(CMD_NAME ": must have one character parameter for %s%s flag, but got '%s'\n"),prefix,option_name,value);
data/trueprint-5.4/src/options.c:981:8:  [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(stderr, gettext(CMD_NAME ": option %s%s can only take %c or %c, not %c\n"),prefix,option_name,op->t.ochoice.choice1,op->t.ochoice.choice2,*value);
data/trueprint-5.4/src/options.c:1038:8:  [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(stderr, gettext(CMD_NAME ": option %s%s not between %d and %d\n"),prefix,option_name,op->t.oshrt.min,op->t.oshrt.max);
data/trueprint-5.4/src/options.c:1070:8:  [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(stderr, gettext(CMD_NAME ": option %s%s not between %d and %d\n"),prefix,option_name,op->t.oint.min,op->t.oint.max);
data/trueprint-5.4/src/output.c:129: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(stderr, gettext(CMD_NAME ": line too long!  Are you sure this is a program listing?\n"));
data/trueprint-5.4/src/print_prompt.c:99:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(prompt, "Print page %5ld, page %3ld of %s %s(%s%s)?",
data/trueprint-5.4/src/print_prompt.c:103:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(prompt, "Print page %5ld, page %3ld of %s %s?",
data/trueprint-5.4/src/print_prompt.c:111:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(prompt, "Print %s?", filename);
data/trueprint-5.4/src/print_prompt.c:224:14:  [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.
		default:   fprintf(stderr, gettext(CMD_NAME ": ignoring unrecognized letter %c\n"), *s_index);
data/trueprint-5.4/src/printers_fl.c:123:7:  [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(stderr, gettext(CMD_NAME ": warning: cannot open %s, %s\n"), printers_filename, strerror(errno));
data/trueprint-5.4/src/printers_fl.c:179:7:  [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(stderr, gettext(CMD_NAME ": warning: cannot find printer %s in %s\n"), printer, printers_filename);
data/trueprint-5.4/src/printers_fl.c:180:7:  [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(stderr, gettext(CMD_NAME ": send mail to %s if you want to have it added\n"), TP_ADMIN_USER);
data/trueprint-5.4/src/printers_fl.c:201:7:  [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(stderr, gettext(CMD_NAME ": warning: cannot find printer type %s in %s\n"), this_printer->type, printers_filename);
data/trueprint-5.4/src/printers_fl.c:202:7:  [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(stderr, gettext(CMD_NAME ": you should notify %s\n"), TP_ADMIN_USER);
data/trueprint-5.4/src/printers_fl.c:245:7:  [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(stderr, gettext(CMD_NAME ": printers file %s: type %s: second field must be 1 or 2, but is %d\n"), printers_filename, r->name, r->sides);
data/trueprint-5.4/src/utils.c:30:7:  [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(stderr, gettext(CMD_NAME ": cannot allocate memory\n"));
data/trueprint-5.4/src/utils.c:44:7:  [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(stderr, gettext(CMD_NAME ": cannot reallocate memory\n"));
data/trueprint-5.4/tests/OLDtest6.c:73:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (system(command) < 0) {
data/trueprint-5.4/tests/test1.c:73:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (system(command) < 0) {
data/trueprint-5.4/tests/test6.c:73:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (system(command) < 0) {
data/trueprint-5.4/src/diffs.c:106:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if ((diff_cmd = getenv("TP_DIFF_CMD")) == NULL)
data/trueprint-5.4/src/expand_str.c:218:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *u = getenv("USER");
data/trueprint-5.4/src/getopt.c:207:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
char *getenv ();
data/trueprint-5.4/src/getopt.c:398:21:  [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.
  posixly_correct = getenv ("POSIXLY_CORRECT");
data/trueprint-5.4/src/getopt.c:961:1:  [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.
getopt (argc, argv, optstring)
data/trueprint-5.4/src/getopt.c:991:11:  [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.
      c = getopt (argc, argv, "abc:d:0123456789");
data/trueprint-5.4/src/getopt.h:106: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 argc, char *const *argv, const char *shortopts);
data/trueprint-5.4/src/getopt.h:108: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 ();
data/trueprint-5.4/src/getopt.h:110:12:  [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.
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
data/trueprint-5.4/src/getopt.h:122: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 ();
data/trueprint-5.4/src/getopt.h:123:12:  [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.
extern int getopt_long ();
data/trueprint-5.4/src/getopt1.c:68:1:  [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.
getopt_long (argc, argv, options, long_options, opt_index)
data/trueprint-5.4/src/getopt1.c:124:11:  [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.
      c = getopt_long (argc, argv, "abc:d:0123456789",
data/trueprint-5.4/src/main.c:174:25:  [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.
  handle_string_options(getenv("TP_OPTS"));
data/trueprint-5.4/src/main.c:343:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      char *tp_print_cmd = getenv("TP_PRINT_CMD");
data/trueprint-5.4/src/main.c:349:33:  [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.
	  sprintf(print_cmd_line,"%s", getenv("TP_PRINT_CMD"));
data/trueprint-5.4/src/main.c:676:21:  [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.
      destination = getenv("PRINTER");
data/trueprint-5.4/src/main.c:903:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  tp_opts = getenv("TP_OPTS");
data/trueprint-5.4/src/options.c:312:4:  [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.
	  getopt_long((unsigned int)argc, argv,
data/trueprint-5.4/src/postscript.c:360:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	      char *u = getenv("USER");
data/trueprint-5.4/src/printers_fl.c:55:25:  [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.
    printers_filename = getenv("TP_PRINTERS_FILE");
data/trueprint-5.4/src/printers_fl.c:107:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      if (((env_printer = getenv("PRINTER")) == NULL) || (*env_printer == '\0'))
data/trueprint-5.4/tests/test2.c:20:1:  [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.
getopt(int nargc, char **nargv, char *ostr)
data/trueprint-5.4/src/diffs.c:92: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	command[COMMAND_LEN];
data/trueprint-5.4/src/expand_str.c:136:7:  [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(output_buffer, "%02d", t->tm_mon + 1);
data/trueprint-5.4/src/expand_str.c:139:7:  [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(output_buffer, "%02d", t->tm_mday);
data/trueprint-5.4/src/expand_str.c:142:7:  [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(output_buffer, "%4d", t->tm_year + 1900);
data/trueprint-5.4/src/expand_str.c:145:7:  [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(output_buffer, "%02d/%02d/%02d", t->tm_mon+1, t->tm_mday, t->tm_year);
data/trueprint-5.4/src/expand_str.c:152:7:  [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(output_buffer, "%02d", t->tm_hour);
data/trueprint-5.4/src/expand_str.c:155:7:  [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(output_buffer, "%02d", t->tm_min);
data/trueprint-5.4/src/expand_str.c:158:7:  [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(output_buffer, "%02d", t->tm_sec);
data/trueprint-5.4/src/expand_str.c:161:7:  [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(output_buffer, "%02d:%02d:%02d", t->tm_hour, t->tm_min, t->tm_sec);
data/trueprint-5.4/src/expand_str.c:164:7:  [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(output_buffer, "%3d", t->tm_yday);
data/trueprint-5.4/src/expand_str.c:167:7:  [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(output_buffer, "%d", t->tm_wday);
data/trueprint-5.4/src/expand_str.c:175: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(output_buffer, "%02d:%02dpm", t->tm_hour-12, t->tm_min);
data/trueprint-5.4/src/expand_str.c:177: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(output_buffer, "%02d:%02dam", t->tm_hour, t->tm_min);
data/trueprint-5.4/src/expand_str.c:182:7:  [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(output_buffer, "%ld", file_page_number);
data/trueprint-5.4/src/expand_str.c:186:7:  [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(output_buffer, "%ld", page_number);
data/trueprint-5.4/src/expand_str.c:190:7:  [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(output_buffer, "%ld", get_file_last_page(file_number) - get_file_first_page(file_number) + 1);
data/trueprint-5.4/src/expand_str.c:196:7:  [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(output_buffer, "%02d/%02d/%02d", ft->tm_mon+1, ft->tm_mday, ft->tm_year);
data/trueprint-5.4/src/expand_str.c:207:7:  [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(output_buffer, "%ld", total_pages);
data/trueprint-5.4/src/headers.c:87: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 page_no_string[10];
data/trueprint-5.4/src/headers.c:89: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(page_no_string, "Page %ld", page_no);
data/trueprint-5.4/src/headers.c:103: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 page_no_string[10];
data/trueprint-5.4/src/headers.c:105: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(page_no_string, "Page %ld", page_no);
data/trueprint-5.4/src/index.c:42: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	name[SYMBOL_LEN];
data/trueprint-5.4/src/index.c:516: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	output_line[INPUT_LINE_LEN];
data/trueprint-5.4/src/index.c:632: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	string[INPUT_LINE_LEN];
data/trueprint-5.4/src/input.c:122:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char	input_buffer[BUFFER_SIZE];
data/trueprint-5.4/src/lang_c.c:75:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char		fn_name[SYMBOL_LEN] = "UNINITIALIZED";
data/trueprint-5.4/src/lang_c.c:327:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char	fn_name[SYMBOL_LEN] = "UNINITIALIZED";
data/trueprint-5.4/src/lang_cxx.c:75:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char		fn_name[SYMBOL_LEN] = "UNINITIALIZED";
data/trueprint-5.4/src/lang_java.c:100:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char	fn_name[SYMBOL_LEN] = "UNINITIALIZED";
data/trueprint-5.4/src/lang_pascal.c:78:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char		fn_name[SYMBOL_LEN];
data/trueprint-5.4/src/lang_perl.c:78: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 nestable_chars[256];
data/trueprint-5.4/src/lang_perl.c:126:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char hd_end[SYMBOL_LEN];
data/trueprint-5.4/src/lang_perl.c:468:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char function_name[SYMBOL_LEN];
data/trueprint-5.4/src/lang_pike.c:103:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char		fn_name[SYMBOL_LEN] = "UNINITIALIZED";
data/trueprint-5.4/src/lang_report.c:52:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char	tag_name[SYMBOL_LEN]="UNINITIALIZED";
data/trueprint-5.4/src/lang_sh.c:95:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char	f1_name[SYMBOL_LEN]="UNINITIALIZED";
data/trueprint-5.4/src/lang_sh.c:96:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char	fn_name[SYMBOL_LEN]="UNINITIALIZED";
data/trueprint-5.4/src/lang_sh.c:97:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char	here_marker[SYMBOL_LEN];
data/trueprint-5.4/src/main.c:342: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 print_cmd_line[200];
data/trueprint-5.4/src/main.c:458: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.
	      char input_buffer[BUFFER_SIZE];
data/trueprint-5.4/src/main.c:467:30:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	      stdin_stream = fileno(tmpfile());
data/trueprint-5.4/src/main.c:486:3:  [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).
		open(file_names[file_number], O_RDONLY)) == -1)
data/trueprint-5.4/src/openpipe.c:106: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 buff[1];
data/trueprint-5.4/src/openpipe.c:140: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 buff[1];
data/trueprint-5.4/src/options.c:198: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	arguments[100][100];
data/trueprint-5.4/src/options.c:199: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	*opt_argv[100];
data/trueprint-5.4/src/options.c:278: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 short_option_list[125]; /* 125 = (26+26+10)*2 + 1 */
data/trueprint-5.4/src/options.c:1035:19:  [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).
	  int intvalue = atoi(value);
data/trueprint-5.4/src/options.c:1067:19:  [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).
	  int intvalue = atoi(value);
data/trueprint-5.4/src/output.c:62: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 *segment_ends[4][3] = {
data/trueprint-5.4/src/output.c:306:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char	input_line[MAXLINELENGTH];
data/trueprint-5.4/src/print_prompt.c:66: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 prompt[MAXLINELENGTH];
data/trueprint-5.4/src/print_prompt.c:67: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 response[INPUT_LINE_LEN];
data/trueprint-5.4/src/print_prompt.c:108: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(prompt, "Print blank page %5ld?", page_number+1);
data/trueprint-5.4/src/printers_fl.c:72: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/trueprint-5.4/src/printers_fl.c:121:24:  [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 ((printers_file = fopen(printers_filename, "r")) == NULL)
data/trueprint-5.4/src/printers_fl.c:236:22:  [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).
  r->sides = (short) atoi(strtok(NULL, ":"));
data/trueprint-5.4/src/printers_fl.c:237:30:  [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).
  r->left = (unsigned short) atoi(strtok(NULL, ":"));
data/trueprint-5.4/src/printers_fl.c:238:31:  [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).
  r->right = (unsigned short) atoi(strtok(NULL, ":"));
data/trueprint-5.4/src/printers_fl.c:239:29:  [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).
  r->top = (unsigned short) atoi(strtok(NULL, ":"));
data/trueprint-5.4/src/printers_fl.c:240:32:  [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).
  r->bottom = (unsigned short) atoi(strtok(NULL, ":"));
data/trueprint-5.4/src/diffs.c:162:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((next_char = getc(stream)) == ' ')
data/trueprint-5.4/src/diffs.c:173:27:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while ((next_char = getc(stream)) == ' ')
data/trueprint-5.4/src/diffs.c:209:24:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ((next_char = getc(stream)) == EOF) break;
data/trueprint-5.4/src/diffs.c:258:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  diff_type = getc(diffs_stream);	/* a=add, d=del, c=change */
data/trueprint-5.4/src/diffs.c:295:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while (getc(diffs_stream) != '\n')
data/trueprint-5.4/src/diffs.c:332:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  *input_char = (char)getc(diffs_stream);
data/trueprint-5.4/src/diffs.c:364:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if ((getc(diffs_stream)!='<') || (getc(diffs_stream)!=' '))
data/trueprint-5.4/src/diffs.c:364:37:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if ((getc(diffs_stream)!='<') || (getc(diffs_stream)!=' '))
data/trueprint-5.4/src/diffs.c:385:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (getc(diffs_stream) != '\n')
data/trueprint-5.4/src/diffs.c:410:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while (getc(diffs_stream) != '\n')
data/trueprint-5.4/src/expand_str.c:235: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).
  required_length = strlen(*buffer_ptr)+strlen(string)+1;
data/trueprint-5.4/src/expand_str.c:235: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).
  required_length = strlen(*buffer_ptr)+strlen(string)+1;
data/trueprint-5.4/src/expand_str.c:252: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).
  required_length = strlen(*buffer_ptr)+2;
data/trueprint-5.4/src/getopt.c:231:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
extern int strlen (const char *);
data/trueprint-5.4/src/getopt.c:429:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      int len = nonoption_flags_max_len = strlen (orig_str);
data/trueprint-5.4/src/getopt.c:650: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).
		== (unsigned int) strlen (p->name))
data/trueprint-5.4/src/getopt.c:674: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).
	  nextchar += strlen (nextchar);
data/trueprint-5.4/src/getopt.c:704: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).
		  nextchar += strlen (nextchar);
data/trueprint-5.4/src/getopt.c:720: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).
		  nextchar += strlen (nextchar);
data/trueprint-5.4/src/getopt.c:725: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).
	  nextchar += strlen (nextchar);
data/trueprint-5.4/src/getopt.c:836:51:  [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 ((unsigned int) (nameend - nextchar) == strlen (p->name))
data/trueprint-5.4/src/getopt.c:859: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).
	    nextchar += strlen (nextchar);
data/trueprint-5.4/src/getopt.c:879:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    nextchar += strlen (nextchar);
data/trueprint-5.4/src/getopt.c:893:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    nextchar += strlen (nextchar);
data/trueprint-5.4/src/getopt.c:897: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).
	    nextchar += strlen (nextchar);
data/trueprint-5.4/src/index.c:155:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t length = strlen(filename);
data/trueprint-5.4/src/index.c:248:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t length = strlen(name);
data/trueprint-5.4/src/input.c:19:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int read(int fildes, void *buf, unsigned int nbyte);
data/trueprint-5.4/src/input.c:133:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ((buffer_size = read(input_stream,input_buffer,BUFFER_SIZE)) < 0)
data/trueprint-5.4/src/input.c:153:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ((buffer_size = read(input_stream,input_buffer,BUFFER_SIZE)) < 0)
data/trueprint-5.4/src/lang_pascal.c:156: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 (++token_index == strlen(procedure_string))
data/trueprint-5.4/src/lang_pascal.c:165: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 (++token_index == strlen(function_string))
data/trueprint-5.4/src/lang_pascal.c:174: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 (++token_index == strlen(begin_string))
data/trueprint-5.4/src/lang_pascal.c:187: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 (++token_index == strlen(end_string))
data/trueprint-5.4/src/lang_sh.c:308:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      if (f1_index == strlen(function))
data/trueprint-5.4/src/main.c:247:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      output_filename = xmalloc(strlen(file_names[0])+4);
data/trueprint-5.4/src/main.c:260: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).
	    suffix = output_filename+strlen(output_filename);
data/trueprint-5.4/src/main.c:303:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if ((strlen(output_filename) > 0) && (strcmp(output_filename,"-") != 0))
data/trueprint-5.4/src/main.c:469:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	      while ((buffer_size = read(fileno(stdin),input_buffer,BUFFER_SIZE)) > 0)
data/trueprint-5.4/src/main.c:687:37:  [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).
      printer_destination = xmalloc(strlen(destination)+strlen(PRINT_CMD_DEST_FLAG)+2);
data/trueprint-5.4/src/main.c:687:57:  [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).
      printer_destination = xmalloc(strlen(destination)+strlen(PRINT_CMD_DEST_FLAG)+2);
data/trueprint-5.4/src/main.c:911: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).
      if ( (strlen(log_cmd) + 6 + strlen(argv[i])) > log_cmd_length )
data/trueprint-5.4/src/main.c:911: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).
      if ( (strlen(log_cmd) + 6 + strlen(argv[i])) > log_cmd_length )
data/trueprint-5.4/src/openpipe.c:107:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  read(fildes[child_pipe_end],buff,1);
data/trueprint-5.4/src/openpipe.c:141:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  read(fildes[parent_pipe_end],buff,1);
data/trueprint-5.4/src/options.c:206: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).
  if (strlen(options) == 0) return;
data/trueprint-5.4/src/options.c:953: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).
      if (strlen(value) != 1)
data/trueprint-5.4/src/options.c:970: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).
      if (strlen(prefix) == 1)
data/trueprint-5.4/src/options.c:973:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  if (strlen(value) != 1)
data/trueprint-5.4/src/output.c:236:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  input_line_length = (int)strlen(input_line);
data/trueprint-5.4/src/output.c:383:32:  [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).
      input_line_length = (int)strlen(input_line);
data/trueprint-5.4/src/postscript.c:719: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 ((message != NULL) && (strlen(message) != 0))
data/trueprint-5.4/src/postscript.c:721:45:  [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).
      message_pointsize = printable_width / strlen(message);
data/trueprint-5.4/src/print_prompt.c:228:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      && (strlen(fn_name) == name_length)
data/trueprint-5.4/src/printers_fl.c:57:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if ((printers_filename == NULL) || (strlen(printers_filename) == 0))
data/trueprint-5.4/src/printers_fl.c:132: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).
      if (strlen(buffer) == 0)
data/trueprint-5.4/src/printers_fl.c:270: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).
  r->type[strlen(r->type)-1] = '\0';

ANALYSIS SUMMARY:

Hits = 203
Lines analyzed = 12234 in approximately 0.31 seconds (39631 lines/second)
Physical Source Lines of Code (SLOC) = 8560
Hits@level = [0] 315 [1]  57 [2]  62 [3]  23 [4]  61 [5]   0
Hits@level+ = [0+] 518 [1+] 203 [2+] 146 [3+]  84 [4+]  61 [5+]   0
Hits/KSLOC@level+ = [0+] 60.514 [1+] 23.715 [2+] 17.0561 [3+] 9.81308 [4+] 7.12617 [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.