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/form-4.2.1+git20200217/sources/argument.c
Examining data/form-4.2.1+git20200217/sources/bugtool.c
Examining data/form-4.2.1+git20200217/sources/checkpoint.c
Examining data/form-4.2.1+git20200217/sources/comexpr.c
Examining data/form-4.2.1+git20200217/sources/compcomm.c
Examining data/form-4.2.1+git20200217/sources/compiler.c
Examining data/form-4.2.1+git20200217/sources/compress.c
Examining data/form-4.2.1+git20200217/sources/comtool.c
Examining data/form-4.2.1+git20200217/sources/comtool.h
Examining data/form-4.2.1+git20200217/sources/declare.h
Examining data/form-4.2.1+git20200217/sources/diagrams.c
Examining data/form-4.2.1+git20200217/sources/dict.c
Examining data/form-4.2.1+git20200217/sources/dollar.c
Examining data/form-4.2.1+git20200217/sources/execute.c
Examining data/form-4.2.1+git20200217/sources/extcmd.c
Examining data/form-4.2.1+git20200217/sources/factor.c
Examining data/form-4.2.1+git20200217/sources/findpat.c
Examining data/form-4.2.1+git20200217/sources/form3.h
Examining data/form-4.2.1+git20200217/sources/fsizes.h
Examining data/form-4.2.1+git20200217/sources/ftypes.h
Examining data/form-4.2.1+git20200217/sources/function.c
Examining data/form-4.2.1+git20200217/sources/fwin.h
Examining data/form-4.2.1+git20200217/sources/gentopo.cc
Examining data/form-4.2.1+git20200217/sources/gentopo.h
Examining data/form-4.2.1+git20200217/sources/if.c
Examining data/form-4.2.1+git20200217/sources/index.c
Examining data/form-4.2.1+git20200217/sources/inivar.h
Examining data/form-4.2.1+git20200217/sources/lus.c
Examining data/form-4.2.1+git20200217/sources/mallocprotect.h
Examining data/form-4.2.1+git20200217/sources/message.c
Examining data/form-4.2.1+git20200217/sources/minos.c
Examining data/form-4.2.1+git20200217/sources/minos.h
Examining data/form-4.2.1+git20200217/sources/module.c
Examining data/form-4.2.1+git20200217/sources/mpi.c
Examining data/form-4.2.1+git20200217/sources/mpidbg.h
Examining data/form-4.2.1+git20200217/sources/mytime.cc
Examining data/form-4.2.1+git20200217/sources/mytime.h
Examining data/form-4.2.1+git20200217/sources/names.c
Examining data/form-4.2.1+git20200217/sources/normal.c
Examining data/form-4.2.1+git20200217/sources/notation.c
Examining data/form-4.2.1+git20200217/sources/opera.c
Examining data/form-4.2.1+git20200217/sources/optimize.cc
Examining data/form-4.2.1+git20200217/sources/parallel.c
Examining data/form-4.2.1+git20200217/sources/parallel.h
Examining data/form-4.2.1+git20200217/sources/pattern.c
Examining data/form-4.2.1+git20200217/sources/poly.cc
Examining data/form-4.2.1+git20200217/sources/poly.h
Examining data/form-4.2.1+git20200217/sources/polyfact.cc
Examining data/form-4.2.1+git20200217/sources/polyfact.h
Examining data/form-4.2.1+git20200217/sources/polygcd.cc
Examining data/form-4.2.1+git20200217/sources/polygcd.h
Examining data/form-4.2.1+git20200217/sources/polywrap.cc
Examining data/form-4.2.1+git20200217/sources/portsignals.h
Examining data/form-4.2.1+git20200217/sources/pre.c
Examining data/form-4.2.1+git20200217/sources/proces.c
Examining data/form-4.2.1+git20200217/sources/ratio.c
Examining data/form-4.2.1+git20200217/sources/reken.c
Examining data/form-4.2.1+git20200217/sources/reshuf.c
Examining data/form-4.2.1+git20200217/sources/sch.c
Examining data/form-4.2.1+git20200217/sources/setfile.c
Examining data/form-4.2.1+git20200217/sources/smart.c
Examining data/form-4.2.1+git20200217/sources/sort.c
Examining data/form-4.2.1+git20200217/sources/spectator.c
Examining data/form-4.2.1+git20200217/sources/startup.c
Examining data/form-4.2.1+git20200217/sources/store.c
Examining data/form-4.2.1+git20200217/sources/structs.h
Examining data/form-4.2.1+git20200217/sources/symmetr.c
Examining data/form-4.2.1+git20200217/sources/tables.c
Examining data/form-4.2.1+git20200217/sources/threads.c
Examining data/form-4.2.1+git20200217/sources/token.c
Examining data/form-4.2.1+git20200217/sources/tools.c
Examining data/form-4.2.1+git20200217/sources/topowrap.cc
Examining data/form-4.2.1+git20200217/sources/transform.c
Examining data/form-4.2.1+git20200217/sources/unix.h
Examining data/form-4.2.1+git20200217/sources/unixfile.c
Examining data/form-4.2.1+git20200217/sources/variable.h
Examining data/form-4.2.1+git20200217/sources/vector.h
Examining data/form-4.2.1+git20200217/sources/wildcard.c

FINAL RESULTS:

data/form-4.2.1+git20200217/sources/checkpoint.c:171:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(tmp_recovery, recoveryfile);
data/form-4.2.1+git20200217/sources/checkpoint.c:172:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(tmp_intermed, intermedfile);
data/form-4.2.1+git20200217/sources/checkpoint.c:176:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(tmp + PF_fmt_pos, BASENAME_FMT, prefix, id);
data/form-4.2.1+git20200217/sources/checkpoint.c:403:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(BaseName,BASENAME_FMT,(PF.me == MASTER)?'m':'s',PF.me);
data/form-4.2.1+git20200217/sources/checkpoint.c:1313:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy((char*)VAR, p); p = (unsigned char*)p + strlen(p) + 1; \
data/form-4.2.1+git20200217/sources/checkpoint.c:3119: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(str, AC.CheckpointRunBefore);
data/form-4.2.1+git20200217/sources/checkpoint.c:3121: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(str+l+1, argbuf);
data/form-4.2.1+git20200217/sources/checkpoint.c:3122:15:  [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.
			retvalue = system(str);
data/form-4.2.1+git20200217/sources/checkpoint.c:3178: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(str, AC.CheckpointRunAfter);
data/form-4.2.1+git20200217/sources/checkpoint.c:3180: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(str+l+1, argbuf);
data/form-4.2.1+git20200217/sources/checkpoint.c:3181:15:  [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.
			retvalue = system(str);
data/form-4.2.1+git20200217/sources/extcmd.c:1043:7:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
				  execvp(cmd, argv);
data/form-4.2.1+git20200217/sources/extcmd.c:1073:5:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		  execvp(cmd, argv);
data/form-4.2.1+git20200217/sources/form3.h:154:9:  [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.
#define snprintf _snprintf
data/form-4.2.1+git20200217/sources/form3.h:154:18:  [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.
#define snprintf _snprintf
data/form-4.2.1+git20200217/sources/module.c:763:7:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if ( system((char *)(AP.preStart)) ) return(-1);
data/form-4.2.1+git20200217/sources/mpidbg.h:66:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "*** [%d] %10s %4d @ %-16s: ", MPIDBG_RANK, file, line, func);
data/form-4.2.1+git20200217/sources/mpidbg.h:67:2:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	vsprintf(buf + strlen(buf), fmt, ap);
data/form-4.2.1+git20200217/sources/parallel.c:166:54:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define DBGOUT(lv1, lv2, a) do { if ( lv1 >= lv2 ) { printf a; fflush(stdout); } } while (0)
data/form-4.2.1+git20200217/sources/polywrap.cc:1127: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(oldCommercial, (char*)AC.Commercial);
data/form-4.2.1+git20200217/sources/polywrap.cc:1423: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((char*)AC.Commercial, oldCommercial);
data/form-4.2.1+git20200217/sources/polywrap.cc:1489: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(oldCommercial, (char*)AC.Commercial);
data/form-4.2.1+git20200217/sources/polywrap.cc:1653: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((char*)AC.Commercial, oldCommercial);
data/form-4.2.1+git20200217/sources/pre.c:486:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    	sprintf(timestring,"%s.%1d%1d",millibuf,timepart1,timepart2);
data/form-4.2.1+git20200217/sources/pre.c:4147:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		err = system((char *)s);
data/form-4.2.1+git20200217/sources/pre.c:4151:12:  [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.
	else if ( system((char *)s) ) {
data/form-4.2.1+git20200217/sources/startup.c:122: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(s,VERSIONSTR);
data/form-4.2.1+git20200217/sources/startup.c:158:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(t,"Run: %s",MakeDate());
data/form-4.2.1+git20200217/sources/startup.c:168: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(s,buffer2);
data/form-4.2.1+git20200217/sources/startup.c:176: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(s,buffer2);
data/form-4.2.1+git20200217/sources/startup.c:807:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf((char *)s,"%s.%d",FG.fname2,AT.identity);
data/form-4.2.1+git20200217/sources/startup.c:813:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf((char *)s,"%s.%d",FG.fname,AT.identity);
data/form-4.2.1+git20200217/sources/threads.c:561:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf((char *)s,"%s.%d",FG.fname,identity);
data/form-4.2.1+git20200217/sources/threads.c:567:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf((char *)s,"%s.%d",FG.fname,identity);
data/form-4.2.1+git20200217/sources/tools.c:425:16:  [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.
				if ( ( f = popen((char *)name,"r") ) == 0 ) {
data/form-4.2.1+git20200217/sources/tools.c:440:10:  [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.
					f = popen((char *)name, "r");
data/form-4.2.1+git20200217/sources/checkpoint.c:222:21:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
			if ( (fd = fopen(tmpnam, "r")) )
data/form-4.2.1+git20200217/sources/checkpoint.c:246:15:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
			fd = fopen(tmpnam, "r");
data/form-4.2.1+git20200217/sources/checkpoint.c:342:12:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
				remove(tmpnam);
data/form-4.2.1+git20200217/sources/checkpoint.c:3143:16:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
				fd = fopen(tmpnam, "w");
data/form-4.2.1+git20200217/sources/parallel.c:1979: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 ( ( c = getenv("PF_LOG") ) != 0 ) {
data/form-4.2.1+git20200217/sources/parallel.c:1985: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 ( ( c = (char*)getenv("PF_RBUFS") ) != 0 ) {
data/form-4.2.1+git20200217/sources/parallel.c:1990: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 ( ( c = (char*)getenv("PF_SBUFS") ) != 0 ) {
data/form-4.2.1+git20200217/sources/parallel.c:2000: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 ( ( c = getenv("PF_STATS") ) ) {
data/form-4.2.1+git20200217/sources/pre.c:611:23:  [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 ( ( t = (UBYTE *)(getenv((char *)(name))) ) != 0 ) {
data/form-4.2.1+git20200217/sources/setfile.c:207: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.
					s3 = (UBYTE *)getenv((char *)(start+1));
data/form-4.2.1+git20200217/sources/setfile.c:1192:16:  [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.
		s = (char *)(getenv(varname));
data/form-4.2.1+git20200217/sources/startup.c:471:41:  [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 ( AM.Path == 0 ) AM.Path = (UBYTE *)getenv("FORMPATH");
data/form-4.2.1+git20200217/sources/startup.c:614:26:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
			AM.TempDir = (UBYTE *)getenv("FORMTMP");
data/form-4.2.1+git20200217/sources/startup.c:625:30:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
			AM.TempSortDir = (UBYTE *)getenv("FORMTMPSORT");
data/form-4.2.1+git20200217/sources/startup.c:1219:38:  [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.
		initPresetExternalChannels((UBYTE*)getenv("FORM_PIPES"),AX.timeout);
data/form-4.2.1+git20200217/sources/tools.c:549:16:  [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.
		s = (UBYTE *)getenv("FORMSETUP");
data/form-4.2.1+git20200217/sources/checkpoint.c:204:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ( (fd = fopen(recoveryfile, "r")) ) {
data/form-4.2.1+git20200217/sources/checkpoint.c:222: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).
			if ( (fd = fopen(tmpnam, "r")) )
data/form-4.2.1+git20200217/sources/checkpoint.c:246: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).
			fd = fopen(tmpnam, "r");
data/form-4.2.1+git20200217/sources/checkpoint.c:259:5:  [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).
	fd=fopen(recoveryfile,"w");
data/form-4.2.1+git20200217/sources/checkpoint.c:285:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ( (fd = fopen(recoveryfile, "r")) ) {
data/form-4.2.1+git20200217/sources/checkpoint.c:1216:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char cache_buffer[CACHE_SIZE];
data/form-4.2.1+git20200217/sources/checkpoint.c:1224:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(cache_buffer+cache_fill, (unsigned char*)ptr, overlap);
data/form-4.2.1+git20200217/sources/checkpoint.c:1229:22:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			if ( cache_fill ) memcpy(cache_buffer, (unsigned char*)ptr+overlap+fullsize-cache_fill, cache_fill);
data/form-4.2.1+git20200217/sources/checkpoint.c:1233:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(cache_buffer, (unsigned char*)ptr+overlap, fullsize);
data/form-4.2.1+git20200217/sources/checkpoint.c:1238:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(cache_buffer+cache_fill, (unsigned char*)ptr, fullsize);
data/form-4.2.1+git20200217/sources/checkpoint.c:1300: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(VAR, p, SIZE); p = (unsigned char*)p + SIZE;
data/form-4.2.1+git20200217/sources/checkpoint.c:1417:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ( !(fd = fopen(recoveryfile, "r")) ) return(__LINE__);
data/form-4.2.1+git20200217/sources/checkpoint.c:1816:33:  [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 ( ( tablebases[i].handle = fopen(tablebases[i].fullname, "r+b") ) == NULL ) {
data/form-4.2.1+git20200217/sources/checkpoint.c:2217:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(AR.outfile->PObuffer, p, size*sizeof(WORD));
data/form-4.2.1+git20200217/sources/checkpoint.c:2261:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(AR.hidefile->PObuffer, p, size*sizeof(WORD));
data/form-4.2.1+git20200217/sources/checkpoint.c:2379: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(&(A.O.NumInBrack), p, l); p = (unsigned char*)p + l;
data/form-4.2.1+git20200217/sources/checkpoint.c:2383: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(&(A.O.OptimizeResult),p,sizeof(OPTIMIZERESULT));
data/form-4.2.1+git20200217/sources/checkpoint.c:2490:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ( !(fd = fopen(intermedfile, "wb")) ) return(__LINE__);
data/form-4.2.1+git20200217/sources/checkpoint.c:3110: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 argbuf[20];
data/form-4.2.1+git20200217/sources/checkpoint.c:3143:10:  [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).
				fd = fopen(tmpnam, "w");
data/form-4.2.1+git20200217/sources/checkpoint.c:3207:10:  [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).
				fd = fopen(intermedfile, "r");
data/form-4.2.1+git20200217/sources/extcmd.c:1010:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				(open(stderrname,O_WRONLY)<0)
data/form-4.2.1+git20200217/sources/extcmd.c:1228:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char statusbuf[2]={'\0','\0'};/*'\0' if run_cmd retuns ok, '!' othervise.*/
data/form-4.2.1+git20200217/sources/extcmd.c:1378:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pidtxt[PIDTXTSIZE],     /*64/Log_2[10] = 19.3, this is enough for any integer*/
data/form-4.2.1+git20200217/sources/extcmd.c:1577: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 buf[1024];
data/form-4.2.1+git20200217/sources/extcmd.c:1578: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 buf2[1024];
data/form-4.2.1+git20200217/sources/form3.h:496: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).
#define Uopen(x,y) fopen(x,y)
data/form-4.2.1+git20200217/sources/gentopo.h:29: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 momc[2];       // no more used
data/form-4.2.1+git20200217/sources/gentopo.h:31:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char padding[6];
data/form-4.2.1+git20200217/sources/message.c:145:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char Out[MAXLINELENGTH+14], *stopper, *t, *s, *u, c, *carray;
data/form-4.2.1+git20200217/sources/minos.c:230: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).
	if ( ( handle = fopen(*name,"r+b") ) != 0 ) {
data/form-4.2.1+git20200217/sources/minos.c:247: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).
		if ( ( handle = fopen(*newname,"r+b") ) != 0 ) {
data/form-4.2.1+git20200217/sources/minos.c:270: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 ( ( handle = fopen(*newname,"r+b") ) != 0 ) {
data/form-4.2.1+git20200217/sources/minos.c:602:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ( ( f = fopen(name,"w+b") ) == 0 ) {
data/form-4.2.1+git20200217/sources/minos.c:628:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ( ( f = fopen(name,"w+b") ) == 0 ) {
data/form-4.2.1+git20200217/sources/minos.h:104:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char element[ELEMENTSIZE];  /* table element in character form */
data/form-4.2.1+git20200217/sources/minos.h:117:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	names[NAMETABLESIZE];
data/form-4.2.1+git20200217/sources/mpidbg.h:63:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];  /* Enough. */
data/form-4.2.1+git20200217/sources/mpidbg.h:92: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.
			buf += sprintf(buf, "%d", i);
data/form-4.2.1+git20200217/sources/mpidbg.h:121: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.
			buf += sprintf(buf, "(source=%d,tag=%d,size=%d)", statuses[i].MPI_SOURCE, statuses[i].MPI_TAG, ret_size);
data/form-4.2.1+git20200217/sources/mpidbg.h:339:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256 * 1];  /* Enough. */
data/form-4.2.1+git20200217/sources/mpidbg.h:362:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256 * 1];  /* Enough. */
data/form-4.2.1+git20200217/sources/mpidbg.h:390:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256];  /* Enough. */
data/form-4.2.1+git20200217/sources/mpidbg.h:392: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(old_requests, array_of_requests, sizeof(MPI_Request) * count);
data/form-4.2.1+git20200217/sources/mpidbg.h:416:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256];  /* Enough. */
data/form-4.2.1+git20200217/sources/mpidbg.h:418: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(old_requests, array_of_requests, sizeof(MPI_Request) * count);
data/form-4.2.1+git20200217/sources/mpidbg.h:447:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256 * count];  /* Enough. */
data/form-4.2.1+git20200217/sources/mpidbg.h:449: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(old_requests, array_of_requests, sizeof(MPI_Request) * count);
data/form-4.2.1+git20200217/sources/mpidbg.h:471:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256 * count];  /* Enough. */
data/form-4.2.1+git20200217/sources/mpidbg.h:473: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(old_requests, array_of_requests, sizeof(MPI_Request) * count);
data/form-4.2.1+git20200217/sources/mpidbg.h:500:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256 * incount];  /* Enough. */
data/form-4.2.1+git20200217/sources/mpidbg.h:502: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(old_requests, array_of_requests, sizeof(MPI_Request) * incount);
data/form-4.2.1+git20200217/sources/mpidbg.h:524:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256 * incount];  /* Enough. */
data/form-4.2.1+git20200217/sources/mpidbg.h:526: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(old_requests, array_of_requests, sizeof(MPI_Request) * incount);
data/form-4.2.1+git20200217/sources/mytime.cc:43:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char res[10];
data/form-4.2.1+git20200217/sources/mytime.cc:44:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf (res,"%.4lf", thetime());
data/form-4.2.1+git20200217/sources/optimize.cc:372: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(optimize_expr, newexpr, i*sizeof(WORD));
data/form-4.2.1+git20200217/sources/optimize.cc:872:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(sorted, t, *t*sizeof(WORD));
data/form-4.2.1+git20200217/sources/optimize.cc:883:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(new_poly_vars, AN.poly_vars, AN.poly_num_vars*sizeof(WORD));
data/form-4.2.1+git20200217/sources/optimize.cc:3673:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(e+3, &new_eqn[3], (new_eqn.size()-3)*sizeof(WORD));
data/form-4.2.1+git20200217/sources/optimize.cc:4319: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(now, &brackets[b][0], brackets[b].size()*sizeof(WORD));
data/form-4.2.1+git20200217/sources/optimize.cc:4321: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(now, t+1, (*t-1)*sizeof(WORD));
data/form-4.2.1+git20200217/sources/optimize.cc:4357: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(AO.OptimizeResult.code, &output[0], output.size()*sizeof(WORD));
data/form-4.2.1+git20200217/sources/optimize.cc:4416:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(AT.WorkPointer, t, *t*sizeof(WORD));
data/form-4.2.1+git20200217/sources/optimize.cc:4615:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(AO.OptimizeResult.code+1, optimize_expr, (optimize_expr[0]+1)*sizeof(WORD));
data/form-4.2.1+git20200217/sources/optimize.cc:4723:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[100];
data/form-4.2.1+git20200217/sources/optimize.cc:4724:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf (str,"%d",AO.OptimizeResult.minvar);
data/form-4.2.1+git20200217/sources/optimize.cc:4726:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf (str,"%d",AO.OptimizeResult.maxvar);
data/form-4.2.1+git20200217/sources/optimize.cc:4748: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 str[20];
data/form-4.2.1+git20200217/sources/optimize.cc:4752:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(str,"%d",numop);
data/form-4.2.1+git20200217/sources/optimize.cc:4756: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 str[20];
data/form-4.2.1+git20200217/sources/optimize.cc:4758:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(str,"%d",numop);
data/form-4.2.1+git20200217/sources/optimize.cc:4903:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[20];
data/form-4.2.1+git20200217/sources/optimize.cc:4933:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf (str,"%d",cbuf[AM.sbufnum].numrhs);
data/form-4.2.1+git20200217/sources/parallel.c:126: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 swap_tmp__[sizeof(x) == sizeof(y) ? (int)sizeof(x) : -1]; \
data/form-4.2.1+git20200217/sources/parallel.c:127:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(swap_tmp__, &y, sizeof(x)); \
data/form-4.2.1+git20200217/sources/parallel.c:128:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&y, &x, sizeof(x)); \
data/form-4.2.1+git20200217/sources/parallel.c:1980: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).
			if ( *c ) PF.log = (int)atoi(c);
data/form-4.2.1+git20200217/sources/parallel.c:1986:23:  [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).
			PF.numrbufs = (int)atoi(c);
data/form-4.2.1+git20200217/sources/parallel.c:1991:23:  [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).
			PF.numsbufs = (int)atoi(c);
data/form-4.2.1+git20200217/sources/parallel.c:2002: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).
			PF_statsinterval = (int)atoi(c);
data/form-4.2.1+git20200217/sources/parallel.c:3926:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&(exprData.e), e, sizeof(struct ExPrEsSiOn));
data/form-4.2.1+git20200217/sources/parallel.c:4014: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(&(exprData.e), e, sizeof(struct ExPrEsSiOn));
data/form-4.2.1+git20200217/sources/parallel.c:4216: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[PF_SNDFILEBUFSIZE];
data/form-4.2.1+git20200217/sources/parallel.c:4250: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[PF_SNDFILEBUFSIZE];
data/form-4.2.1+git20200217/sources/poly.cc:257:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char res[41];
data/form-4.2.1+git20200217/sources/poly.h:213: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 (terms+dest, source, num*sizeof(WORD));
data/form-4.2.1+git20200217/sources/polyfact.cc:75: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 tmp[100];
data/form-4.2.1+git20200217/sources/polyfact.cc:76:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf (tmp,"%i",power[i]);
data/form-4.2.1+git20200217/sources/polyfact.cc:84: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 tmp[12];
data/form-4.2.1+git20200217/sources/polyfact.cc:85:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf (tmp,"%i",factor[0].modp);
data/form-4.2.1+git20200217/sources/polyfact.cc:88:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf (tmp,"%i",factor[0].modn);
data/form-4.2.1+git20200217/sources/polywrap.cc:1125:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char oldCommercial[COMMERCIALSIZE+2];
data/form-4.2.1+git20200217/sources/polywrap.cc:1128:2:  [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((char*)AC.Commercial, "factorize");
data/form-4.2.1+git20200217/sources/polywrap.cc:1465:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char oldCommercial[COMMERCIALSIZE+2];
data/form-4.2.1+git20200217/sources/polywrap.cc:1490:2:  [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((char*)AC.Commercial, "unfactorize");
data/form-4.2.1+git20200217/sources/pre.c:477:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		static char timestring[40];
data/form-4.2.1+git20200217/sources/pre.c:491:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		static char timestring[40];
data/form-4.2.1+git20200217/sources/pre.c:492:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    	sprintf(timestring,"%ld",(GetRunningTime() - AP.StopWatchZero));
data/form-4.2.1+git20200217/sources/reken.c:3895:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf((char *)outval,"%e",value);
data/form-4.2.1+git20200217/sources/reken.c:3897:36:  [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.
	else if ( ABS(value) < 0.0001 ) { sprintf((char *)outval,"%10f",value); }
data/form-4.2.1+git20200217/sources/reken.c:3898:35:  [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.
	else if ( ABS(value) < 0.001 ) { sprintf((char *)outval,"%9f",value); }
data/form-4.2.1+git20200217/sources/reken.c:3899:34:  [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.
	else if ( ABS(value) < 0.01 ) { sprintf((char *)outval,"%8f",value); }
data/form-4.2.1+git20200217/sources/reken.c:3900:33:  [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.
	else if ( ABS(value) < 0.1 ) { sprintf((char *)outval,"%7f",value); }
data/form-4.2.1+git20200217/sources/reken.c:3901:32:  [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.
	else if ( ABS(value) < 1. ) { sprintf((char *)outval,"%6f",value); }
data/form-4.2.1+git20200217/sources/reken.c:3902:33:  [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.
	else if ( ABS(value) < 10. ) { sprintf((char *)outval,"%5f",value); }
data/form-4.2.1+git20200217/sources/reken.c:3903:34:  [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.
	else if ( ABS(value) < 100. ) { sprintf((char *)outval,"%4f",value); }
data/form-4.2.1+git20200217/sources/reken.c:3904:35:  [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.
	else if ( ABS(value) < 1000. ) { sprintf((char *)outval,"%3f",value); }
data/form-4.2.1+git20200217/sources/reken.c:3905:36:  [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.
	else if ( ABS(value) < 10000. ) { sprintf((char *)outval,"%2f",value); }
data/form-4.2.1+git20200217/sources/reken.c:3906: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.
	else { sprintf((char *)outval,"%1f",value); }
data/form-4.2.1+git20200217/sources/setfile.c:174: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 *proop1[3] = { "Setup file", "Setups in .frm file", "Setup in environment" };
data/form-4.2.1+git20200217/sources/setfile.c:986:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(t-1,"%d.%d",identity,AN.filenum);
data/form-4.2.1+git20200217/sources/setfile.c:989:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(t-1,"%d",AN.filenum);
data/form-4.2.1+git20200217/sources/setfile.c:1031:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(t-1,"%d-%d",identity,AN.filenum);
data/form-4.2.1+git20200217/sources/setfile.c:1034:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(t-1,"%d",AN.filenum);
data/form-4.2.1+git20200217/sources/setfile.c:1182:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *s, *t, *u, varname[100];
data/form-4.2.1+git20200217/sources/setfile.c:1188: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.
		t = s = (char *)(setupparameters[i].parameter);
data/form-4.2.1+git20200217/sources/sort.c:1490:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf((char *)(THRbuf),"PutOut(%d)",AT.identity);
data/form-4.2.1+git20200217/sources/sort.c:4342:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf((char *)(THRbuf),"StoreTerm(%d)",AT.identity);
data/form-4.2.1+git20200217/sources/startup.c:114: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 buffer1[250], buffer2[80], *s = buffer1, *t = buffer2;
data/form-4.2.1+git20200217/sources/startup.c:138:8:  [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.
		s += sprintf(s," %d-bits",(WORD)(sizeof(WORD)*16));
data/form-4.2.1+git20200217/sources/startup.c:149: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.
			s += sprintf(s," %d worker",nworkers);
data/form-4.2.1+git20200217/sources/startup.c:173:5:  [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.
				strcat(s,"  ");
data/form-4.2.1+git20200217/sources/startup.c:671:3:  [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(FG.fname,"/formswap/xxxxxxxxxxxxxxxxxxxxx");
data/form-4.2.1+git20200217/sources/startup.c:680:3:  [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(FG.fname,"/formswapx/xxxxxxxxxxxxxxxxxxxxx");
data/form-4.2.1+git20200217/sources/startup.c:687:10:  [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.
	  iii = sprintf((char*)t,"%d",PF.me);
data/form-4.2.1+git20200217/sources/startup.c:1045: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 dumstr[20];
data/form-4.2.1+git20200217/sources/startup.c:1047:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(dumstr,":%d:",i);
data/form-4.2.1+git20200217/sources/startup.c:1072: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 dumstr[20];
data/form-4.2.1+git20200217/sources/startup.c:1074:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(dumstr,"::%d::",i);
data/form-4.2.1+git20200217/sources/startup.c:1123: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[41];  /* up to 128-bit */
data/form-4.2.1+git20200217/sources/startup.c:1229:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf((char*)buf,"%d",PF.me);
data/form-4.2.1+git20200217/sources/startup.c:1231:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf((char*)buf,"%d",PF.numtasks);
data/form-4.2.1+git20200217/sources/startup.c:1261:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf((char*)buf,"%d",AM.totalnumberofthreads);
data/form-4.2.1+git20200217/sources/store.c:278:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buffer,fi->POfill,l);
data/form-4.2.1+git20200217/sources/store.c:310:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(fi->POfill,buffer,avail);
data/form-4.2.1+git20200217/sources/store.c:330:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(fi->POfill,buffer,l);
data/form-4.2.1+git20200217/sources/structs.h:2512:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	*VarType[10];
data/form-4.2.1+git20200217/sources/structs.h:2513:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	*ExprStat[21];
data/form-4.2.1+git20200217/sources/structs.h:2514:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	*FunNam[2];
data/form-4.2.1+git20200217/sources/structs.h:2515:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	*swmes[3];
data/form-4.2.1+git20200217/sources/threads.c:522:61:  [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.
		ScratchBuf = (WORD *)Malloc1(ScratchSize[j]*sizeof(WORD),(char *)(scratchname[j]));
data/form-4.2.1+git20200217/sources/token.c:595:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char outbuf[81], *s, *out, c;
data/form-4.2.1+git20200217/sources/tools.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 *mallocstrings[60000];
data/form-4.2.1+git20200217/sources/tools.c:872: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((void *)(stream->buffer),(void *)out,(size_t)(stream->inbuffer*sizeof(UBYTE)));
data/form-4.2.1+git20200217/sources/tools.c:1045:7:  [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).
	in = fopen(source, "rb");
data/form-4.2.1+git20200217/sources/tools.c:1050: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).
	out = fopen(dest, "wb");
data/form-4.2.1+git20200217/sources/tools.c:2189:26:  [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.
			if ( (char *)mem < (((char *)malloclist[i]) + mallocsizes[i])
data/form-4.2.1+git20200217/sources/tools.c:2190:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			&& (char *)(malloclist[i]) < ((char *)mem + size) ) {
data/form-4.2.1+git20200217/sources/tools.c:2203:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			t = (char *)(malloclist[j]);
data/form-4.2.1+git20200217/sources/tools.c:2274:26:  [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.
			if ( (char *)mem < (((char *)malloclist[i]) + mallocsizes[i])
data/form-4.2.1+git20200217/sources/tools.c:2275:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			&& (char *)(malloclist[i]) < ((char *)mem + size) ) {
data/form-4.2.1+git20200217/sources/tools.c:2397: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.
		t = (char *)(malloclist[i]);
data/form-4.2.1+git20200217/sources/tools.c:2408: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.
		t = (char *)(malloclist[i]) + mallocsizes[i];
data/form-4.2.1+git20200217/sources/unixfile.c:55:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
extern "C" open();
data/form-4.2.1+git20200217/sources/unixfile.c:79:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f->descriptor = open(filename,flags,rights);
data/form-4.2.1+git20200217/sources/unixfile.c:83:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		f->descriptor = open(filename,flags,rights);
data/form-4.2.1+git20200217/sources/vector.h:258:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(v_tmp_newptr_, (X).ptr, (X).size * sizeof((X).ptr[0])); \
data/form-4.2.1+git20200217/sources/vector.h:299:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy((X).ptr + (X).size, (src), v_tmp_n_ * sizeof((X).ptr[0])); \
data/form-4.2.1+git20200217/sources/vector.h:358:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy((X).ptr + v_tmp_index_, (src), v_tmp_n_ * sizeof((X).ptr[0])); \
data/form-4.2.1+git20200217/sources/checkpoint.c:169: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).
		tmp_recovery = (char *)Malloc1(strlen(recoveryfile) + strlen(intermedfile) + 2, "PF_recoveryfile");
data/form-4.2.1+git20200217/sources/checkpoint.c:169:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		tmp_recovery = (char *)Malloc1(strlen(recoveryfile) + strlen(intermedfile) + 2, "PF_recoveryfile");
data/form-4.2.1+git20200217/sources/checkpoint.c:170:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		tmp_intermed = tmp_recovery + strlen(recoveryfile) + 1;
data/form-4.2.1+git20200217/sources/checkpoint.c:401: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).
	int lenpath = AM.TempDir ? strlen((char*)AM.TempDir)+1 : 0;
data/form-4.2.1+git20200217/sources/checkpoint.c:408: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).
	recoveryfile = (char*)Malloc1(5*(lenpath+strlen(BaseName)+4+1),"InitRecovery");
data/form-4.2.1+git20200217/sources/checkpoint.c:1312:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		VAR = (CAST)Malloc1(strlen(p)+1,"R_COPY_S"); \
data/form-4.2.1+git20200217/sources/checkpoint.c:1313:50:  [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).
		strcpy((char*)VAR, p); p = (unsigned char*)p + strlen(p) + 1; \
data/form-4.2.1+git20200217/sources/checkpoint.c:1318: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).
		l = strlen((char*)STR) + 1; \
data/form-4.2.1+git20200217/sources/checkpoint.c:2835: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).
		l = strlen((char*)PreVar[i].name) + 1;
data/form-4.2.1+git20200217/sources/checkpoint.c:2837: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).
			l += strlen((char*)(PreVar[i].name+l)) + 1;
data/form-4.2.1+git20200217/sources/checkpoint.c:2840: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).
			l += strlen((char*)(PreVar[i].name+l)) + 1;
data/form-4.2.1+git20200217/sources/checkpoint.c:3115: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).
			l = strlen(AC.CheckpointRunBefore);
data/form-4.2.1+git20200217/sources/checkpoint.c:3117: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).
			l2 = strlen(argbuf);
data/form-4.2.1+git20200217/sources/checkpoint.c:3174: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).
			l = strlen(AC.CheckpointRunAfter);
data/form-4.2.1+git20200217/sources/checkpoint.c:3176: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).
			l2 = strlen(argbuf);
data/form-4.2.1+git20200217/sources/extcmd.c:444:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if( (res=read(fd,buf,count)) <1 )/*EOF or read is interrupted by a signal?:*/
data/form-4.2.1+git20200217/sources/extcmd.c:447:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			 res=read(fd,buf,count);
data/form-4.2.1+git20200217/sources/extcmd.c:709:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if( (res=read(fd,buf,count)) <0 )/*Signal?*/
data/form-4.2.1+git20200217/sources/extcmd.c:711:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					  res=read(fd,buf,count);
data/form-4.2.1+git20200217/sources/mpidbg.h:67:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	vsprintf(buf + strlen(buf), fmt, ap);
data/form-4.2.1+git20200217/sources/mpidbg.h:82:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	buf += sprintf(buf, "(");
data/form-4.2.1+git20200217/sources/mpidbg.h:89:11:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			buf += sprintf(buf, ",");
data/form-4.2.1+git20200217/sources/mpidbg.h:95:11:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			buf += sprintf(buf, "*");
data/form-4.2.1+git20200217/sources/mpidbg.h:98:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	buf += sprintf(buf, ")");
data/form-4.2.1+git20200217/sources/mpidbg.h:109:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	buf += sprintf(buf, "(");
data/form-4.2.1+git20200217/sources/mpidbg.h:116:11:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			buf += sprintf(buf, ",");
data/form-4.2.1+git20200217/sources/mpidbg.h:123:11:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			buf += sprintf(buf, "*");
data/form-4.2.1+git20200217/sources/mpidbg.h:126:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	buf += sprintf(buf, ")");
data/form-4.2.1+git20200217/sources/notation.c:56:6:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	int equal, i;
data/form-4.2.1+git20200217/sources/notation.c:94:11:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
					if ( equal ) {
data/form-4.2.1+git20200217/sources/optimize.cc:976: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).
			int l = strlen((char *)buf);
data/form-4.2.1+git20200217/sources/optimize.cc:4841: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).
		bytes = strlen((char *)value);
data/form-4.2.1+git20200217/sources/optimize.cc:4846: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).
		bytes = strlen((char *)value);
data/form-4.2.1+git20200217/sources/parallel.c:2923:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			int bytes = strlen((char *)value);
data/form-4.2.1+git20200217/sources/parallel.c:3014:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				int bytes = strlen((char *)value);
data/form-4.2.1+git20200217/sources/startup.c:121: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(VERSIONSTR) <= 100 ) {
data/form-4.2.1+git20200217/sources/startup.c:123: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).
			s += strlen(VERSIONSTR);
data/form-4.2.1+git20200217/sources/startup.c:130:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(s,VERSIONSTR,97);
data/form-4.2.1+git20200217/sources/startup.c:1766:3:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		getchar();
data/form-4.2.1+git20200217/sources/startup.c:1771:3:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		getchar();
data/form-4.2.1+git20200217/sources/tools.c:163:8:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		cc = getc(f);
data/form-4.2.1+git20200217/sources/tools.c:179:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					int cc = getc(f);
data/form-4.2.1+git20200217/sources/unixfile.c:57:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
extern "C" read();
data/form-4.2.1+git20200217/sources/unixfile.c:123:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while( ( (ret=read(f->descriptor,ptr,size*nobj))<1)&&(errno == EINTR) );
data/form-4.2.1+git20200217/sources/unixfile.c:134:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return(read(f->descriptor,ptr,size*nobj));

ANALYSIS SUMMARY:

Hits = 257
Lines analyzed = 147395 in approximately 3.68 seconds (40087 lines/second)
Physical Source Lines of Code (SLOC) = 114732
Hits@level = [0] 162 [1]  45 [2] 160 [3]  16 [4]  36 [5]   0
Hits@level+ = [0+] 419 [1+] 257 [2+] 212 [3+]  52 [4+]  36 [5+]   0
Hits/KSLOC@level+ = [0+] 3.65199 [1+] 2.24 [2+] 1.84778 [3+] 0.45323 [4+] 0.313775 [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.