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/rlpr-2.05/intl/gettextP.h
Examining data/rlpr-2.05/intl/hash-string.h
Examining data/rlpr-2.05/intl/loadinfo.h
Examining data/rlpr-2.05/intl/bindtextdom.c
Examining data/rlpr-2.05/intl/dcgettext.c
Examining data/rlpr-2.05/intl/dgettext.c
Examining data/rlpr-2.05/intl/gettext.c
Examining data/rlpr-2.05/intl/finddomain.c
Examining data/rlpr-2.05/intl/loadmsgcat.c
Examining data/rlpr-2.05/intl/localealias.c
Examining data/rlpr-2.05/intl/textdomain.c
Examining data/rlpr-2.05/intl/l10nflist.c
Examining data/rlpr-2.05/intl/explodename.c
Examining data/rlpr-2.05/intl/intl-compat.c
Examining data/rlpr-2.05/po/cat-id-tbl.c
Examining data/rlpr-2.05/acconfig.h
Examining data/rlpr-2.05/lib/error.h
Examining data/rlpr-2.05/lib/lib.h
Examining data/rlpr-2.05/lib/getopt.h
Examining data/rlpr-2.05/lib/xstrtol.h
Examining data/rlpr-2.05/lib/xstrtoul.h
Examining data/rlpr-2.05/lib/alloca.c
Examining data/rlpr-2.05/lib/getopt1.c
Examining data/rlpr-2.05/lib/strcasecmp.c
Examining data/rlpr-2.05/lib/strdup.c
Examining data/rlpr-2.05/lib/strstr.c
Examining data/rlpr-2.05/lib/xmalloc.c
Examining data/rlpr-2.05/lib/xstrtoul.c
Examining data/rlpr-2.05/lib/xstrtol.c
Examining data/rlpr-2.05/lib/xstrdup.c
Examining data/rlpr-2.05/lib/error.c
Examining data/rlpr-2.05/src/client.c
Examining data/rlpr-2.05/src/rlprm.c
Examining data/rlpr-2.05/src/rlprrc.h
Examining data/rlpr-2.05/src/rlprrc.c
Examining data/rlpr-2.05/src/component.c
Examining data/rlpr-2.05/src/component.h
Examining data/rlpr-2.05/src/client.h
Examining data/rlpr-2.05/src/intl.h
Examining data/rlpr-2.05/src/rlprm.h
Examining data/rlpr-2.05/src/rlpq.c
Examining data/rlpr-2.05/src/rlprd.h
Examining data/rlpr-2.05/src/util.c
Examining data/rlpr-2.05/src/rfc1179.h
Examining data/rlpr-2.05/src/rlpq.h
Examining data/rlpr-2.05/src/rlpr.c
Examining data/rlpr-2.05/src/msg.c
Examining data/rlpr-2.05/src/msg.h
Examining data/rlpr-2.05/src/util.h
Examining data/rlpr-2.05/src/rlpr.h
Examining data/rlpr-2.05/src/rlprd.c

FINAL RESULTS:

data/rlpr-2.05/lib/error.c:129: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, args);
data/rlpr-2.05/lib/error.c:135:3:  [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, message, a1, a2, a3, a4, a5, a6, a7, a8);
data/rlpr-2.05/lib/error.c:197: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, args);
data/rlpr-2.05/lib/error.c:203:3:  [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, message, a1, a2, a3, a4, a5, a6, a7, a8);
data/rlpr-2.05/lib/error.h:30:23:  [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.
#   define __printf__ printf
data/rlpr-2.05/lib/strdup.c:27: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).
char *strcpy ();
data/rlpr-2.05/lib/strdup.c:41: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 (newstr, str);
data/rlpr-2.05/lib/xstrdup.c:41:10:  [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).
  return strcpy (xmalloc (strlen (string) + 1), string);
data/rlpr-2.05/src/component.c:98:6:  [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(full_opt_list, component[i]->gen_opt_list);
data/rlpr-2.05/src/msg.c:178:2:  [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(stream, _(format), ap);
data/rlpr-2.05/src/msg.c:179:2:  [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(stream,	 errno ? ": %s\n" : "\n", strerror(errno));
data/rlpr-2.05/src/rlpq.c:151:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(request, "%c%s", rlpr_rlpq->long_output ? SENDQL : SENDQS, printer);
data/rlpr-2.05/src/rlpq.c:155:2:  [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(request, user_list[i]);
data/rlpr-2.05/src/rlpr.c:134:27:  [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 (argv[optind] != 0 && access(argv[optind], R_OK) == -1) {
data/rlpr-2.05/src/rlpr.c:453:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(t_filename, "%s/%s", rlpr_rlpr->tmpdir, df_name);
data/rlpr-2.05/src/rlpr.c:507:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(entry, "%c%s\n", op, value);
data/rlpr-2.05/src/rlpr.c:568:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(*cf_path, "%s/cfA%03d", rlpr_rlpr->tmpdir, (int)getpid() % 1000);
data/rlpr-2.05/src/rlpr.c:569:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(*cf_path, rlpr_rlpr->localhost);
data/rlpr-2.05/src/rlprm.c:119:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(request, "%c%s %s", REMJ, printer, rlpr_rlprm->user);
data/rlpr-2.05/src/rlprm.c:123:2:  [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(request, argv[i]);
data/rlpr-2.05/src/rlprrc.c:95:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(rlprrc_name, "%s/.%s", home, R_RLPRRC_NAME);
data/rlpr-2.05/src/rlprrc.c:113:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(rlprrc_name, "%s/%s", confdir, R_RLPRRC_NAME);
data/rlpr-2.05/intl/loadmsgcat.c:819: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.
	      outcharset = getenv ("OUTPUT_CHARSET");
data/rlpr-2.05/lib/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/rlpr-2.05/lib/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/rlpr-2.05/lib/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/rlpr-2.05/lib/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/rlpr-2.05/lib/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/rlpr-2.05/lib/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/rlpr-2.05/lib/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/rlpr-2.05/src/client.c:52:30:  [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.
    rlpr_client->proxyhost	= getenv("RLPR_PROXYHOST");
data/rlpr-2.05/src/client.c:53:30:  [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.
    rlpr_client->printhost	= getenv("RLPR_PRINTHOST");
data/rlpr-2.05/src/client.c:54: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.
    rlpr_client->printer	= getenv("PRINTER");
data/rlpr-2.05/src/client.c:56: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.
	rlpr_client->printer	= getenv("LPDEST");
data/rlpr-2.05/src/component.c:103:6:  [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, full_opt_list, full_opts, 0);
data/rlpr-2.05/src/component.c:166:7:  [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(arg_count, arg_vector, opt_list, opts, 0);
data/rlpr-2.05/src/component.c:213: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.
    rlpr_comp->ext_name = getenv("RLPR_EXTENSION");
data/rlpr-2.05/src/component.c:214: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.
    rlpr_comp->ext_args = getenv("RLPR_EXTARGS");
data/rlpr-2.05/src/rlpr.c:220:26:  [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.
    rlpr_rlpr->tmpdir	 = getenv("TMPDIR");
data/rlpr-2.05/src/rlprrc.c:87:24:  [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       *home = getenv("HOME");
data/rlpr-2.05/src/rlprrc.c:88: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.
    char       *confdir = getenv("RLPR_CONFDIR");
data/rlpr-2.05/intl/bindtextdom.c:159:4:  [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 (result, dirname, len);
data/rlpr-2.05/intl/bindtextdom.c:197:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy (result, codeset, len);
data/rlpr-2.05/intl/bindtextdom.c:233:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (new_binding->domainname, domainname, len);
data/rlpr-2.05/intl/bindtextdom.c:258: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 (result, dirname, len);
data/rlpr-2.05/intl/bindtextdom.c:289:8:  [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 (result, codeset, len);
data/rlpr-2.05/intl/finddomain.c:133:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (locale, alias_value, len);
data/rlpr-2.05/intl/gettextP.h:153: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 domainname[ZERO];
data/rlpr-2.05/intl/l10nflist.c:247:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (cp, dirlist, dirlist_len);
data/rlpr-2.05/intl/loadmsgcat.c:454:10:  [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).
# define open   __open
data/rlpr-2.05/intl/loadmsgcat.c:806:4:  [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 (charset, charsetstr, len);
data/rlpr-2.05/intl/loadmsgcat.c:853:8:  [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 (tmp, outcharset, len);
data/rlpr-2.05/intl/loadmsgcat.c:854:8:  [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 (tmp + len, "//TRANSLIT", 10 + 1);
data/rlpr-2.05/intl/loadmsgcat.c:931:8:  [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 (domain_file->filename, O_RDONLY | O_BINARY);
data/rlpr-2.05/intl/loadmsgcat.c:1202: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 (mem, static_segments, segsize);
data/rlpr-2.05/intl/loadmsgcat.c:1211:8:  [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 (mem, sysdep_segment_values[sysdepref], n);
data/rlpr-2.05/intl/localealias.c:216: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 (full_fname, fname, fname_len);
data/rlpr-2.05/intl/localealias.c:217: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 (&full_fname[fname_len], aliasfile, sizeof aliasfile);
data/rlpr-2.05/intl/localealias.c:220:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen (full_fname, "r");
data/rlpr-2.05/intl/localealias.c:238: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 buf[BUFSIZ];
data/rlpr-2.05/intl/localealias.c:251: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 altbuf[BUFSIZ];
data/rlpr-2.05/intl/localealias.c:331:26:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      map[nmap].alias = memcpy (&string_space[string_space_act],
data/rlpr-2.05/intl/localealias.c:335:26:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	      map[nmap].value = memcpy (&string_space[string_space_act],
data/rlpr-2.05/intl/textdomain.c:116:2:  [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 (new_domain, domainname, len);
data/rlpr-2.05/lib/alloca.c:144: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 align[ALIGN_SIZE];	/* To force sizeof(header).  */
data/rlpr-2.05/src/msg.c:161: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 	   buf[1024];
data/rlpr-2.05/src/msg.h: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       *level[7];		/* level -> stringified level mapping */
data/rlpr-2.05/src/rlpq.c:99: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		buffer[BUFSIZ];
data/rlpr-2.05/src/rlpr.c:101: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(req, "%c%.*s\n", RECVJ, R_REQ_LEN - 5, client_get_printer());
data/rlpr-2.05/src/rlpr.c:358: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	hdr[R_BUFMAX];
data/rlpr-2.05/src/rlpr.c:365: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(hdr, "%c"R_OFF_T_FMT" %.*s\n", cmd, fd_size, MAXHOSTNAMELEN, name);
data/rlpr-2.05/src/rlpr.c:375:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	buffer[R_BUFMAX];
data/rlpr-2.05/src/rlpr.c:443:10:  [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).
	df_fd = open(filename, O_RDONLY);
data/rlpr-2.05/src/rlpr.c:455:10:  [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).
	df_fd = open(t_filename, O_RDWR|O_CREAT|O_EXCL, 0600);
data/rlpr-2.05/src/rlpr.c:575: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).
    cf_fd = open(*cf_path, O_RDWR|O_TRUNC|O_CREAT, 0600);
data/rlpr-2.05/src/rlprd.c:154: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		printhost[MAXHOSTNAMELEN + 1];
data/rlpr-2.05/src/rlprd.c:223:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		buffer[R_BUFMAX];
data/rlpr-2.05/src/rlprrc.c:28: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	line_buf[R_LINE_LEN];
data/rlpr-2.05/src/rlprrc.c:97: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).
	rcfile = fopen(rlprrc_name, "r");
data/rlpr-2.05/src/rlprrc.c:118: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).
	rcfile = fopen(rlprrc_name, "r");
data/rlpr-2.05/src/util.c:80:2:  [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(&sin->sin_addr, hp->h_addr, hp->h_length);
data/rlpr-2.05/src/util.c:381:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char		buffer[R_BUFMAX];
data/rlpr-2.05/intl/bindtextdom.c:156:22:  [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 len = strlen (dirname) + 1;
data/rlpr-2.05/intl/bindtextdom.c:194: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).
		  size_t len = strlen (codeset) + 1;
data/rlpr-2.05/intl/bindtextdom.c:226:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t len = strlen (domainname) + 1;
data/rlpr-2.05/intl/bindtextdom.c:254: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).
		  size_t len = strlen (dirname) + 1;
data/rlpr-2.05/intl/bindtextdom.c:285: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).
	      size_t len = strlen (codeset) + 1;
data/rlpr-2.05/intl/finddomain.c:92: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).
			       strlen (dirname) + 1, 0, locale, NULL, NULL,
data/rlpr-2.05/intl/finddomain.c:128:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t len = strlen (alias_value) + 1;
data/rlpr-2.05/intl/finddomain.c:147: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).
			       strlen (dirname) + 1, mask, language, territory,
data/rlpr-2.05/intl/l10nflist.c:97:25:  [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 part_len = strlen (argz);
data/rlpr-2.05/intl/l10nflist.c:125:25:  [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 part_len = strlen (argz);
data/rlpr-2.05/intl/l10nflist.c:220:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				  + strlen (language)
data/rlpr-2.05/intl/l10nflist.c:222: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 (territory) + 1 : 0)
data/rlpr-2.05/intl/l10nflist.c:224: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 (codeset) + 1 : 0)
data/rlpr-2.05/intl/l10nflist.c:226: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 (normalized_codeset) + 1 : 0)
data/rlpr-2.05/intl/l10nflist.c:229: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 (modifier) + 1 : 0)
data/rlpr-2.05/intl/l10nflist.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).
				     ? strlen (special) + 1 : 0)
data/rlpr-2.05/intl/l10nflist.c:235: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).
					     ? strlen (sponsor) : 0)
data/rlpr-2.05/intl/l10nflist.c:237: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).
					   ? strlen (revision) + 1 : 0)) : 0)
data/rlpr-2.05/intl/l10nflist.c:238: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).
				  + 1 + strlen (filename) + 1);
data/rlpr-2.05/intl/l10nflist.c:374: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).
		= _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
data/rlpr-2.05/intl/loadmsgcat.c:456:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
# define read   __read
data/rlpr-2.05/intl/loadmsgcat.c:799: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).
	  charsetstr += strlen ("charset=");
data/rlpr-2.05/intl/loadmsgcat.c:851:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      len = strlen (outcharset);
data/rlpr-2.05/intl/loadmsgcat.c:979:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  long int nb = (long int) read (fd, read_ptr, to_read);
data/rlpr-2.05/intl/loadmsgcat.c:1142:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			  need += strlen (sysdep_segment_values[sysdepref]);
data/rlpr-2.05/intl/loadmsgcat.c:1210: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).
			    n = strlen (sysdep_segment_values[sysdepref]);
data/rlpr-2.05/intl/localealias.c:303:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      alias_len = strlen (alias) + 1;
data/rlpr-2.05/intl/localealias.c:304:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	      value_len = strlen (value) + 1;
data/rlpr-2.05/intl/textdomain.c:113:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      size_t len = strlen (domainname) + 1;
data/rlpr-2.05/lib/strdup.c:39: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).
  newstr = (char *) malloc (strlen (str) + 1);
data/rlpr-2.05/lib/xstrdup.c:41:27:  [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 strcpy (xmalloc (strlen (string) + 1), string);
data/rlpr-2.05/src/client.c:242:25:  [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	printhost_len = strlen(rlpr_client->printhost);
data/rlpr-2.05/src/client.c:269: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).
    size_t	cmdlen = strlen(cmd);
data/rlpr-2.05/src/component.c:77:22:  [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).
	    opt_list_len += strlen(component[i]->gen_opt_list);
data/rlpr-2.05/src/rlpq.c:117:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((n_read = read(pipe_fd[0], buffer, sizeof buffer - 1)) == -1)
data/rlpr-2.05/src/rlpq.c:146: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).
    request_size += strlen(printer);
data/rlpr-2.05/src/rlpq.c:148: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).
	request_size += strlen(user_list[i]) + 1;
data/rlpr-2.05/src/rlpq.c:154:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(request, " ");
data/rlpr-2.05/src/rlpq.c:158:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(request, "\n");
data/rlpr-2.05/src/rlpr.c:403: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).
	size_t length = strlen(buffer);
data/rlpr-2.05/src/rlpr.c:452:23:  [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).
	t_filename = xmalloc(strlen(rlpr_rlpr->tmpdir) + strlen(df_name) + 2);
data/rlpr-2.05/src/rlpr.c:452: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).
	t_filename = xmalloc(strlen(rlpr_rlpr->tmpdir) + strlen(df_name) + 2);
data/rlpr-2.05/src/rlpr.c:506: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).
	entry = xmalloc(strlen(value) + 3);
data/rlpr-2.05/src/rlpr.c:509: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).
	if (full_write(cf_fd, entry, strlen(entry), 0) == 0)
data/rlpr-2.05/src/rlpr.c:566: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).
    *cf_path = xmalloc(strlen(rlpr_rlpr->localhost) +
data/rlpr-2.05/src/rlpr.c:567:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		       strlen(rlpr_rlpr->tmpdir) + sizeof "/cfAxxx");
data/rlpr-2.05/src/rlprd.c:242:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n_read = read(read_fd, buffer, sizeof buffer);
data/rlpr-2.05/src/rlprd.c:309:6:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	    umask(0);
data/rlpr-2.05/src/rlprm.c:113: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).
    request_size += strlen(rlpr_rlprm->user) + 1;
data/rlpr-2.05/src/rlprm.c:114: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).
    request_size += strlen(printer);
data/rlpr-2.05/src/rlprm.c:116: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).
	request_size += strlen(argv[i]) + 1;
data/rlpr-2.05/src/rlprm.c:122:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(request, " ");
data/rlpr-2.05/src/rlprm.c:126:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(request, "\n");
data/rlpr-2.05/src/rlprrc.c:31: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).
    size_t	keylen = strlen(key);
data/rlpr-2.05/src/rlprrc.c:94: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).
	rlprrc_name = xmalloc(strlen(home) + strlen(R_RLPRRC_NAME) + 3);
data/rlpr-2.05/src/rlprrc.c:94: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).
	rlprrc_name = xmalloc(strlen(home) + strlen(R_RLPRRC_NAME) + 3);
data/rlpr-2.05/src/rlprrc.c:112: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).
	rlprrc_name = xmalloc(strlen(confdir) + strlen(R_RLPRRC_NAME) + 3);
data/rlpr-2.05/src/rlprrc.c:112:42:  [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).
	rlprrc_name = xmalloc(strlen(confdir) + strlen(R_RLPRRC_NAME) + 3);
data/rlpr-2.05/src/util.c:208:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    pr_bytes =	read(fd, &buffer[n_bytes], buffer_size - n_bytes);

ANALYSIS SUMMARY:

Hits = 141
Lines analyzed = 9144 in approximately 0.24 seconds (37395 lines/second)
Physical Source Lines of Code (SLOC) = 6018
Hits@level = [0]  25 [1]  59 [2]  41 [3]  19 [4]  22 [5]   0
Hits@level+ = [0+] 166 [1+] 141 [2+]  82 [3+]  41 [4+]  22 [5+]   0
Hits/KSLOC@level+ = [0+] 27.5839 [1+] 23.4297 [2+] 13.6258 [3+] 6.81289 [4+] 3.6557 [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.