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/sympow-2.023.6/QD.c
Examining data/sympow-2.023.6/analrank.c
Examining data/sympow-2.023.6/analytic.c
Examining data/sympow-2.023.6/compute.c
Examining data/sympow-2.023.6/compute2.c
Examining data/sympow-2.023.6/conductors.c
Examining data/sympow-2.023.6/config/endiantuple.c
Examining data/sympow-2.023.6/config/fpubits1.c
Examining data/sympow-2.023.6/config/fpubits2.c
Examining data/sympow-2.023.6/disk.c
Examining data/sympow-2.023.6/ec_ap.c
Examining data/sympow-2.023.6/ec_ap_bsgs.c
Examining data/sympow-2.023.6/ec_ap_large.c
Examining data/sympow-2.023.6/eulerfactors.c
Examining data/sympow-2.023.6/factor.c
Examining data/sympow-2.023.6/fpu.c
Examining data/sympow-2.023.6/generate.c
Examining data/sympow-2.023.6/help.c
Examining data/sympow-2.023.6/init_curve.c
Examining data/sympow-2.023.6/main.c
Examining data/sympow-2.023.6/moddeg.c
Examining data/sympow-2.023.6/periods.c
Examining data/sympow-2.023.6/prepare.c
Examining data/sympow-2.023.6/rootno.c
Examining data/sympow-2.023.6/sympow.h
Examining data/sympow-2.023.6/util.c

FINAL RESULTS:

data/sympow-2.023.6/generate.c:146:2:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
 chmod(txtdatafiletemplate,datamode); chown(txtdatafiletemplate,datauid,datagid);
data/sympow-2.023.6/generate.c:146:39:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
 chmod(txtdatafiletemplate,datamode); chown(txtdatafiletemplate,datauid,datagid);
data/sympow-2.023.6/generate.c:208:2:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
 chown(B,datauid,datagid); free(P);}
data/sympow-2.023.6/main.c:124:16:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    if (os&1) {chown(cachedir,datauid,infod.st_gid);}
data/sympow-2.023.6/main.c:162:13:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	if (os&1) {chown(datafilesdir,datauid,infod.st_gid);}
data/sympow-2.023.6/main.c:191:13:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	if (os&1) {chown(paramdatafile,datauid,infod.st_gid);}
data/sympow-2.023.6/analrank.c:17:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(S,"%s,%s,%s,%s,%s",STR,STR,STR,STR,STR);
data/sympow-2.023.6/disk.c:19:4:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
  {fscanf(A,"%s %s",INPUT,BLAH);
data/sympow-2.023.6/disk.c:20:22:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
   for(k=0;k<4;k++) {fscanf(A,"%s",INPUT); Q[j][k]=atof(INPUT);}}} 
data/sympow-2.023.6/disk.c:22:3:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
 {fscanf(A,"%s %s",INPUT,BLAH); ASSERT(!strcmp(INPUT,"TACKS"));
data/sympow-2.023.6/disk.c:23:21:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
  for(k=0;k<4;k++) {fscanf(A,"%s",INPUT); TACKS[which][i][k]=atof(INPUT);}}}
data/sympow-2.023.6/disk.c:62: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).
 S[4]=0; strcpy(U,S);
data/sympow-2.023.6/disk.c:113: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(NM,NAME); NM[7]='t'; NM[8]='x'; NM[9]='t';
data/sympow-2.023.6/disk.c:114:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
 sprintf(txtdatafiletemplate,"%s%s",datafilesdir,NM);
data/sympow-2.023.6/disk.c:115: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.
 if (!(access(txtdatafiletemplate,(R_OK|F_OK)))) {edfbd=datafilesbindir; edfd=datafilesdir; edm=datamode;}
data/sympow-2.023.6/disk.c:116:29:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
 else if (pkgdatafilesdir) {sprintf(txtdatafiletemplate,"%s%s",pkgdatafilesdir,NM);
data/sympow-2.023.6/disk.c:117: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(txtdatafiletemplate,(R_OK|F_OK)))) {edfbd=pkgdatafilesbindir; edfd=pkgdatafilesdir; edm=pkgdatamode;}
data/sympow-2.023.6/disk.c:120:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
 sprintf(bindatafiletemplate,"%s%s",edfbd,NAME);
data/sympow-2.023.6/disk.c:130:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
 sprintf(txtdatafiletemplate,"%s%s",edfd,NAME);
data/sympow-2.023.6/disk.c:147: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(NM,NAME); NM[7]='t'; NM[8]='x'; NM[9]='t';
data/sympow-2.023.6/disk.c:148:24:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
 if (pkgdatafilesdir) {sprintf(txtdatafiletemplate,"%s%s",datafilesdir,NM);
data/sympow-2.023.6/disk.c:149: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(txtdatafiletemplate,(R_OK|F_OK)))) {edfbd=datafilesbindir; edfd=datafilesdir; edm=datamode;}
data/sympow-2.023.6/disk.c:150:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	else {sprintf(txtdatafiletemplate,"%s%s",pkgdatafilesdir,NM);
data/sympow-2.023.6/disk.c:151: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(txtdatafiletemplate,(R_OK|F_OK)))) {edfbd=pkgdatafilesbindir; edfd=pkgdatafilesdir; edm=pkgdatamode;}
data/sympow-2.023.6/disk.c:153:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
 sprintf(bindatafiletemplate,"%s%s",edfbd,NAME);
data/sympow-2.023.6/disk.c:163:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
 sprintf(txtdatafiletemplate,"%s%s",edfd,NAME);
data/sympow-2.023.6/generate.c:56:40:  [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).
  {sprintf(F3,"J(k-%i,X)/%i!*",i,i-1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:57:36:  [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).
  sprintf(F3,"sinv(k,X)^%i",dv+1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:61:40:  [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).
  {sprintf(F3,"J(k-%i,X)/%i!*",i,i-1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:64:40:  [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).
  {sprintf(F3,"J(k-%i,X)/%i!*",i,i-1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:68:38:  [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).
  {sprintf(F3,"J(k-%i,X)/%i!*",i,i); strcat(F2,F3);}
data/sympow-2.023.6/generate.c:71:38:  [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).
  {sprintf(F3,"J(k-%i,X)/%i!*",i,i); strcat(F2,F3);}
data/sympow-2.023.6/generate.c:76:40:  [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).
  {sprintf(F3,"J(k-%i,X)/%i!*",i,i-1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:79:40:  [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).
  {sprintf(F3,"J(k-%i,X)/%i!*",i,i-1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:83:38:  [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).
  {sprintf(F3,"J(k-%i,X)/%i!*",i,i); strcat(F2,F3);}
data/sympow-2.023.6/generate.c:86:38:  [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).
  {sprintf(F3,"J(k-%i,X)/%i!*",i,i); strcat(F2,F3);}
data/sympow-2.023.6/generate.c:145:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
{sprintf(txtdatafiletemplate,"%s/%s",datafilesdir,A);
data/sympow-2.023.6/generate.c:187: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(PARAM[j],PARAM[i]); i--; break;}} i++;}
data/sympow-2.023.6/generate.c:196:4:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
  {fscanf(R,"%s %s",INPUT,BLAH);
data/sympow-2.023.6/generate.c:198:5:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
   {fscanf(R,"%s",INPUT);
data/sympow-2.023.6/generate.c:234:2:  [4] (shell) execlp:
  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.
 execlp(SH,SH,newdatascript,SH,GP,ARGS,NULL);}
data/sympow-2.023.6/init_curve.c:209:2:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
 sscanf(S,"%s %s %s",J,I,K); wh=atoi(I); sn=atoll(K);
data/sympow-2.023.6/init_curve.c:236:2:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
 sscanf(S,"%s %s",J,I); cm=atoi(I); if (cm<0) cm=-cm;
data/sympow-2.023.6/init_curve.c:260:28:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
{char N[8],T[1024]; int u; sscanf(S,"%s %s",N,T); u=atoi(T);
data/sympow-2.023.6/init_curve.c:266:34:  [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).
 T=malloc(1024); U=malloc(1024); strcpy(T,S); To=T;
data/sympow-2.023.6/init_curve.c:267:35:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
 if (T[0]=='t') {tw=get_twist(T); sscanf(T+3,"%s",U); T+=(4+strlen(U));}
data/sympow-2.023.6/main.c:77:50:  [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).
	tname=(char *)(malloc(lenghtof_ename+extra+1)); strcpy(tname,ename);
data/sympow-2.023.6/main.c:117:74:  [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).
  if (strncmp(strlastitem(cachedir,'/'),PKGFOLDER,sizeof(PKGFOLDER)-1)) {strcat(cachedir,"/"PKGFOLDER);};
data/sympow-2.023.6/main.c:121:7:  [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(parcachedir,(R_OK|W_OK|X_OK))) {fprintf(stderr,"**ERROR** parent cache directory %s yields insufficient permissions\n",parcachedir); exit(-1);}
data/sympow-2.023.6/main.c:148:12:  [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.
  else if (access(pkgdatafilesbindir,(R_OK|W_OK|X_OK)))
data/sympow-2.023.6/main.c:159: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(cachedir,(R_OK|W_OK|X_OK))) {fprintf(stderr,"**ERROR** cache directory %s yields insufficient permissions\n",cachedir); exit(-1);}
data/sympow-2.023.6/main.c:167:7:  [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(datafilesdir,(R_OK|W_OK|X_OK))) {fprintf(stderr,"**ERROR** data cache folder %s yields insufficient permissions\n",datafilesdir); exit(-1);}}
data/sympow-2.023.6/main.c:172:7:  [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(datafilesbindir,(R_OK|W_OK|X_OK))) {fprintf(stderr,"**ERROR** data bin cache folder %s yields insufficient permissions\n",datafilesbindir); exit(-1);}}
data/sympow-2.023.6/main.c:196:7:  [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(paramdatafile,(R_OK|W_OK))) {fprintf(stderr,"**ERROR** %s yields insufficient permissions\n",paramdatafile); exit(-1);}}
data/sympow-2.023.6/main.c:230: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(INSTRING,argv[i+1]); i+=2;}
data/sympow-2.023.6/main.c:237:40:  [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).
  else if (!strcmp(argv[i],"-curve")) {strcpy(CSTR,argv[i+1]); i+=2;}
data/sympow-2.023.6/main.c:238:40:  [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).
  else if (!strcmp(argv[i],"-label")) {strcpy(LSTR,argv[i+1]); i+=2;}
data/sympow-2.023.6/prepare.c:103:42:  [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).
 c=CURR=malloc(256); n=NEXT=malloc(256); strcpy(CURR,IN);
data/sympow-2.023.6/prepare.c:105: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(LAST,CURR); ASSERT(ISA_NUMBER(CURR[0]));
data/sympow-2.023.6/main.c:73: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.
{const char *ename=getenv(name); char * tname=NULL;
data/sympow-2.023.6/main.c:112:13:  [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.
 env_pkgdir=getenv(SYMPOW_ENV_PKGDATADIR); pkgdatadir=(env_pkgdir!=NULL)?env_pkgdir:PKGDATADIR;
data/sympow-2.023.6/main.c:113:13:  [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.
 env_pkgdir=getenv(SYMPOW_ENV_PKGLIBDIR); pkglibdir=(env_pkgdir!=NULL)?env_pkgdir:PKGLIBDIR;
data/sympow-2.023.6/main.c:114:13:  [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.
 env_pkgdir=getenv(SYMPOW_ENV_PKGCACHEDIR); pkgcachedir=(env_pkgdir!=NULL)?env_pkgdir:PKGCACHEDIR;
data/sympow-2.023.6/main.c:129: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.
 else if ((env_pkgdir=getenv("HOME"))!=NULL) {asprintf(&cachedir,"%s/"PKGHOMECACHEDIR,env_pkgdir);
data/sympow-2.023.6/QD.c:259: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.
 const char QD_digit[16]="0123456789abcdef";
data/sympow-2.023.6/QD.c:260:28:  [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.
 f=Abs(a[0]); if (f==0.0) {strcpy(S,"0.0"); return 0;}
data/sympow-2.023.6/QD.c:284: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[128]; int e,u; e=QD_outputi(n,d,a,S); u=strlen(S); S[u++]='E';
data/sympow-2.023.6/QD.c:289:31:  [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.
{int i,e=0,l; double y; const char QD_digit[16]="0123456789abcdef";
data/sympow-2.023.6/QD.c:423: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[128]; int e,i=0,j; QD y,z;
data/sympow-2.023.6/QD.c:433: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[128]; int e,i=0,j; QD y,z; if (x[0]==0.0) {printf("0"); return;}
data/sympow-2.023.6/analrank.c:8: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[11]="1w0s0p06D0",S[55]; llint NU,NT; double f; int l,w1;
data/sympow-2.023.6/conductors.c:218:38:  [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.
{int i,T,W; llint P; QD A; QDpoly v; char STR[4][4]={"th","st","nd","rd"};
data/sympow-2.023.6/conductors.c:242:42:  [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.
{int i,T,W,u; llint P=0; QD A; QDpoly v; char STR[4][4]={"th","st","nd","rd"};
data/sympow-2.023.6/config/endiantuple.c:41:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char c[sizeof(long int)];
data/sympow-2.023.6/disk.c:13:16:  [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.
{int i,j,k,AB; char INPUT[64],BLAH[64]; QD **P,*Q; if (!GLOBAL) return;
data/sympow-2.023.6/disk.c:26:21:  [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.
{FILE *F; int ms=0; char TOK[16]=",",LINE[64],S[16],*STR,U[16]; int SROUND=FALSE;
data/sympow-2.023.6/disk.c:37:29:  [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).
   STEP_SIZE[which]=QD_2pow(atoi(strtok(NULL,TOK))); \
data/sympow-2.023.6/disk.c:38:7:  [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).
   ms=atoi(strtok(NULL,TOK)); CHEAT=FALSE; break;} \
data/sympow-2.023.6/disk.c:42:29:  [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).
   STEP_SIZE[which]=QD_2pow(atoi(strtok(NULL,TOK))); \
data/sympow-2.023.6/disk.c:43:7:  [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).
   ms=atoi(strtok(NULL,TOK)); CHEAT=TRUE; break;}
data/sympow-2.023.6/disk.c:65:4:  [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(paramdatafile,"r");
data/sympow-2.023.6/disk.c:68: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 HYPERINDEX[64]; int OFFSET=0;
data/sympow-2.023.6/disk.c:70: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.
   OFFSET=sprintf(HYPERINDEX,"%i",(HECKE)?ep:sp);
data/sympow-2.023.6/disk.c:71: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.
   if ((sp&1) || HECKE)   OFFSET+=sprintf(HYPERINDEX+OFFSET,"d%i",dv);
data/sympow-2.023.6/disk.c:98: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.
{FILE *A,*N; char NM[32],NAME[32]="/P";
data/sympow-2.023.6/disk.c:122:4:  [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).
 A=fopen(bindatafiletemplate,"r");
data/sympow-2.023.6/disk.c:124:54:  [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).
 {/*sprintf(txtdatafiletemplate,"%s%s",edfd,NM);*/ N=fopen(txtdatafiletemplate,"r");
data/sympow-2.023.6/disk.c:127: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).
  A=fopen(bindatafiletemplate,"r"); fclose(N);}
data/sympow-2.023.6/disk.c:132:4:  [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).
 A=fopen(txtdatafiletemplate,"r"); read_file_series(A,which); fclose(A);}
data/sympow-2.023.6/disk.c:135: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.
{FILE *A,*N; char NM[32],NAME[32]="/H";
data/sympow-2.023.6/disk.c:155:4:  [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).
 A=fopen(bindatafiletemplate,"r");
data/sympow-2.023.6/disk.c:157:54:  [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).
 {/*sprintf(txtdatafiletemplate,"%s%s",edfd,NM);*/ N=fopen(txtdatafiletemplate,"r");
data/sympow-2.023.6/disk.c:160: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).
  A=fopen(bindatafiletemplate,"r"); fclose(N);}
data/sympow-2.023.6/disk.c:165:4:  [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).
 A=fopen(txtdatafiletemplate,"r"); read_file_series(A,which); fclose(A);}
data/sympow-2.023.6/generate.c:7: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 Mtxt1[16],Stxt1[16],Mtxt2[16],Stxt2[16],Mbin1[16],Mbin2[16];
data/sympow-2.023.6/generate.c:12: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 TOK[8]=" "; char *INP;
data/sympow-2.023.6/generate.c:17:27:  [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).
 INP=strtok(NULL,TOK); sp=atoi(INP);
data/sympow-2.023.6/generate.c:24: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).
  INP=strtok(NULL,TOK); dv=atoi(INP);
data/sympow-2.023.6/generate.c:46: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.
{int i; char F3[1024];
data/sympow-2.023.6/generate.c:51: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(F1,"F(k)=J(k-%i,X)*sinv(k,X)^%i/%i!",sp,dv+1,sp-1); return;}
data/sympow-2.023.6/generate.c:54: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(F1,"F(k)=");
data/sympow-2.023.6/generate.c:56: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(F3,"J(k-%i,X)/%i!*",i,i-1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:57: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(F3,"sinv(k,X)^%i",dv+1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:59: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(F1,"F(k)=if(k%2==0,");
data/sympow-2.023.6/generate.c:61: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(F3,"J(k-%i,X)/%i!*",i,i-1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:62:3:  [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(F1,"J(k/2-1,X/2)*sinv(k,X),sqrt(Pi)/2*");
data/sympow-2.023.6/generate.c:64: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(F3,"J(k-%i,X)/%i!*",i,i-1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:65:3:  [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(F1,"1/J((k-1)/2,X/2)*two1ms(k,X)*sinv(k,X))");
data/sympow-2.023.6/generate.c:66: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(F2,"F(k)=if(k%2==1,");
data/sympow-2.023.6/generate.c:68: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(F3,"J(k-%i,X)/%i!*",i,i); strcat(F2,F3);}
data/sympow-2.023.6/generate.c:69:3:  [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(F2,"J((k-1)/2,X/2)*sinv(k,X),sqrt(Pi)/2*");
data/sympow-2.023.6/generate.c:71: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(F3,"J(k-%i,X)/%i!*",i,i); strcat(F2,F3);}
data/sympow-2.023.6/generate.c:72:3:  [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(F2,"J(k-1,X)/J(k/2-1,X/2)*two1ms(k,X)*sinv(k,X))");}
data/sympow-2.023.6/generate.c:74: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(F1,"F(k)=if(k%2==1,");
data/sympow-2.023.6/generate.c: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(F3,"J(k-%i,X)/%i!*",i,i-1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:77:3:  [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(F1,"J((k-1)/2,X/2)*sinv(k,X)/sqrt(Pi),1/2*");
data/sympow-2.023.6/generate.c:79: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(F3,"J(k-%i,X)/%i!*",i,i-1); strcat(F1,F3);}
data/sympow-2.023.6/generate.c:80:3:  [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(F1,"1/J(k/2-1,X/2)*two1ms(k,X)*sinv(k,X))");
data/sympow-2.023.6/generate.c:81: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(F2,"F(k)=if(k%2==0,");
data/sympow-2.023.6/generate.c:83: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(F3,"J(k-%i,X)/%i!*",i,i); strcat(F2,F3);}
data/sympow-2.023.6/generate.c:84:3:  [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(F2,"J(k/2,X/2)*sinv(k,X)/sqrt(Pi),");
data/sympow-2.023.6/generate.c:86: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(F3,"J(k-%i,X)/%i!*",i,i); strcat(F2,F3);}
data/sympow-2.023.6/generate.c:87:3:  [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(F2,"J(k,X)/J((k-1)/2,X/2)*two1ms(k,X)*sinv(k,X))");
data/sympow-2.023.6/generate.c:88:11:  [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.
  if (CM) strcat(F1,"*(X-k+1)*(X-k)"); if (CM) strcat(F2,"*(X-k)*(X-k-1)");}}
data/sympow-2.023.6/generate.c:88:48:  [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.
  if (CM) strcat(F1,"*(X-k+1)*(X-k)"); if (CM) strcat(F2,"*(X-k)*(X-k-1)");}}
data/sympow-2.023.6/generate.c:176:11:  [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.
{FILE *F; char PARAM[1024][64]; int j,i=0; char a0,a1,a2,a3;
data/sympow-2.023.6/generate.c:178:4:  [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(paramdatafile,"r");
data/sympow-2.023.6/generate.c:189:4:  [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(paramdatafile,"w");
data/sympow-2.023.6/generate.c:193:37:  [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.
{int mesh_number,LPT_number,QD_num; char INPUT[64],BLAH[64];
data/sympow-2.023.6/generate.c:206:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
 fd=open(B,(O_WRONLY|O_CREAT),mode); write(fd,P,size); close(fd);
data/sympow-2.023.6/generate.c:213: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 ARGS[128]="",W[128]="";
data/sympow-2.023.6/generate.c:219:26:  [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.
 if (S[i]=='h') {h=TRUE; strcpy(W,"Hecke");}
data/sympow-2.023.6/generate.c:220:26:  [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.
 if (S[i]=='c') {c=TRUE; strcpy(W,"CM");}
data/sympow-2.023.6/generate.c:228: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.
 if (h) sprintf(ARGS,"-hecke -sp %i -dv %i",sp,dv);
data/sympow-2.023.6/generate.c:229:14:  [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 (c) sprintf(ARGS,"-cm -sp %i",sp);
data/sympow-2.023.6/generate.c:230: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.
 else if (sp&1) sprintf(ARGS,"-sp %i -dv %i",sp,dv);
data/sympow-2.023.6/generate.c:231:7:  [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(ARGS,"-sp %i",sp);
data/sympow-2.023.6/init_curve.c:207: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 I[256],J[96],K[256]; int wh; llint sn; QD R,T,U;
data/sympow-2.023.6/init_curve.c:209:33:  [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).
 sscanf(S,"%s %s %s",J,I,K); wh=atoi(I); sn=atoll(K);
data/sympow-2.023.6/init_curve.c:235: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 I[256],J[96]; int cm; if (DEBUG) printf("cm_curve tw:%i %s",tw,S);
data/sympow-2.023.6/init_curve.c:236: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).
 sscanf(S,"%s %s",J,I); cm=atoi(I); if (cm<0) cm=-cm;
data/sympow-2.023.6/init_curve.c:260: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 N[8],T[1024]; int u; sscanf(S,"%s %s",N,T); u=atoi(T);
data/sympow-2.023.6/init_curve.c:260:53:  [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).
{char N[8],T[1024]; int u; sscanf(S,"%s %s",N,T); u=atoi(T);
data/sympow-2.023.6/main.c:176: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).
 	fd=open(paramdatafile,(O_WRONLY|O_CREAT|O_TRUNC),datamode);
data/sympow-2.023.6/main.c:179:68:  [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).
   asprintf(&pkgparamdatafile,"%s/param_data",pkgdatafilesdir); df=open(pkgparamdatafile,O_RDONLY);
data/sympow-2.023.6/main.c:180:15:  [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 (-1<df) {char PARAM[PARAMSIZE]; ssize_t nread=0;
data/sympow-2.023.6/main.c:216: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 INSTRING[1024]="2w3s1p32,3bp16d1,4p8\0",CSTR[1024]="\0",LSTR[1024]="\0";
data/sympow-2.023.6/main.c:217: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 TYPE[128]; int i=1; llint NT,UB=(((llint) 1)<<45);
data/sympow-2.023.6/main.c:250:48:  [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).
  else if (!strcmp(argv[i],"-sloppy")) {SLOPPY=atoi(argv[i+1]); i+=2;}
data/sympow-2.023.6/main.c:251:48:  [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).
  else if (!strcmp(argv[i],"-rootno")) {ROOTNO=atoi(argv[i+1]); i+=2;}
data/sympow-2.023.6/main.c:258:34:  [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).
  { PROCNAME_PREPOSTPARE(txt2bin(atoi(argv[i+1]),argv[i+2],stdin,datamode)) return 0;}
data/sympow-2.023.6/prepare.c:101:20:  [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.
{llint NT=0,nt,CP; char LAST[256],*NEXT,*CURR,*c,*n,COMMA[2]=",\0";
data/sympow-2.023.6/sympow.h:100: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.
extern const char *VERBOSE2option[3];
data/sympow-2.023.6/util.c:4:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *VERBOSE2option[3]={"-quiet","-terse","-verbose"};
data/sympow-2.023.6/QD.c:284: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).
{char S[128]; int e,u; e=QD_outputi(n,d,a,S); u=strlen(S); S[u++]='E';
data/sympow-2.023.6/disk.c:72:35:  [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.
   if ((HECKE) && (sp>1)) OFFSET+=sprintf(HYPERINDEX+OFFSET,"h");
data/sympow-2.023.6/disk.c:73:35:  [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.
   if ((CM_CASE) && ((sp&3)==0))  sprintf(HYPERINDEX+OFFSET,"c");
data/sympow-2.023.6/generate.c:91:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
{int i,j,k,l=strlen(STR); if (DEBUG) printf("assure_line %s\n",STR);
data/sympow-2.023.6/generate.c:205:7:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
 mask=umask(0);
data/sympow-2.023.6/generate.c:207:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
 umask(mask);
data/sympow-2.023.6/init_curve.c:267:61:  [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[0]=='t') {tw=get_twist(T); sscanf(T+3,"%s",U); T+=(4+strlen(U));}
data/sympow-2.023.6/main.c:75:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
 {const size_t lenghtof_ename=strlen(ename);
data/sympow-2.023.6/main.c:94: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).
  const char *eofn=name+strlen(name);
data/sympow-2.023.6/main.c:122:53:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	 if (1<flag) {int os=ownership(infod); mode_t mask=umask(ownership2mask[os]);
data/sympow-2.023.6/main.c:125:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(mask);}
data/sympow-2.023.6/main.c:137:53:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
 if (stat(pkgdatafilesbindir,&infodb)) {mode_t mask=umask(0);
data/sympow-2.023.6/main.c:143:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask);}
data/sympow-2.023.6/main.c:160:27:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	int os=ownership(infod); umask(ownership2mask[os]);
data/sympow-2.023.6/main.c:173:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
 umask(MASK);
data/sympow-2.023.6/main.c:181:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  while (0<(nread=read(df,PARAM,PARAMSIZE)))
data/sympow-2.023.6/main.c:201: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).
  ((pkgdatafilesdir) && (strlen(datafilesdir) < strlen(pkgdatafilesdir)))?pkgdatafilesdir:datafilesdir);
data/sympow-2.023.6/main.c:201: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).
  ((pkgdatafilesdir) && (strlen(datafilesdir) < strlen(pkgdatafilesdir)))?pkgdatafilesdir:datafilesdir);
data/sympow-2.023.6/main.c:203:4:  [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(datafilesbindir) < strlen(pkgdatafilesbindir))?pkgdatafilesbindir:datafilesbindir);
data/sympow-2.023.6/main.c:203: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).
 	(strlen(datafilesbindir) < strlen(pkgdatafilesbindir))?pkgdatafilesbindir:datafilesbindir);

ANALYSIS SUMMARY:

Hits = 174
Lines analyzed = 4337 in approximately 0.29 seconds (14817 lines/second)
Physical Source Lines of Code (SLOC) = 3870
Hits@level = [0] 405 [1]  20 [2]  90 [3]   5 [4]  53 [5]   6
Hits@level+ = [0+] 579 [1+] 174 [2+] 154 [3+]  64 [4+]  59 [5+]   6
Hits/KSLOC@level+ = [0+] 149.612 [1+] 44.9612 [2+] 39.7933 [3+] 16.5375 [4+] 15.2455 [5+] 1.55039
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.