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/linuxdoc-tools-0.9.82/sgmls-1.1/action.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/adl.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/ambig.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/appl.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/context.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/context.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/dosproc.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/ebcdic.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/ebcdic.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/entity.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/error.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/etype.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/exclude.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/genlex.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/getopt.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/getopt.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/keyword.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/latin1.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/lexcode.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/lexrf.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/lextaba.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/lextabe.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/lextoke.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/lineout.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/lineout.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/md1.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/md2.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/msg.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/pars1.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/pars2.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/pcbrf.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/portproc.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/rast.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/replace.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/replace.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/serv.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgml1.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgml2.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlaux.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlfnsm.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlincl.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlio.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmain.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlsasp.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlsasp.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlxtrn.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlxtrn.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/source.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/std.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/stklen.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/strerror.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/synrf.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/synxtrn.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/tools.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/trace.h
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/traceset.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/unixproc.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/version.c
Examining data/linuxdoc-tools-0.9.82/sgmls-1.1/xfprintf.c

FINAL RESULTS:

data/linuxdoc-tools-0.9.82/sgmls-1.1/ambig.c:67:23:  [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).
#define listcat(x, y) strcat((char *)(x), (char *)(y))
data/linuxdoc-tools-0.9.82/sgmls-1.1/ambig.c:68:23:  [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).
#define listcpy(x, y) strcpy((char *)(x), (char *)(y))
data/linuxdoc-tools-0.9.82/sgmls-1.1/ambig.c:390:6:  [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((char *)a, (char *)p);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:176:9:  [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(buf, genext[n]);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:185:9:  [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(buf, ext[n]);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:232:9:  [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(buf, classes[n]);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:244: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(buf, EMPTY_VERSION);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:262:13:  [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.
     return access(pathname, R_OK) >= 0;
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:30:19:  [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.
#define xvfprintf vfprintf
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:194:9:  [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(errlist[E_OPEN], errfile, strerror(errno));
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:259:4:  [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(p, arg);
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:292:4:  [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(ptr, argv[i]);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:129:6:  [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(catp->name, name);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:260: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).
			      strcpy(s, name);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:265: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).
			      strcpy(s, lang);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:734:6:  [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/linuxdoc-tools-0.9.82/sgmls-1.1/portproc.c:50:13:  [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.
      ret = system(command);
data/linuxdoc-tools-0.9.82/sgmls-1.1/portproc.c:77: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(result + len, SHELL_ESCAPE_QUOTE);
data/linuxdoc-tools-0.9.82/sgmls-1.1/rast.c:529:6:  [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/linuxdoc-tools-0.9.82/sgmls-1.1/replace.c:464:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(buf, message, ap);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:18:18:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define xfprintf fprintf
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:491: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(sp->filename, s);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:494: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(sp->filename, s);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:991: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(p, s);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlsasp.c:272:6:  [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/linuxdoc-tools-0.9.82/sgmls-1.1/std.h:109:4:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
  (mktemp(strcpy(buf, tmpnam_template)) == 0 || (buf)[0] == '\0' ? 0 : (buf))
data/linuxdoc-tools-0.9.82/sgmls-1.1/std.h:109:11:  [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).
  (mktemp(strcpy(buf, tmpnam_template)) == 0 || (buf)[0] == '\0' ? 0 : (buf))
data/linuxdoc-tools-0.9.82/sgmls-1.1/tools.h:12:25:  [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).
#define ustrcpy(s1, s2) strcpy((char *)(s1), (char *)(s2))
data/linuxdoc-tools-0.9.82/sgmls-1.1/tools.h:19:17:  [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).
#define ustrcpy strcpy
data/linuxdoc-tools-0.9.82/sgmls-1.1/traceset.c:272:11:  [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,
data/linuxdoc-tools-0.9.82/sgmls-1.1/unixproc.c:65:4:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	  execvp(argv[0], argv);
data/linuxdoc-tools-0.9.82/sgmls-1.1/xfprintf.c:522:9:  [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.
  res = vfprintf((FILE *)p, format, ap);
data/linuxdoc-tools-0.9.82/sgmls-1.1/xfprintf.c:550:11:  [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.
    res = vfprintf(fp, format, ap);
data/linuxdoc-tools-0.9.82/sgmls-1.1/xfprintf.c:564:11:  [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.
    res = vfprintf(fp, format, ap);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:287:11:  [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.
	  path = getenv(PATH_ENV_VAR);
data/linuxdoc-tools-0.9.82/sgmls-1.1/getopt.c:28:5:  [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.
int getopt(argc, argv, opts)
data/linuxdoc-tools-0.9.82/sgmls-1.1/getopt.h:7: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/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:117:20:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
     while ((opt = getopt(argc, argv, options)) != EOF) {
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:423:4:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
	  tmpnam(sgmldecl_file);
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:439:4:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
	  tmpnam(subcap_file);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:215:14:  [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.
	  nlspath = getenv("NLSPATH");
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:220:11:  [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.
	  lang = getenv("LANG");
data/linuxdoc-tools-0.9.82/sgmls-1.1/rast.c:77:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((opt = getopt(argc, argv, "o:")) != EOF)
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlsasp.c:40:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while ((opt = getopt(argc, argv, "n")) != EOF)
data/linuxdoc-tools-0.9.82/sgmls-1.1/std.h:57: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/linuxdoc-tools-0.9.82/sgmls-1.1/std.h:107:8:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
#undef tmpnam
data/linuxdoc-tools-0.9.82/sgmls-1.1/std.h:108:9:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
#define tmpnam(buf) \
data/linuxdoc-tools-0.9.82/sgmls-1.1/context.c:26: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(to[i].h, from[i].h, grplongs*sizeof(unsigned long));
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:265: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).
     fp = fopen(pathname, "r");
data/linuxdoc-tools-0.9.82/sgmls-1.1/genlex.c:35: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 special[256];
data/linuxdoc-tools-0.9.82/sgmls-1.1/genlex.c:41: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 shunned[256];
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:83: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 *subargv[sizeof(options)];
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:85: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 nopenbuf[sizeof(long)*3 + 1];
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:86: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 sgmldecl_file[L_tmpnam];
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:87: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 subcap_file[L_tmpnam];
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:94:13:  [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 stderr_buf[BUFSIZ];
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:165:20:  [2] (integer) atol:
  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).
	       sw.nopen = atol(optarg);
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:186:9:  [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(errfile, "w");
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:249: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(p, arg, ext - arg);
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:377:6:  [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(nopenbuf, "%ld", swp->nopen + 1);
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:425:9:  [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(sgmldecl_file, "w");
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:440:9:  [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(subcap_file, "w");
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:460:6:  [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((UNIV)argv, (UNIV)subargv, subargc*sizeof(char *));
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:484: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).
     fp = fopen(subcap_file, "r");
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:505: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).
     fp = fopen(name, "w");
data/linuxdoc-tools-0.9.82/sgmls-1.1/md1.c:73:11:  [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((UNIV)alperm, (UNIV)al, (1+ADN(al))*ADSZ );
data/linuxdoc-tools-0.9.82/sgmls-1.1/md1.c:191:11:  [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((UNIV)alperm, (UNIV)al, (1+ADN(al))*ADSZ );
data/linuxdoc-tools-0.9.82/sgmls-1.1/md1.c:767:11:  [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((UNIV)cmod  , (UNIV)cmodsv, u );
data/linuxdoc-tools-0.9.82/sgmls-1.1/md1.c:823:16:  [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(tbuf+1, etdgi+1, *etdgi-1);
data/linuxdoc-tools-0.9.82/sgmls-1.1/md2.c:46:11:  [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(nmbuf, indefent, *indefent);/* Copy #DEFAULT to name buffer. */
data/linuxdoc-tools-0.9.82/sgmls-1.1/md2.c:192:6:  [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(pt, pref + 1, *pref - 2);
data/linuxdoc-tools-0.9.82/sgmls-1.1/md2.c:193:6:  [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(pt + (*pref - 2), s, slen);
data/linuxdoc-tools-0.9.82/sgmls-1.1/md2.c:194:6:  [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(pt + (*pref - 2) + slen, suff + 1, *suff - 1);
data/linuxdoc-tools-0.9.82/sgmls-1.1/md2.c:260:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     else memcpy(tbuf, sysibuf, *sysibuf);
data/linuxdoc-tools-0.9.82/sgmls-1.1/md2.c:360:6:  [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((UNIV)NEAL(pne), (UNIV)al, (1+ADN(al))*ADSZ);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:279:14:  [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(try, "r");
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:475:6:  [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(p, read_buf, i);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:489:6:  [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[128];
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:651:9:  [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(argv[i], "r");
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:671: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).
     fp = fopen(argv[1], "w");
data/linuxdoc-tools-0.9.82/sgmls-1.1/pars2.c:202:16:  [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).
     thechar = atoi((char *)r);
data/linuxdoc-tools-0.9.82/sgmls-1.1/pars2.c:256:6:  [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((UNIV)al, (UNIV)adl, (1+ADN(adl))*ADSZ);
data/linuxdoc-tools-0.9.82/sgmls-1.1/pars2.c:725:6:  [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( (UNIV)(gnm = (struct etd **)rmalloc(glen)) , (UNIV)pg, glen );
data/linuxdoc-tools-0.9.82/sgmls-1.1/pars2.c:813:21:  [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( pt , data, datalen );
data/linuxdoc-tools-0.9.82/sgmls-1.1/pars2.c:820:21:  [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( pt , nonchbuf, 2 );
data/linuxdoc-tools-0.9.82/sgmls-1.1/rast.c:90:13:  [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).
    outfp = fopen(output_file, "w");
data/linuxdoc-tools-0.9.82/sgmls-1.1/rast.c:95:13:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    outfp = tmpfile();
data/linuxdoc-tools-0.9.82/sgmls-1.1/replace.c:86: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(file, "r");
data/linuxdoc-tools-0.9.82/sgmls-1.1/replace.c:452:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[512];
data/linuxdoc-tools-0.9.82/sgmls-1.1/serv.c:116:6:  [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(np->ename, name, name[0]);            /* Store name in it. */
data/linuxdoc-tools-0.9.82/sgmls-1.1/serv.c:159:6:  [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(p, s, *s);
data/linuxdoc-tools-0.9.82/sgmls-1.1/serv.c:287:6:  [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((char *)buf, "%d", i);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgml1.c:329:9:  [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[sizeof(long)*3 + 1];
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgml1.c:330:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	       sprintf(buf, "%ld", excess);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgml2.c:21:6:  [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((UNIV)&p->etx, (UNIV)petx, ETEXTSZ);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgml2.c:127:6:  [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((UNIV)&ECB, (UNIV)ecb, (UNS)ENTSZ); /* Copy the ecb into the scb. */
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgml2.c:232: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((UNIV)(pne=(PNE)rmalloc((UNS)NESZ)),(UNIV)ecbdeflt->etx.n,(UNS)NESZ);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:511:17:  [2] (integer) atol:
  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).
	       start = atol((char *)tbuf);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:516:17:  [2] (integer) atol:
  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).
	       count = atol((char *)tbuf);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:519:17:  [2] (integer) atol:
  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).
		    basenum = atol((char *)tbuf);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:586:6:  [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((UNIV)sd.capacity, (UNIV)refcapset, sizeof(sd.capacity));
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:605:25:  [2] (integer) atol:
  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).
	  sd.capacity[capno] = atol((char *)tbuf);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:632: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((UNIV)sd.capacity, (UNIV)ptr, sizeof(sd.capacity));
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:700:8:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	  if (atol((char *)tbuf) > 255) {
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:709:13:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	       if (atol((char *)tbuf) > 255)
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:776:13:  [2] (integer) atol:
  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).
	  long n = atol((char *)tbuf);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:802:15:  [2] (integer) atol:
  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).
     long n = atol((char *)tbuf);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:985: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((UNIV)nlextoke, lextoke, 256);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:989: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((UNIV)nlextran, lextran, 256);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:1187:8:  [2] (integer) atol:
  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).
	  n = atol((char *)tbuf);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:1252:9:  [2] (integer) atol:
  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).
			 n = atol((char *)tbuf);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:1539: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((UNIV)lextran, (UNIV)nlextran, 256);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:1603:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     static char buf[sizeof(long)*3 + 2];
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:1604:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
     sprintf(buf, "%ld", n);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:1614:6:  [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 uc[256];		/* upper case characters (with different lower
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmldecl.c:1616:6:  [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 lcletter[256];	/* LC letters: a-z */
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlio.c:49:22:  [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).
#define FOPENR(file) fopen((file), "r")
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlio.c:68: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 ismagic[256];     /* Table of magic chars that need to be prefixed
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlio.c:134: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((UNIV)f->pendbuf, (UNIV)(buf + off), (UNS)(s - buf - off));
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlio.c:331:15:  [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).
     int fd = open(name, O_RDONLY|O_NOINHERIT|O_TEXT);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:34: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 parmbuf[PARMBUFSIZ*2];
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:162:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	  tfp = tmpfile();
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:219:6:  [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 type[2], severity[2];
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:470:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	       sprintf(ptr, "\\%03o", ch);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:478:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	  strcpy(ptr, "...");
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:527: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(e->data.s, s, e->data.len);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:669: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[i].s, v[i].s, v[i].len);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:902: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((UNIV)&p->entity.u.external, (UNIV)e, sizeof(*e));
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:916: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((UNIV)&p->entity.u.internal, (UNIV)e, sizeof(*e));
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:934: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((UNIV)&p->notation, (UNIV)np, sizeof(*np));
data/linuxdoc-tools-0.9.82/sgmls-1.1/std.h:37:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define memcpy(to, from, n) bcopy(from, to, n)
data/linuxdoc-tools-0.9.82/sgmls-1.1/std.h:37:29:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define memcpy(to, from, n) bcopy(from, to, n)
data/linuxdoc-tools-0.9.82/sgmls-1.1/std.h:58:6:  [2] (integer) atol:
  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).
long atol();
data/linuxdoc-tools-0.9.82/sgmls-1.1/strerror.c:17:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     static char buf[sizeof("Error ") + 1 + 3*sizeof(int)];
data/linuxdoc-tools-0.9.82/sgmls-1.1/strerror.c:22: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(buf, "Error %d", n);
data/linuxdoc-tools-0.9.82/sgmls-1.1/synxtrn.h:10:6:  [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 *pdtb[SRNPRT+1];    /* LEXCNM: Printable form of unprintable SRs. */
data/linuxdoc-tools-0.9.82/sgmls-1.1/traceset.c:29:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
     static char buf[5];
data/linuxdoc-tools-0.9.82/sgmls-1.1/traceset.c:35: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(buf, "\\%03o", (UNCH)c);
data/linuxdoc-tools-0.9.82/sgmls-1.1/unixproc.c:39:9:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
#define vfork() fork()
data/linuxdoc-tools-0.9.82/sgmls-1.1/unixproc.c:57:12:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
     pid = vfork();
data/linuxdoc-tools-0.9.82/sgmls-1.1/xfprintf.c:370:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[512];		/* enough for a spec */
data/linuxdoc-tools-0.9.82/sgmls-1.1/xfprintf.c:421:12:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    (void)sprintf(q, "%d", val);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:177: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).
	  return strlen(genext[n]);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:186: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).
	  return strlen(ext[n]);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:233: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).
	  return strlen(classes[n]);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:245: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).
	       return strlen(EMPTY_VERSION);
data/linuxdoc-tools-0.9.82/sgmls-1.1/entgen.c:372: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).
     buf = (char *)rmalloc(strlen(s) + 2);
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:258: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).
	  p = xmalloc(strlen(arg) + 1);
data/linuxdoc-tools-0.9.82/sgmls-1.1/main.c:287: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).
	  len += strlen(argv[i]) + 1;
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:126:26:  [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).
     catp->name = malloc(strlen(name) + 1);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:233: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).
			 len += strlen(name);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:237: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).
			 len += strlen(lang);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:261:15:  [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).
			      s += strlen(name);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:266:15:  [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).
			      s += strlen(lang);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:312:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:359:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
     c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:362:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:366:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
     for (;; c = getc(fp)) {
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:389:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	       while ((c = getc(fp)) != '\n')
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:402:13:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	       c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:439:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    d = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:442:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			 d = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:528:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  while ((c = getc(fp)) != '\n' && c != EOF)
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:586:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/msgcat.c:599:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	       while ((c = getc(fp)) != '\n' && c != EOF)
data/linuxdoc-tools-0.9.82/sgmls-1.1/portproc.c:78: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).
	       len += strlen(SHELL_ESCAPE_QUOTE);
data/linuxdoc-tools-0.9.82/sgmls-1.1/rast.c:129:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((c = getc(outfp)) != EOF)
data/linuxdoc-tools-0.9.82/sgmls-1.1/replace.c:305:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/replace.c:314:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlio.c:168:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  c = getc(f->fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlio.c:216:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlio.c:259:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:188:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  int c = getc(tfp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:225: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).
	  indent = strlen(prog) + 2; /* don't rely on return value of fprintf */
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:312:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(parmbuf, getparm(e->errsp), PARMBUFSIZ*2 - 1);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:318:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(parmbuf, getparm(e->errsp), PARMBUFSIZ*2 - 1);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:325:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	  strncpy(parmbuf, getparm(e->errsp), PARMBUFSIZ*2 - 1);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmlmsg.c:362: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).
	  UNS len = strlen(errstr);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:489: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).
  size = strlen(s) + 1;
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:717: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).
    return strlen(s);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:806:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:838:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc(fp);
data/linuxdoc-tools-0.9.82/sgmls-1.1/sgmls.c:990: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).
    char *p = xmalloc(strlen(s) + 1);
data/linuxdoc-tools-0.9.82/sgmls-1.1/tools.h:15:29:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
#define ustrncpy(s1, s2, n) strncpy((char *)(s1), (char *)(s2), n)
data/linuxdoc-tools-0.9.82/sgmls-1.1/tools.h:16: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).
#define ustrlen(s1) strlen((char *)(s1))
data/linuxdoc-tools-0.9.82/sgmls-1.1/tools.h:22:18:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
#define ustrncpy strncpy
data/linuxdoc-tools-0.9.82/sgmls-1.1/tools.h:23: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).
#define ustrlen strlen

ANALYSIS SUMMARY:

Hits = 187
Lines analyzed = 20200 in approximately 0.69 seconds (29315 lines/second)
Physical Source Lines of Code (SLOC) = 16296
Hits@level = [0] 145 [1]  45 [2]  95 [3]  13 [4]  34 [5]   0
Hits@level+ = [0+] 332 [1+] 187 [2+] 142 [3+]  47 [4+]  34 [5+]   0
Hits/KSLOC@level+ = [0+] 20.3731 [1+] 11.4752 [2+] 8.71379 [3+] 2.88414 [4+] 2.0864 [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.