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/dpic-2020.09.15/backend.c
Examining data/dpic-2020.09.15/dpic.h
Examining data/dpic-2020.09.15/dpic.tab.c
Examining data/dpic-2020.09.15/dpic.tab.h
Examining data/dpic-2020.09.15/entryhp.h
Examining data/dpic-2020.09.15/entrytv.h
Examining data/dpic-2020.09.15/lxch.h
Examining data/dpic-2020.09.15/lxcst.h
Examining data/dpic-2020.09.15/lxhp.h
Examining data/dpic-2020.09.15/lxnp.h
Examining data/dpic-2020.09.15/lxtv.h
Examining data/dpic-2020.09.15/lxvars.h
Examining data/dpic-2020.09.15/main.c
Examining data/dpic-2020.09.15/mfp.c
Examining data/dpic-2020.09.15/mpo.c
Examining data/dpic-2020.09.15/parscst.h
Examining data/dpic-2020.09.15/pdf.c
Examining data/dpic-2020.09.15/pgf.c
Examining data/dpic-2020.09.15/postprod.c
Examining data/dpic-2020.09.15/preprod.c
Examining data/dpic-2020.09.15/ps.c
Examining data/dpic-2020.09.15/pst.c
Examining data/dpic-2020.09.15/svg.c
Examining data/dpic-2020.09.15/tex.c
Examining data/dpic-2020.09.15/VERSIONDATE.h
Examining data/dpic-2020.09.15/xfig.c

FINAL RESULTS:

data/dpic-2020.09.15/dpic.tab.c:1287:21:  [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 YYFPRINTF fprintf
data/dpic-2020.09.15/dpic.tab.c:2849:25:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			      (yyval).xval = system(&With4->segmnt[With4->seginx]); }
data/dpic-2020.09.15/dpic.tab.c:8128:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        ll = snprintf(tmpbuf,CHBUFSIZ,tmpfmt, (long double) ts);
data/dpic-2020.09.15/main.c:375:8:  [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.
  cf = access (ifn, 4);
data/dpic-2020.09.15/dpic.tab.c:4750:31:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    { (yyval).xval = ((double)random()) / randmax; }
data/dpic-2020.09.15/dpic.tab.c:4756:7:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    { srandom(Rnd((yyvsp[-1]).xval));
data/dpic-2020.09.15/dpic.tab.c:4757:29:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		  (yyval).xval = ((double)random()) / randmax;
data/dpic-2020.09.15/main.c:412:3:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srandom (time (&seed));
data/dpic-2020.09.15/dpic.tab.c:1533: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
data/dpic-2020.09.15/dpic.tab.c:1720: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 yymsgbuf[128];
data/dpic-2020.09.15/main.c:194: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 buf[CHBUFSIZ];
data/dpic-2020.09.15/main.c:358: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).
  else { log_ = fopen ("dpic.log", "w"); }
data/dpic-2020.09.15/main.c:785:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  else { copyin = fopen (trimname (infname, sizeof (mstring)), "r"); }
data/dpic-2020.09.15/main.c:832:19:  [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).
      redirect =  fopen (trimname (outfnam, sizeof (mstring)), "w"); }
data/dpic-2020.09.15/main.c:839:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    redirect =   fopen (trimname (outfnam, sizeof (mstring)), "a"); }
data/dpic-2020.09.15/main.c:1712:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  else { input = fopen (trimname (infname, sizeof (mstring)), "r"); }
data/dpic-2020.09.15/pdf.c:119:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[CHBUFSIZ];
data/dpic-2020.09.15/dpic.tab.c:1433:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#   define yystrlen strlen
data/dpic-2020.09.15/main.c:485:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc (*infname);
data/dpic-2020.09.15/main.c:488:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ((char) (c = getc (*infname)) != '\n') {

ANALYSIS SUMMARY:

Hits = 20
Lines analyzed = 19225 in approximately 0.53 seconds (36142 lines/second)
Physical Source Lines of Code (SLOC) = 17367
Hits@level = [0] 1059 [1]   3 [2]   9 [3]   4 [4]   4 [5]   0
Hits@level+ = [0+] 1079 [1+]  20 [2+]  17 [3+]   8 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 62.1293 [1+] 1.15161 [2+] 0.978868 [3+] 0.460644 [4+] 0.230322 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.