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/dvi2ps-5.1j/dvi2ps-conf.h
Examining data/dvi2ps-5.1j/defs.h
Examining data/dvi2ps-5.1j/gdefs.h
Examining data/dvi2ps-5.1j/xxstdio.h
Examining data/dvi2ps-5.1j/global.h
Examining data/dvi2ps-5.1j/commands.h
Examining data/dvi2ps-5.1j/set.h
Examining data/dvi2ps-5.1j/dconv.h
Examining data/dvi2ps-5.1j/virfont.h
Examining data/dvi2ps-5.1j/pkfont.h
Examining data/dvi2ps-5.1j/gffont.h
Examining data/dvi2ps-5.1j/rastfont.h
Examining data/dvi2ps-5.1j/bifont.h
Examining data/dvi2ps-5.1j/funcfont.h
Examining data/dvi2ps-5.1j/jsub.h
Examining data/dvi2ps-5.1j/emit.h
Examining data/dvi2ps-5.1j/ps.h
Examining data/dvi2ps-5.1j/ptexmac.h
Examining data/dvi2ps-5.1j/dvips.h
Examining data/dvi2ps-5.1j/cscommands.h
Examining data/dvi2ps-5.1j/dviconv.c
Examining data/dvi2ps-5.1j/dfdcom.c
Examining data/dvi2ps-5.1j/fontcom.c
Examining data/dvi2ps-5.1j/set.c
Examining data/dvi2ps-5.1j/rfset.c
Examining data/dvi2ps-5.1j/vfset.c
Examining data/dvi2ps-5.1j/dconv.c
Examining data/dvi2ps-5.1j/run.c
Examining data/dvi2ps-5.1j/mag.c
Examining data/dvi2ps-5.1j/fontdesc.c
Examining data/dvi2ps-5.1j/scanfont.c
Examining data/dvi2ps-5.1j/virfont.c
Examining data/dvi2ps-5.1j/vfdcom.c
Examining data/dvi2ps-5.1j/pkfont.c
Examining data/dvi2ps-5.1j/gffont.c
Examining data/dvi2ps-5.1j/rastfont.c
Examining data/dvi2ps-5.1j/bifont.c
Examining data/dvi2ps-5.1j/type1font.c
Examining data/dvi2ps-5.1j/wlfont.c
Examining data/dvi2ps-5.1j/mmfont.c
Examining data/dvi2ps-5.1j/compfont.c
Examining data/dvi2ps-5.1j/decompfont.c
Examining data/dvi2ps-5.1j/execfont.c
Examining data/dvi2ps-5.1j/funcfont.c
Examining data/dvi2ps-5.1j/kpse.c
Examining data/dvi2ps-5.1j/kanji.c
Examining data/dvi2ps-5.1j/open.c
Examining data/dvi2ps-5.1j/io.c
Examining data/dvi2ps-5.1j/util.c
Examining data/dvi2ps-5.1j/xxstdio.c
Examining data/dvi2ps-5.1j/version.c
Examining data/dvi2ps-5.1j/ps.c
Examining data/dvi2ps-5.1j/psrast.c
Examining data/dvi2ps-5.1j/psbi.c
Examining data/dvi2ps-5.1j/pstfm.c
Examining data/dvi2ps-5.1j/pstype1.c
Examining data/dvi2ps-5.1j/pswl.c
Examining data/dvi2ps-5.1j/pst1form.c
Examining data/dvi2ps-5.1j/writet1.c
Examining data/dvi2ps-5.1j/psspecial.c
Examining data/dvi2ps-5.1j/pscolor.c
Examining data/dvi2ps-5.1j/psifont.c
Examining data/dvi2ps-5.1j/psio.c
Examining data/dvi2ps-5.1j/tools/nup.c
Examining data/dvi2ps-5.1j/tools/texfix.c
Examining data/dvi2ps-5.1j/conf.h
Examining data/dvi2ps-5.1j/psvfl.c
Examining data/dvi2ps-5.1j/vflfont.c
Examining data/dvi2ps-5.1j/dvi2.c
Examining data/dvi2ps-5.1j/pstt.c
Examining data/dvi2ps-5.1j/pstt2t1.c
Examining data/dvi2ps-5.1j/ttfont.c
Examining data/dvi2ps-5.1j/dvi2ps_freetype.h

FINAL RESULTS:

data/dvi2ps-5.1j/xxstdio.c:19:8:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
#undef gets
data/dvi2ps-5.1j/xxstdio.c:209:9:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
    s = gets(s);
data/dvi2ps-5.1j/xxstdio.h:28:9:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
#define gets		xxgets
data/dvi2ps-5.1j/bifont.c:86:2:  [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(fe->name, filename);
data/dvi2ps-5.1j/bifont.c:89:10:  [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.
    ok = access(fe->name, R_OK) == 0;
data/dvi2ps-5.1j/compfont.c:61:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    (void)sprintf(fe->name, "%s%s", ffcmp->cmp_name, se+1);
data/dvi2ps-5.1j/decompfont.c:96:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	(void)sprintf(n, "%s%s%s", ffdcmp->dcmp_name, jsubfontname(i), ntail);
data/dvi2ps-5.1j/decompfont.c:191:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	(void)sprintf(n, "%s%c%02x%c%s",
data/dvi2ps-5.1j/dvips.h:37:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
extern char *sprintf() ;
data/dvi2ps-5.1j/dvips.h:99:9:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define popen _popen
data/dvi2ps-5.1j/emit.h:2:25:  [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 EMIT      (void)fprintf
data/dvi2ps-5.1j/fontcom.c:76: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).
    (void)strcpy(fe->n, n);
data/dvi2ps-5.1j/fontdesc.c:160: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).
    (void)strcpy(newlcd, lcd);
data/dvi2ps-5.1j/fontdesc.c:161:11:  [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).
    (void)strcat(newlcd, f);
data/dvi2ps-5.1j/fontdesc.c:162: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).
    (void)strcpy(newf, ld);
data/dvi2ps-5.1j/fontdesc.c:163:11:  [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).
    (void)strcat(newf, newlcd);
data/dvi2ps-5.1j/fontdesc.c:164:9:  [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 (access(newf, R_OK) != 0) {
data/dvi2ps-5.1j/fontdesc.c:166:12:  [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).
	    (void)strcat(newf, ext);
data/dvi2ps-5.1j/fontdesc.c:167:10:  [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 (access(newf, R_OK) != 0)
data/dvi2ps-5.1j/fontdesc.c:257:12:  [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).
	    (void)strcpy(nld->dir, libdir.dir);
data/dvi2ps-5.1j/fontdesc.c:649:12:  [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).
	    (void)strcpy(p, t);
data/dvi2ps-5.1j/fontdesc.c:889: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(cconvlibdir.dir, libdir.dir);
data/dvi2ps-5.1j/fontdesc.c:890: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(cconvlibdir.lcldir, field_mapdir);
data/dvi2ps-5.1j/fontdesc.c:1164:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    (void)sprintf(fe->name, "null:%s:%d", fe->n, MAGSIZE(rawmagfact));
data/dvi2ps-5.1j/fontdesc.c:1258:8:  [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).
	(void)strcpy(pathk0, dvi2lib);
data/dvi2ps-5.1j/fontdesc.c:1260:8:  [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).
	(void)strcat(pathk0, pathk+2);
data/dvi2ps-5.1j/fontdesc.c:1264: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).
    (void)strcpy(path, pthk);
data/dvi2ps-5.1j/fontdesc.c:1273:2:  [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(base, p);
data/dvi2ps-5.1j/funcfont.c:206:2:  [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(fe->name, filename);
data/dvi2ps-5.1j/funcfont.c:209:10:  [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.
    ok = access(fe->name, R_OK) == 0;
data/dvi2ps-5.1j/gdefs.h:70:7:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
char *sprintf(char *, const char *, ...);
data/dvi2ps-5.1j/gdefs.h:72:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
char *sprintf();
data/dvi2ps-5.1j/gdefs.h:86:7:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
char *mktemp();
data/dvi2ps-5.1j/gdefs.h:106:24:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define BINARYPOPEN(f)	popen(f,"rb")
data/dvi2ps-5.1j/gdefs.h:115:24:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define BINARYPOPEN(f)	popen(f,"r")
data/dvi2ps-5.1j/gffont.c:39:2:  [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(fe->name, filename);
data/dvi2ps-5.1j/gffont.c:42:10:  [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.
    ok = access(fe->name, R_OK) == 0;
data/dvi2ps-5.1j/pkfont.c:41:2:  [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(fe->name, filename);
data/dvi2ps-5.1j/pkfont.c:44:10:  [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.
    ok = access(fe->name, R_OK) == 0;
data/dvi2ps-5.1j/psbi.c:589: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(pname+prelen, subend+1);
data/dvi2ps-5.1j/psbi.c:595: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(pname, subend+1);
data/dvi2ps-5.1j/pscolor.c:104:4:  [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(cstack, DEFAULTCOLOR) ;
data/dvi2ps-5.1j/pscolor.c:122: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(bg, bkgrnd) ;
data/dvi2ps-5.1j/pscolor.c:137: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(csp, p) ;
data/dvi2ps-5.1j/pscolor.c:221: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(cstack, p->colordat) ;
data/dvi2ps-5.1j/pscolor.c:234: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(p->colordat, cstack) ;
data/dvi2ps-5.1j/pscolor.c:237: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(p->bg, bg) ;
data/dvi2ps-5.1j/psio.c:74:6:  [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 (access(f, R_OK) == 0)
data/dvi2ps-5.1j/psio.c:78:12:  [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).
	    (void)strcpy(newf, dvidirpath);
data/dvi2ps-5.1j/psio.c:79:12:  [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).
	    (void)strcat(newf, f);
data/dvi2ps-5.1j/psio.c:80:10:  [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 (access(newf, R_OK) == 0)
data/dvi2ps-5.1j/psio.c:86:12:  [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).
	    (void)strcpy(newf, filename);
data/dvi2ps-5.1j/psio.c:90:6:  [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 (access(f, R_OK) == 0)
data/dvi2ps-5.1j/psio.c:93:8:  [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).
	(void)strcpy(newf, dvi2lib);
data/dvi2ps-5.1j/psio.c:95:8:  [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).
	(void)strcat(newf, f);
data/dvi2ps-5.1j/psio.c:96:6:  [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 (access(newf, R_OK) == 0)
data/dvi2ps-5.1j/psspecial.c:203:22:  [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 (k.vt == None && access(k.Key,F_OK) == 0) {
data/dvi2ps-5.1j/psspecial.c:208:12:  [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).
	    (void)strcpy(spbuf, k.Key);
data/dvi2ps-5.1j/psspecial.c:216: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).
		(void)strcpy(spbuf, k.Val);
data/dvi2ps-5.1j/psspecial.c:471:22:  [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 (k.vt == None && access(k.Key,F_OK) == 0) {
data/dvi2ps-5.1j/psspecial.c:474:12:  [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).
	    (void)strcpy(spbuf, k.Key);
data/dvi2ps-5.1j/psspecial.c:480: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).
		(void)strcpy(spbuf, k.Val);
data/dvi2ps-5.1j/pst1form.c:275:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(line, "%d %s ", charstring_bp - charstring_buf, cs_start);
data/dvi2ps-5.1j/pst1form.c:357:11:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    (void)sprintf(buf, form, i0, i1, i2, i3, i4, i5, i6, i7, i8, i9);
data/dvi2ps-5.1j/pstt.c:81:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    (void)sprintf(dictname, "%s-TT%d", fe->n, fe->k);
data/dvi2ps-5.1j/pstt.c:196:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	(void)sprintf(dictname, "%s-TC%d", jfntname, pd.pd_font);
data/dvi2ps-5.1j/pswl.c:84:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    (void)sprintf(dictname, "%s-p%d", FontBase, pd.pd_font);
data/dvi2ps-5.1j/run.c:197:12:  [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).
	    (void)strcpy(dvidirpath, argv[argind]);
data/dvi2ps-5.1j/run.c:204:8:  [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).
	(void)strcpy(curname, tcp);
data/dvi2ps-5.1j/run.c:213:8:  [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).
	(void)strcpy(dvifilename, dvidirpath);
data/dvi2ps-5.1j/run.c:214:8:  [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).
	(void)strcat(dvifilename, curname);
data/dvi2ps-5.1j/run.c:226:8:  [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).
	(void)strcpy(dvifilename, tmp);
data/dvi2ps-5.1j/run.c:227:8:  [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).
	(void)strcat(dvifilename, DVITEMPLATE);
data/dvi2ps-5.1j/run.c:238:6:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
	if (mktemp(dvifilename) == NULL ||
data/dvi2ps-5.1j/run.c:266:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(prfontdesc, "%s.0", fontdescfile);
data/dvi2ps-5.1j/run.c:288:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(prfontdesc, "%s.%s", fontdescfile, tcp);
data/dvi2ps-5.1j/run.c:400: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.
    (void)fprintf(stderr, fmt, a, b, c);
data/dvi2ps-5.1j/run.c:419: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.
    (void)fprintf(stderr, fmt, a, b, c);
data/dvi2ps-5.1j/tools/texfix.c:14:7:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
char	*mktemp();
data/dvi2ps-5.1j/ttfont.c:147: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(tabname, enc);
data/dvi2ps-5.1j/ttfont.c:148: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(tabname, unitab);
data/dvi2ps-5.1j/virfont.c:63:2:  [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(fe->name, filename);
data/dvi2ps-5.1j/virfont.c:66:10:  [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.
    ok = access(fe->name, R_OK) == 0;
data/dvi2ps-5.1j/writet1.c:246:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(print_buf, fmt, args);
data/dvi2ps-5.1j/writet1.c:261:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(print_buf, fmt, args);
data/dvi2ps-5.1j/writet1.c:515: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(t1_line, s);
data/dvi2ps-5.1j/writet1.c:525:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(t1_line, fmt, args);
data/dvi2ps-5.1j/writet1.c:534:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(t1_line, fmt, a, b, c);
data/dvi2ps-5.1j/writet1.c:689: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(q, p);
data/dvi2ps-5.1j/writet1.c:690: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(t1_line, t1_buf);
data/dvi2ps-5.1j/writet1.c:706: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(strend(t1_buf), r);
data/dvi2ps-5.1j/writet1.c:707: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(t1_line, t1_buf);
data/dvi2ps-5.1j/writet1.c:752:13:  [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(t1_buf, p);
data/dvi2ps-5.1j/writet1.c:753:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(r, "%s+%s%s", fm_cur->subset_tag, key->value.s, t1_buf);
data/dvi2ps-5.1j/writet1.c:1406:9:  [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(t1_buf, t1_line);
data/dvi2ps-5.1j/writet1.c:1456: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(t1_line_ptr, p);
data/dvi2ps-5.1j/writet1.c:1464:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(t1_line, "/%s %u", ptr->name, ptr->cslen);
data/dvi2ps-5.1j/writet1.c:1474:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(t1_line, "%s", line_end);
data/dvi2ps-5.1j/writet1.c:1654: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(newfmt, fmt);
data/dvi2ps-5.1j/writet1.c:1665: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(newfmt, fmt);
data/dvi2ps-5.1j/dvi2.c:126: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.
    if ((dvi2path = getenv(DVI2PATHENV)) == NULL)
data/dvi2ps-5.1j/dvi2.c:131:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((dvi2lib = getenv(DVI2LIBENV)) == NULL)
data/dvi2ps-5.1j/dvi2.c:136: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.
    if ((fontdescfile = getenv(FONTDESCENV)) == NULL)
data/dvi2ps-5.1j/gdefs.h:88: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/dvi2ps-5.1j/run.c:221: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.
	if (((tmp = getenv("TMP")) == NULL) &&
data/dvi2ps-5.1j/run.c:222: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.
            ((tmp = getenv("TEMP")) == NULL))
data/dvi2ps-5.1j/decompfont.c:86: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 n[STRSIZE];
data/dvi2ps-5.1j/decompfont.c:181: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 n[STRSIZE];
data/dvi2ps-5.1j/dvi2.c:72:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char dvifilename[PATHLEN];	/* DVI file name			*/
data/dvi2ps-5.1j/dvi2.c:73:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char dvidirpath[PATHLEN];	/* DVI file directory			*/
data/dvi2ps-5.1j/dvi2.c:74:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char rootname[PATHLEN];		/* DVI filename without extension	*/
data/dvi2ps-5.1j/execfont.c:32: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 execline[PATHLEN];
data/dvi2ps-5.1j/fontcom.c:40: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 rn[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:96: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 dir[PATHLEN], lcldir[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:114: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 fdfile[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:116: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 field[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:130:6:  [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).
	f = fopen(fdfile, "r");
data/dvi2ps-5.1j/fontdesc.c:441: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 field_file[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:442: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 path[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:454: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 path[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:479: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 field_type[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:480: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 field_spec[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:481: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 field_sub[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:482: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 field_path[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:504:18:  [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).
    fd->fd_sub = atoi(field_sub);
data/dvi2ps-5.1j/fontdesc.c:527: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 path[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:565: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 path[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:604: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 field_name[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:605: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 field_body[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:606: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 path[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:631: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 dname[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:667: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 val[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:670:18:  [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).
    resolution = atoi(val);
data/dvi2ps-5.1j/fontdesc.c:676: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 fd_resolution[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:758: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 file[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:759: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 incfile[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:836: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 field_file[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:846: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 field_kind[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:847: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 field_file[PATHLEN];
data/dvi2ps-5.1j/fontdesc.c:885: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 field_mapdir[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:920: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 field_font[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:921: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 field_reqmag[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:922: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 field_submag[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:935:18:  [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).
	fs->fs_reqmag = atoi(field_reqmag);
data/dvi2ps-5.1j/fontdesc.c:936:21:  [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).
    fs->fs_submag = atoi(field_submag);
data/dvi2ps-5.1j/fontdesc.c:961: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 field_replfont[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:962: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 field_font[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:963: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 field_par[STRSIZE];
data/dvi2ps-5.1j/fontdesc.c:980:17:  [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).
    fr->fr_ds = atoi(field_par)<<16;
data/dvi2ps-5.1j/fontdesc.c:989:40:  [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).
		fr->fr_fix = scale_exact(fr->fr_fix, atoi(f+1));
data/dvi2ps-5.1j/fontdesc.c:991: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).
		fr->fr_fix = atoi(f+1);
data/dvi2ps-5.1j/fontdesc.c:1178: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 buf[32];
data/dvi2ps-5.1j/fontdesc.c:1213: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.
		(void)sprintf(t = buf, "%d", acca->pv_mag);
data/dvi2ps-5.1j/fontdesc.c:1216: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.
		(void)sprintf(t = buf, "%f", acca->actmagfact);
data/dvi2ps-5.1j/fontdesc.c:1219: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.
		(void)sprintf(t = buf, "%d", resolution);
data/dvi2ps-5.1j/fontdesc.c:1225: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.
		(void)sprintf(t = buf, "%d", acca->pv_ds);
data/dvi2ps-5.1j/fontdesc.c:1247: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 pathk[PATHLEN], pathk0[PATHLEN], base[PATHLEN];
data/dvi2ps-5.1j/gdefs.h:63: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(d, s, n)		bcopy((s), (d), (n))
data/dvi2ps-5.1j/gdefs.h:63:26:  [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(d, s, n)		bcopy((s), (d), (n))
data/dvi2ps-5.1j/gdefs.h:64:26:  [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	memmove(d, s, n)	bcopy((s), (d), (n))
data/dvi2ps-5.1j/gdefs.h:84:5:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
int mkstemp();
data/dvi2ps-5.1j/gdefs.h:104:23:  [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 BINARYOPEN(f)	fopen(f,"rb")	/* byte-oriented host version */
data/dvi2ps-5.1j/gdefs.h:105:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define BINARYWOPEN(f)	fopen(f,"w+b")
data/dvi2ps-5.1j/gdefs.h:113:23:  [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 BINARYOPEN(f)	fopen(f,"r")	/* byte-oriented host version */
data/dvi2ps-5.1j/gdefs.h:114:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define BINARYWOPEN(f)	fopen(f,"w+")
data/dvi2ps-5.1j/gdefs.h:192: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 n[STRSIZE];		/* FNT_DEF command parameters		*/
data/dvi2ps-5.1j/gdefs.h:201: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 name[PATHLEN];		/* full name of font file		*/
data/dvi2ps-5.1j/io.c:74: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 buf[10];
data/dvi2ps-5.1j/kpse.c:61: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 ns[PATHLEN];
data/dvi2ps-5.1j/kpse.c:111: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 pathname[PATHLEN];	/* dummy */
data/dvi2ps-5.1j/pkfont.c:196:17:  [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 unsigned char pat[8] = {0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01};
data/dvi2ps-5.1j/ps.c:301: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 psfnamebuf[256];
data/dvi2ps-5.1j/ps.c:308:11:  [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(psfnamebuf, "f%d", (unsigned int)psf);
data/dvi2ps-5.1j/psbi.c:137: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 field_name[STRSIZE];
data/dvi2ps-5.1j/psbi.c:138: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 field_mode[STRSIZE];
data/dvi2ps-5.1j/psbi.c:139: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 field_psfont[STRSIZE];
data/dvi2ps-5.1j/psbi.c:140: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 field_psopt1[STRSIZE];
data/dvi2ps-5.1j/psbi.c:141: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 field_psopt2[STRSIZE];
data/dvi2ps-5.1j/psbi.c:144: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 path[PATHLEN];
data/dvi2ps-5.1j/psbi.c:145: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 encpath[PATHLEN];
data/dvi2ps-5.1j/psbi.c:496: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 buf[32];
data/dvi2ps-5.1j/psbi.c:524: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 psprog[PATHLEN];
data/dvi2ps-5.1j/psbi.c:542: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 psprog[PATHLEN];
data/dvi2ps-5.1j/psbi.c:581:12:  [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 pname[PATHLEN];
data/dvi2ps-5.1j/psbi.c:656:12:  [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 newbifname[STRSIZE];
data/dvi2ps-5.1j/psbi.c:658:11:  [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(newbifname, "bf%d", bifcount++);
data/dvi2ps-5.1j/psbi.c:849: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 psprog[PATHLEN];
data/dvi2ps-5.1j/pscolor.c:49: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 colordat[2] ;
data/dvi2ps-5.1j/pscolor.c:51: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 cstack[TOTALCOLORLEN], *csp, *cend, *bg ;
data/dvi2ps-5.1j/pscolor.c:63: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 tempword[100] ;
data/dvi2ps-5.1j/pscolor.c:80: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(tempword, " TeXcolor") ;
data/dvi2ps-5.1j/psifont.c:16: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 newf[PATHLEN];
data/dvi2ps-5.1j/psifont.c:41: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[PSFLEN];
data/dvi2ps-5.1j/psifont.c:51:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((spfp = fopen(fn,"r")) == NULL) {
data/dvi2ps-5.1j/psifont.c:149: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 incfile[PATHLEN];
data/dvi2ps-5.1j/psifont.c:150: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 newlibdir[PATHLEN];	/* dummy */
data/dvi2ps-5.1j/psio.c:32: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 newf[PATHLEN];
data/dvi2ps-5.1j/psio.c:45: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 newf[PATHLEN];
data/dvi2ps-5.1j/psio.c:58: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 newf[PATHLEN];
data/dvi2ps-5.1j/psio.c:210:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((spfp = fopen(fn,"r")) == NULL) {
data/dvi2ps-5.1j/psrast.c:49: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 field[STRSIZE];
data/dvi2ps-5.1j/psspecial.c:55: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 bs_string[1];
data/dvi2ps-5.1j/psspecial.c:114: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 spbuf[STRSIZE];
data/dvi2ps-5.1j/psspecial.c:253: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 spbuf[STRSIZE];
data/dvi2ps-5.1j/psspecial.c:517:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char    KeyStr[STRSIZE];
data/dvi2ps-5.1j/psspecial.c:518:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char    ValStr[STRSIZE];
data/dvi2ps-5.1j/psspecial.c:643: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[BUFSIZ];
data/dvi2ps-5.1j/psspecial.c:646:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((spfp = fopen(str,"r")) == NULL) {
data/dvi2ps-5.1j/pst1form.c:129:12:  [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 cname[4];
data/dvi2ps-5.1j/pst1form.c:131: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(cname, "c%02X", c);
data/dvi2ps-5.1j/pst1form.c:233: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 cs_start[10] = "-|";
data/dvi2ps-5.1j/pst1form.c:273: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 line[256];
data/dvi2ps-5.1j/pst1form.c:355: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 buf[4096];
data/dvi2ps-5.1j/pstt.c:77: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 dictname[STRSIZE];
data/dvi2ps-5.1j/pstt.c:189:12:  [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 dictname[STRSIZE];
data/dvi2ps-5.1j/pstype1.c:17: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 t1font[BUFSIZ];
data/dvi2ps-5.1j/pstype1.c: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 buffer[BUFSIZ], *b;
data/dvi2ps-5.1j/pswl.c: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 buffer[WFLEN], *be;
data/dvi2ps-5.1j/pswl.c:81: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 dictname[STRSIZE];
data/dvi2ps-5.1j/rfset.c:42: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 s[STRLEN];
data/dvi2ps-5.1j/run.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 curname[PATHLEN];	/* current file name		*/
data/dvi2ps-5.1j/run.c:34: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 prfontdesc[STRSIZE];
data/dvi2ps-5.1j/run.c:207:12:  [2] (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 string.
	    (void)strcat(curname, ".dvi");
data/dvi2ps-5.1j/run.c:229:12:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	if ((fd = mkstemp(dvifilename)) == -1 ||
data/dvi2ps-5.1j/tools/nup.c:64:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	line[BUFSIZ];
data/dvi2ps-5.1j/tools/texfix.c:37:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char	line[BUFSIZ], line2[BUFSIZ];
data/dvi2ps-5.1j/tools/texfix.c:64: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	tmpstr[14];
data/dvi2ps-5.1j/tools/texfix.c:69:6:  [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(tmpstr, "/tmp/tfXXXXXX");
data/dvi2ps-5.1j/tools/texfix.c:70:26:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	    if ((tmpfp = fdopen(mkstemp(tmpstr), "w")) == NULL) {
data/dvi2ps-5.1j/tools/texfix.c:77:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		    if ((tmpfp = fopen(tmpstr, "r")) == NULL) {
data/dvi2ps-5.1j/ttfont.c:131: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 tabname[STRSIZE], file[PATHLEN];
data/dvi2ps-5.1j/ttfont.c:244: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 *glyphs[NTFMCHARS];
data/dvi2ps-5.1j/ttfont.c:268:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char remap[NTFMCHARS];
data/dvi2ps-5.1j/util.c:88: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(t, s, len);
data/dvi2ps-5.1j/vflfont.c:23: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 field_file[PATHLEN];
data/dvi2ps-5.1j/vflfont.c:24: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 vfcap[PATHLEN];
data/dvi2ps-5.1j/vflfont.c:43: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 field_number[PATHLEN];
data/dvi2ps-5.1j/vflfont.c:44: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 ratio[PATHLEN];
data/dvi2ps-5.1j/vflfont.c:49:18:  [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).
    depthratio = atoi(ratio);
data/dvi2ps-5.1j/vfset.c:34: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 s[STRLEN];
data/dvi2ps-5.1j/virfont.c:333: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(dvip, defce->vfd.dvi.where.dviptr, dvilen);
data/dvi2ps-5.1j/wlfont.c:33: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 buf[32];
data/dvi2ps-5.1j/wlfont.c:39: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.
		(void)sprintf(t = buf, "%2x", k);
data/dvi2ps-5.1j/wlfont.c:67: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 k1wlfn[PATHLEN], *filename;
data/dvi2ps-5.1j/writet1.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 *ext_glyph_names[MAX_CHAR_CODE + 1];                                        
data/dvi2ps-5.1j/writet1.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 print_buf[PRINTF_BUF_SIZE];
data/dvi2ps-5.1j/writet1.c:143:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char *t1_builtin_glyph_names[MAX_CHAR_CODE + 1];                                        
data/dvi2ps-5.1j/writet1.c:209: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 t1_line[T1_BUF_SIZE], t1_buf[T1_BUF_SIZE], *t1_line_ptr;
data/dvi2ps-5.1j/writet1.c:210: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 enc_line[ENC_BUF_SIZE];
data/dvi2ps-5.1j/writet1.c:310: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 buf[ENC_BUF_SIZE], *p, *r;
data/dvi2ps-5.1j/writet1.c:484:28:  [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).
            t1_cslen = l = atoi(p + 1);
data/dvi2ps-5.1j/writet1.c:674: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(q, "%G ", b[i]);
data/dvi2ps-5.1j/writet1.c:697: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 buf[1024], *p, *r;
data/dvi2ps-5.1j/writet1.c:705: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(t1_buf + (p - t1_line + 1), "%.2g", a);
data/dvi2ps-5.1j/writet1.c:745:13:  [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(q, "-Extend_%i", (int)fm_extend(fm_cur));
data/dvi2ps-5.1j/writet1.c:748:13:  [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(q, "-Slant_%i", (int)fm_slant(fm_cur));
data/dvi2ps-5.1j/writet1.c:763:30:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            key[i].value.i = atoi(p);
data/dvi2ps-5.1j/writet1.c:771:20:  [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).
    key->value.i = atoi(p);
data/dvi2ps-5.1j/writet1.c:793:20:  [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).
        t1_lenIV = atoi(strchr(t1_line, ' ') + 1);
data/dvi2ps-5.1j/writet1.c:1041: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).
        subr = atoi(p + 1);
data/dvi2ps-5.1j/writet1.c:1052: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(t1_buf, cs_start - 4, t1_cslen + 4); /* copy " RD " + cs data to t1_buf */
data/dvi2ps-5.1j/writet1.c:1059: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(ptr->data, t1_buf, ptr->len);
data/dvi2ps-5.1j/writet1.c:1374:17:  [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).
    subr_size = atoi(t1_line + subr_size_pos);
data/dvi2ps-5.1j/writet1.c:1455: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(t1_line_ptr, "%u", count);
data/dvi2ps-5.1j/writet1.c:1462:17:  [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(t1_line, "dup %u %u", ptr - tab, ptr->cslen);
data/dvi2ps-5.1j/writet1.c:1466:13:  [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, ptr->data, ptr->len);
data/dvi2ps-5.1j/writet1.c:1536:15:  [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).
    cs_size = atoi(t1_line + cs_size_pos);
data/dvi2ps-5.1j/writet1.c:1637:15:  [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).
    t1_file = fopen(cur_file_name, FOPEN_RBIN_MODE);
data/dvi2ps-5.1j/writet1.c:1643:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    enc_file = fopen(cur_enc_name, FOPEN_RBIN_MODE);
data/dvi2ps-5.1j/writet1.c:1651: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 newfmt[256];
data/dvi2ps-5.1j/writet1.c:1653:5:  [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(newfmt, "(write1) ");
data/dvi2ps-5.1j/writet1.c:1662: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 newfmt[256];
data/dvi2ps-5.1j/writet1.c:1664:5:  [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(newfmt, "(write1) ");
data/dvi2ps-5.1j/xxstdio.c:12: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).
#undef fopen
data/dvi2ps-5.1j/xxstdio.c:117:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *fp = fopen(filename, type);
data/dvi2ps-5.1j/xxstdio.c:166: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 (ptr, (void *) fp->_ptr, total);
data/dvi2ps-5.1j/xxstdio.h:21: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).
#define fopen		xxfopen
data/dvi2ps-5.1j/compfont.c:55:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strncmp(fe->n, ffcmp->cmp_name, strlen(ffcmp->cmp_name)) == 0) {
data/dvi2ps-5.1j/compfont.c:57:38:  [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).
	    subpre = (s = getjsubfont(fe->n+strlen(ffcmp->cmp_name), &se)) > 0;
data/dvi2ps-5.1j/compfont.c:59:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    subpre = (s = getdcode(fe->n+strlen(ffcmp->cmp_name), &se)) > 0;
data/dvi2ps-5.1j/compfont.c:95:40:  [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).
    readfontdef(0, 0, fe->s, fe->d, 0, strlen(fe->name), fe->name, &fontidx);
data/dvi2ps-5.1j/compfont.c:186:40:  [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).
    readfontdef(0, 0, fe->s, fe->d, 0, strlen(fe->name), fe->name, &fontidx);
data/dvi2ps-5.1j/decompfont.c:52:43:  [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 (strncmp(fe->n, ffdcmp->dcmp_name, strlen(ffdcmp->dcmp_name)) == 0) {
data/dvi2ps-5.1j/decompfont.c:53:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (numstr(fe->n+strlen(ffdcmp->dcmp_name)) ) {
data/dvi2ps-5.1j/decompfont.c:93:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ntail = fe->n+strlen(ffdcmp->dcmp_name);
data/dvi2ps-5.1j/decompfont.c:97:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	readfontdef(i, 0, fe->s, fe->d, 0, strlen(n), n, &fontidx);
data/dvi2ps-5.1j/decompfont.c:188:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ntail = fe->n+strlen(ffdcmp->dcmp_name);
data/dvi2ps-5.1j/decompfont.c:193:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	readfontdef(i, 0, fe->s, fe->d, 0, strlen(n), n, &fontidx);
data/dvi2ps-5.1j/execfont.c:48:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    while ((c = getc(f)) != EOF)
data/dvi2ps-5.1j/execfont.c:51:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    while ((c = getc(f)) != EOF)
data/dvi2ps-5.1j/fontcom.c:51:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	l = strlen(rn);
data/dvi2ps-5.1j/fontdesc.c:138:30:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (fdline = 1; (fdch = getc(fdf)) != EOF; fdline++) {
data/dvi2ps-5.1j/fontdesc.c:237:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void)strncpy(nld->dir, f, p+1-f);
data/dvi2ps-5.1j/fontdesc.c:245:12:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    (void)strncpy(nld->dir, f, p+1-f);
data/dvi2ps-5.1j/fontdesc.c:296:48:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (; fdch != '\n' && fdch != EOF; fdch = getc(fdf))
data/dvi2ps-5.1j/fontdesc.c:305:64:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (; fdch == ' ' || fdch == '\t' || fdch == '\\'; fdch = getc(fdf))
data/dvi2ps-5.1j/fontdesc.c:307:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    if ((c = getc(fdf)) != '\n') {
data/dvi2ps-5.1j/fontdesc.c:330:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	 fdch = getc(fdf)) {
data/dvi2ps-5.1j/fontdesc.c:332:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    if ((c = getc(fdf)) != '\n') {
data/dvi2ps-5.1j/fontdesc.c:355:26:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	     (*field++ = fdch = getc(fdf)) != FDQUO && fdch != EOF; ) {
data/dvi2ps-5.1j/fontdesc.c:357:16:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		*(field-1) = getc(fdf);
data/dvi2ps-5.1j/fontdesc.c:365:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fdch = getc(fdf);
data/dvi2ps-5.1j/fontdesc.c:395:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	 fdch = getc(fdf)) {
data/dvi2ps-5.1j/fontdesc.c:397:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    if ((c = getc(fdf)) != '\n') {
data/dvi2ps-5.1j/fontdesc.c:647: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).
	    if (p+strlen(t) >= pend)
data/dvi2ps-5.1j/fontdesc.c:650: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).
	    p += strlen(t);
data/dvi2ps-5.1j/fontdesc.c:764:6:  [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).
	*(f+strlen(f)-1) = '\0';
data/dvi2ps-5.1j/fontdesc.c:891: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(cconvlibdir.lcldir, "/");
data/dvi2ps-5.1j/fontdesc.c:931: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).
    fs->fs_len = strlen(field_font);
data/dvi2ps-5.1j/fontdesc.c:1190: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).
		len = strlen(t = acca->pv_name);
data/dvi2ps-5.1j/fontdesc.c:1195:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void)strncpy(buf, t, 4);
data/dvi2ps-5.1j/fontdesc.c:1196:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void)strncpy(buf+4, l-4, 4);
data/dvi2ps-5.1j/fontdesc.c:1198:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void)strncpy(buf, t, 8);
data/dvi2ps-5.1j/fontdesc.c:1202:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		    (void)strncpy(buf, t, l-t);
data/dvi2ps-5.1j/fontdesc.c:1205:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(b, l, len-(l-t)+1);
data/dvi2ps-5.1j/fontdesc.c:1234: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).
	    if (p + (len = strlen(t)) <= pend) {
data/dvi2ps-5.1j/fontdesc.c:1235:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(p, t, len);
data/dvi2ps-5.1j/fontdesc.c:1259:8:  [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.
	(void)strcat(pathk0, "/");
data/dvi2ps-5.1j/fontdesc.c:1266:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for (p = pthk+strlen(pthk)-1; p >= pthk; --p)
data/dvi2ps-5.1j/funcfont.c:243:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return !strncmp(fe->n, proto, strlen(proto));
data/dvi2ps-5.1j/funcfont.c:256:34:  [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 strncmp(fe->n, proto, strlen(proto));
data/dvi2ps-5.1j/kanji.c:56:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (!strncmp(n, jsf_names[f], strlen(jsf_names[f]))) {
data/dvi2ps-5.1j/kanji.c:57: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).
	    *subend = n + strlen(jsf_names[f])-1;
data/dvi2ps-5.1j/kpse.c:84:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(ns, n, sizeof(ns)-1);
data/dvi2ps-5.1j/kpse.c:86:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	    strncat(ns, suffix, sizeof(ns)-1-strlen(ns));
data/dvi2ps-5.1j/kpse.c:86: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).
	    strncat(ns, suffix, sizeof(ns)-1-strlen(ns));
data/dvi2ps-5.1j/psbi.c:155: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).
    bf->bf_len = strlen(field_name);
data/dvi2ps-5.1j/psbi.c:253: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).
	field_psfont[strlen(field_psfont)-1] = '\0';
data/dvi2ps-5.1j/psbi.c:263:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		psm[strlen(psm)-1] = '\0';
data/dvi2ps-5.1j/psbi.c:508: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).
	    if (p + (len = strlen(t)) <= pend) {
data/dvi2ps-5.1j/psbi.c:509:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(p, t, len);
data/dvi2ps-5.1j/psbi.c:588:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(pname, name, prelen);
data/dvi2ps-5.1j/psbi.c:594:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(pname, name, bf->bf_len);
data/dvi2ps-5.1j/pscolor.c:81: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).
   for (p=tempword + strlen(tempword); *s && *s > ' '; p++, s++)
data/dvi2ps-5.1j/pscolor.c:103:4:  [1] (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 character.
   strcpy(cstack, "\n") ;
data/dvi2ps-5.1j/pscolor.c:105:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   csp = cstack + strlen(cstack) ;
data/dvi2ps-5.1j/pscolor.c:119:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (strlen(bkgrnd) > MAXCOLORLEN)
data/dvi2ps-5.1j/pscolor.c:134:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   if (strlen(p) + csp > cend)
data/dvi2ps-5.1j/pscolor.c:138: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).
   csp += strlen(p) ;
data/dvi2ps-5.1j/pscolor.c:222: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).
      csp = cstack + strlen(cstack) ;
data/dvi2ps-5.1j/pscolor.c:231: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).
                  (strlen(cstack) + sizeof(struct colorpage) + MAXCOLORLEN)) ;
data/dvi2ps-5.1j/pscolor.c:235: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).
      p->bg = p->colordat + strlen(cstack) + 1 ;
data/dvi2ps-5.1j/psifont.c:94:34:  [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).
	fe = get_font_entry(0, s, d, 0, strlen(n), n);
data/dvi2ps-5.1j/psio.c:94:8:  [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.
	(void)strcat(newf, "/");
data/dvi2ps-5.1j/psio.c:181:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((t = getc(spfp)) == 0x80) {
data/dvi2ps-5.1j/psio.c:184:32:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	for (pt = '\n'; t != EOF; t = getc(spfp)) {
data/dvi2ps-5.1j/psio.c:186:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((t = getc(spfp)) != EOF)	/* remove comments */
data/dvi2ps-5.1j/psio.c:195:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	for (; t != EOF; t = getc(spfp))
data/dvi2ps-5.1j/psrast.c:56: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).
    pd->pd_len = strlen(field);
data/dvi2ps-5.1j/psspecial.c:134:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(b->bs_string, p+1, n);
data/dvi2ps-5.1j/psspecial.c:155: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).
	q = p + strlen(p) - 1;
data/dvi2ps-5.1j/pst1form.c:358: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(buf);
data/dvi2ps-5.1j/pstype1.c:45:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (getc(fp) == 0x80) {
data/dvi2ps-5.1j/pstype1.c:46:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (getc(fp) == 1) {
data/dvi2ps-5.1j/pstype1.c:55:27:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    for (b = buffer; (c = getc(fp)) != '\r' && c != '\n'; b++)
data/dvi2ps-5.1j/pstype1.c:58:36:  [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 (!strncmp(buffer, type1id1, strlen(type1id1))) {
data/dvi2ps-5.1j/pstype1.c:59: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).
	idlen = strlen(type1id1);
data/dvi2ps-5.1j/pstype1.c:61:43:  [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).
    } else if (!strncmp(buffer, type1id2, strlen(type1id2))) {
data/dvi2ps-5.1j/pstype1.c:62: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).
	idlen = strlen(type1id2);
data/dvi2ps-5.1j/pstype1.c:112:22:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	for (n = '\n'; (c = getc(fp)) != EOF; ) {
data/dvi2ps-5.1j/pstype1.c:114:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((c = getc(fp)) != EOF)
data/dvi2ps-5.1j/pstype1.c:123:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	for (; (c = getc(fp)) != EOF; )
data/dvi2ps-5.1j/pstype1.c:140:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	switch (c = getc(fp)) {
data/dvi2ps-5.1j/pstype1.c:143:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		len += n*getc(fp);
data/dvi2ps-5.1j/pstype1.c:145:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((c = getc(fp)) == EOF)
data/dvi2ps-5.1j/pstype1.c:155:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		len += n*getc(fp);
data/dvi2ps-5.1j/pstype1.c:157:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((c = getc(fp)) == EOF)
data/dvi2ps-5.1j/pswl.c:43:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(buffer);
data/dvi2ps-5.1j/run.c:195: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).
	    if (strlen(argv[argind])+1 >= PATHLEN)
data/dvi2ps-5.1j/run.c:202:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(tcp)+4+1 >= PATHLEN)
data/dvi2ps-5.1j/run.c:211:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(dvidirpath)+strlen(curname)+1 >= PATHLEN)
data/dvi2ps-5.1j/run.c:211: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).
	if (strlen(dvidirpath)+strlen(curname)+1 >= PATHLEN)
data/dvi2ps-5.1j/run.c:224:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(tmp)+strlen(DVITEMPLATE)+1 >= PATHLEN)
data/dvi2ps-5.1j/run.c:224: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).
	if (strlen(tmp)+strlen(DVITEMPLATE)+1 >= PATHLEN)
data/dvi2ps-5.1j/run.c:252:33:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	for (; !ferror(stdin) && (ch = getchar()) != EOF; )
data/dvi2ps-5.1j/run.c:264: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).
    if (strlen(fontdescfile)+2+1 >= STRSIZE)
data/dvi2ps-5.1j/run.c:285:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(fontdescfile)+1+strlen(tcp)+1 >= STRSIZE)
data/dvi2ps-5.1j/run.c:285:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(fontdescfile)+1+strlen(tcp)+1 >= STRSIZE)
data/dvi2ps-5.1j/tools/nup.c:183: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).
		   && strncmp(line, OPR, strlen(OPR)-1) == 0)
data/dvi2ps-5.1j/tools/nup.c:186: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).
		 && strncmp(line, OLS, strlen(OLS)-1) == 0)
data/dvi2ps-5.1j/tools/texfix.c:127: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).
	for (l1 = strlen(s1), l2 = strlen(++s2); l1 > l2; l1--)
data/dvi2ps-5.1j/tools/texfix.c:127: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).
	for (l1 = strlen(s1), l2 = strlen(++s2); l1 > l2; l1--)
data/dvi2ps-5.1j/ttfont.c:170:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    c1 = getc(f);
data/dvi2ps-5.1j/ttfont.c:171:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    c2 = getc(f);
data/dvi2ps-5.1j/util.c:86:38:  [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 ((t = malloc((unsigned)(len = strlen(s)+1))) == NULL)
data/dvi2ps-5.1j/vfdcom.c:59:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    (void)strncpy(cp, (char *)dc_bufbeg, n);
data/dvi2ps-5.1j/wlfont.c:45: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).
	    if (p + (len = strlen(t)) <= pend) {
data/dvi2ps-5.1j/wlfont.c:46:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		(void)strncpy(p, t, len);
data/dvi2ps-5.1j/writet1.c:97:29:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define t1_getchar()        getc(t1_file)
data/dvi2ps-5.1j/writet1.c:102:25:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define enc_getchar()   getc(enc_file)
data/dvi2ps-5.1j/writet1.c:229:46:  [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 str_prefix(s1, s2)  (strncmp(s1, s2, strlen(s2)) == 0)
data/dvi2ps-5.1j/writet1.c:341:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if (strncmp(r, "] def", strlen("] def")) == 0) 
data/dvi2ps-5.1j/writet1.c:655:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(t1_buf, t1_line, p - t1_line + 1);
data/dvi2ps-5.1j/writet1.c:701:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(t1_buf, t1_line, p - t1_line + 1);
data/dvi2ps-5.1j/writet1.c:719:48:  [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 (strncmp(t1_line + 1, "FontMatrix", strlen("FontMatrix")) == 0) {
data/dvi2ps-5.1j/writet1.c:723:49:  [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 (strncmp(t1_line + 1, "ItalicAngle", strlen("ItalicAngle")) == 0) {
data/dvi2ps-5.1j/writet1.c:729:47:  [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 (strncmp(t1_line + 1, key->t1name, strlen(key->t1name)) == 0)
data/dvi2ps-5.1j/writet1.c:734:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    p = t1_line + strlen(key->t1name) + 1;
data/dvi2ps-5.1j/writet1.c:777:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strncmp(t1_line, "/UniqueID", strlen("/UniqueID")) == 0) {
data/dvi2ps-5.1j/writet1.c:873:17:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
            if (sscanf(p, "dup %i%256s put", &i, t1_buf) == 2 && 
data/dvi2ps-5.1j/writet1.c:877:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                p = strstr(p, " put") + strlen(" put");
data/dvi2ps-5.1j/writet1.c:886: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).
                p = strstr(p, " get put") + strlen(" get put");
data/dvi2ps-5.1j/writet1.c:897:49:  [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 = strstr(p, " putinterval") + strlen(" putinterval");
data/dvi2ps-5.1j/writet1.c:912:9:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        sscanf(t1_line + strlen("/Encoding"), "%256s", t1_buf);
data/dvi2ps-5.1j/writet1.c:912: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).
        sscanf(t1_line + strlen("/Encoding"), "%256s", t1_buf);
data/dvi2ps-5.1j/writet1.c:1372: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).
    subr_size_pos = strlen("/Subrs") + 1; 
data/dvi2ps-5.1j/writet1.c:1532:53:  [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).
    cs_size_pos = strstr(t1_line, "/CharStrings") + strlen("/CharStrings") 
data/dvi2ps-5.1j/xxstdio.c:17:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#undef fgetc
data/dvi2ps-5.1j/xxstdio.c:185:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int c = fgetc(fp);
data/dvi2ps-5.1j/xxstdio.h:26:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define fgetc		xxfgetc

ANALYSIS SUMMARY:

Hits = 410
Lines analyzed = 17966 in approximately 0.50 seconds (36010 lines/second)
Physical Source Lines of Code (SLOC) = 15084
Hits@level = [0] 248 [1] 133 [2] 171 [3]   6 [4]  97 [5]   3
Hits@level+ = [0+] 658 [1+] 410 [2+] 277 [3+] 106 [4+] 100 [5+]   3
Hits/KSLOC@level+ = [0+] 43.6224 [1+] 27.1811 [2+] 18.3638 [3+] 7.02731 [4+] 6.62954 [5+] 0.198886
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.