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/c2x-2.34d/qe_read.c
Examining data/c2x-2.34d/abinit_read.c
Examining data/c2x-2.34d/xplor_write.c
Examining data/c2x-2.34d/vasp_read.c
Examining data/c2x-2.34d/ksym.c
Examining data/c2x-2.34d/xsf_read.c
Examining data/c2x-2.34d/cell_read.c
Examining data/c2x-2.34d/qe_xml_read.c
Examining data/c2x-2.34d/parse.c
Examining data/c2x-2.34d/c2x2spg.c
Examining data/c2x-2.34d/cif_read.c
Examining data/c2x-2.34d/pdb_read.c
Examining data/c2x-2.34d/fdf_read.c
Examining data/c2x-2.34d/basis.c
Examining data/c2x-2.34d/bands_read.c
Examining data/c2x-2.34d/py_write.c
Examining data/c2x-2.34d/xc.c
Examining data/c2x-2.34d/gpfa.c
Examining data/c2x-2.34d/molecule_fix.c
Examining data/c2x-2.34d/potential.c
Examining data/c2x-2.34d/test_parser.c
Examining data/c2x-2.34d/elk_write.c
Examining data/c2x-2.34d/wavecar_write.c
Examining data/c2x-2.34d/gcoeff_write.c
Examining data/c2x-2.34d/print_cell.c
Examining data/c2x-2.34d/dipole.c
Examining data/c2x-2.34d/cell_write.c
Examining data/c2x-2.34d/check_read.c
Examining data/c2x-2.34d/check2xsf.c
Examining data/c2x-2.34d/esp_read.c
Examining data/c2x-2.34d/cml_write.c
Examining data/c2x-2.34d/crystal_read.c
Examining data/c2x-2.34d/line_write.c
Examining data/c2x-2.34d/xyz_read.c
Examining data/c2x-2.34d/band_process.c
Examining data/c2x-2.34d/xyz_write.c
Examining data/c2x-2.34d/cube_write.c
Examining data/c2x-2.34d/shelx_write.c
Examining data/c2x-2.34d/tube.c
Examining data/c2x-2.34d/interpolate.c
Examining data/c2x-2.34d/rho_read.c
Examining data/c2x-2.34d/bands_write.c
Examining data/c2x-2.34d/ccp4_write.c
Examining data/c2x-2.34d/fort34_read.c
Examining data/c2x-2.34d/dx_write.c
Examining data/c2x-2.34d/parity.c
Examining data/c2x-2.34d/dict.c
Examining data/c2x-2.34d/sort_atoms.c
Examining data/c2x-2.34d/denfmt_write.c
Examining data/c2x-2.34d/c2xsf.h
Examining data/c2x-2.34d/fdf_write.c
Examining data/c2x-2.34d/gcoeff_read.c
Examining data/c2x-2.34d/shelx_read.c
Examining data/c2x-2.34d/charge.c
Examining data/c2x-2.34d/geom_read.c
Examining data/c2x-2.34d/abinit_write.c
Examining data/c2x-2.34d/xv_read.c
Examining data/c2x-2.34d/bxsf_write.c
Examining data/c2x-2.34d/xsf_write.c
Examining data/c2x-2.34d/fbin_write.c
Examining data/c2x-2.34d/elk_read.c
Examining data/c2x-2.34d/qe_psi_read.c
Examining data/c2x-2.34d/geom_write.c
Examining data/c2x-2.34d/ident_sym.c
Examining data/c2x-2.34d/qe_rho_read.c
Examining data/c2x-2.34d/abinit_in_read.c
Examining data/c2x-2.34d/rotate.c
Examining data/c2x-2.34d/f15.c
Examining data/c2x-2.34d/primitive.c
Examining data/c2x-2.34d/chdiff_read.c
Examining data/c2x-2.34d/cif_write.c
Examining data/c2x-2.34d/pdb_write.c
Examining data/c2x-2.34d/super.c
Examining data/c2x-2.34d/cube_read.c
Examining data/c2x-2.34d/denfmt_read.c
Examining data/c2x-2.34d/qe_write.c
Examining data/c2x-2.34d/vasp_write.c
Examining data/c2x-2.34d/periodic_table.c

FINAL RESULTS:

data/c2x-2.34d/abinit_write.c:55:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(outfile,fmt,acell[0]/BOHR,
data/c2x-2.34d/abinit_write.c:64:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt,
data/c2x-2.34d/abinit_write.c:97:22:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    for(j=0;j<3;j++) fprintf(outfile,fmt,m->atoms[i].frac[j]);
data/c2x-2.34d/abinit_write.c:146:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt,akpt_disp[0],akpt_disp[1],akpt_disp[2]);
data/c2x-2.34d/abinit_write.c:157:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,k->kpts[i].frac[0],
data/c2x-2.34d/abinit_write.c:165:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,k->kpts[i].wt);
data/c2x-2.34d/cell_read.c:260:17:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                strcpy(m->atoms[i].label,labels[j].l);
data/c2x-2.34d/cell_read.c:295:15:  [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(m->atoms[i].label,ptr2);
data/c2x-2.34d/cell_read.c:422:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(m->block_species+sblock_size,buffer);
data/c2x-2.34d/cell_read.c:452:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(m->species_misc+smisc_size,ptr);
data/c2x-2.34d/cell_read.c:465:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(m->species_misc+smisc_size,buffer);
data/c2x-2.34d/cell_write.c:86:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,
data/c2x-2.34d/cell_write.c:92:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,
data/c2x-2.34d/cell_write.c:109:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt,
data/c2x-2.34d/cell_write.c:114:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt,
data/c2x-2.34d/cell_write.c:150:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,
data/c2x-2.34d/cell_write.c:154:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt2,
data/c2x-2.34d/cell_write.c:158:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,
data/c2x-2.34d/cell_write.c:188:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,
data/c2x-2.34d/cell_write.c:192:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt2,
data/c2x-2.34d/cell_write.c:196:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,
data/c2x-2.34d/cell_write.c:314:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(outfile,fmt1,s->ops[i].mat[j][0],
data/c2x-2.34d/cell_write.c:322:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(outfile,fmt1,v[0],v[1],v[2]);
data/c2x-2.34d/cell_write.c:325:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(outfile,fmt1,0.0,0.0,0.0);
data/c2x-2.34d/cell_write.c:352:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt3,v[0],v[1],v[2]);
data/c2x-2.34d/cell_write.c:357:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt2,k->kpts[i].frac[0],
data/c2x-2.34d/check2xsf.c:596:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(line_spec,optp+2);
data/c2x-2.34d/check2xsf.c:770:13:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcpy(pt_spec,optp+2);
data/c2x-2.34d/check2xsf.c:831: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(cptr,file1);
data/c2x-2.34d/check2xsf.c:978:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(cdfile,file1);
data/c2x-2.34d/check2xsf.c:996:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(cdfile,file1);
data/c2x-2.34d/check2xsf.c:1018:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(cdfile,file1);
data/c2x-2.34d/check2xsf.c:1799: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(c->txt,txt);
data/c2x-2.34d/cif_read.c:87:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(m->title,buff+strlen("_struct_title")+1);
data/c2x-2.34d/cif_read.c:380:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(sym_as_xyz[s->n],buff+f[fsym_as_xyz]);
data/c2x-2.34d/cube_read.c:43:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(m->title,buffer);
data/c2x-2.34d/cube_write.c:74:20:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  for(i=0;i<3;i++) fprintf(outfile,fmt1,g->size[i],
data/c2x-2.34d/cube_write.c:84:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt2,m->atoms[i].atno,m->atoms[i].chg,x,y,z);
data/c2x-2.34d/cube_write.c:95:11:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
          fprintf(outfile,fmt3,(*(dptr1+i))*BOHR*BOHR*BOHR);
data/c2x-2.34d/cube_write.c:98:11:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
          fprintf(outfile,fmt3,*(dptr1+i));
data/c2x-2.34d/denfmt_write.c:116:11:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
          fprintf(outfile,fmt,gptr->data[offset]*c->vol);
data/c2x-2.34d/dict.c:42: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(dict->key,key);
data/c2x-2.34d/dict.c:58:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(p,value);
data/c2x-2.34d/dict.c:76:3:  [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(dict->value,value);
data/c2x-2.34d/elk_read.c:198:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(filename,dict_get(m->dict,"in_dir"));
data/c2x-2.34d/elk_read.c:284: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(filename,ptr);
data/c2x-2.34d/elk_write.c:47:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt,
data/c2x-2.34d/elk_write.c:84:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(outfile,fmt,m->atoms[j].frac[0],
data/c2x-2.34d/elk_write.c:107:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt,akpt_disp[0],akpt_disp[1],akpt_disp[2]);
data/c2x-2.34d/fdf_read.c:110:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(m->title,ptr);
data/c2x-2.34d/fdf_read.c:169:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(ptr2,ptr);
data/c2x-2.34d/fdf_read.c:541:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(name,dir);
data/c2x-2.34d/fdf_read.c:542: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(name,ptr);
data/c2x-2.34d/fdf_read.c:550:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(fs->name,ptr);
data/c2x-2.34d/fdf_read.c:724: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(name,prefix);
data/c2x-2.34d/fdf_read.c:725:3:  [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(name,label);
data/c2x-2.34d/fdf_write.c:154:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt,
data/c2x-2.34d/fdf_write.c:188:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,
data/c2x-2.34d/fdf_write.c:194:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,
data/c2x-2.34d/fdf_write.c:236: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(filename,oldname);
data/c2x-2.34d/line_write.c:251:22:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    for(i=0;i<n;i++) fprintf(outfile,fmt,i*len/(n-1),points[i]);
data/c2x-2.34d/print_cell.c:16:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(stderr,fmt,basis[i][0],basis[i][1],basis[i][2],
data/c2x-2.34d/print_cell.c:39:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(stderr,fmt,'a'+i,abc[i]);
data/c2x-2.34d/print_cell.c:44:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(stderr,fmt,abc[3],abc[4],abc[5]);
data/c2x-2.34d/print_cell.c:53:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(stderr,fmt,atno2sym(m->atoms[i].atno),m->atoms[i].frac[0],
data/c2x-2.34d/py_write.c:59:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(outfile,fmt1,
data/c2x-2.34d/py_write.c:76:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt2,m->atoms[i].frac[0],
data/c2x-2.34d/py_write.c:79:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(outfile,fmt3,m->atoms[i].frac[0],
data/c2x-2.34d/qe_psi_read.c:92:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(file,"%s/wfc%s%d.dat",dir,sspin,k2);
data/c2x-2.34d/qe_psi_read.c:97:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(file,"%s/%s.save/wfc%s%d.dat",dir,prefix,sspin,k2);
data/c2x-2.34d/qe_read.c:454:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	  strcat(p2,ptr);
data/c2x-2.34d/qe_write.c:180:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,
data/c2x-2.34d/qe_write.c:186:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,
data/c2x-2.34d/qe_write.c:231:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,m->atoms[i].frac[0],
data/c2x-2.34d/qe_write.c:234:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,m->atoms[i].abs[0]/BOHR,
data/c2x-2.34d/qe_write.c:237:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,m->atoms[i].abs[0],
data/c2x-2.34d/qe_write.c:310:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	  fprintf(outfile,fmt,k2->kpts[i].frac[0],
data/c2x-2.34d/qe_xml_read.c:433:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(species[i].name,cptr);
data/c2x-2.34d/qe_xml_read.c:661:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(cptr+tmp," %3s  %lf  %s\n",species[i].name,
data/c2x-2.34d/qe_xml_read.c:749:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(path,cwd);
data/c2x-2.34d/qe_xml_read.c:751:7:  [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(path,prefix);
data/c2x-2.34d/qe_xml_read.c:753:7:  [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(path,name);
data/c2x-2.34d/qe_xml_read.c:766:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(path,prefix);
data/c2x-2.34d/qe_xml_read.c:768: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(path,name);
data/c2x-2.34d/qe_xml_read.c:785:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(path,cwd);
data/c2x-2.34d/qe_xml_read.c:787:7:  [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(path,ptr);
data/c2x-2.34d/qe_xml_read.c:789:7:  [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(path,name);
data/c2x-2.34d/qe_xml_read.c:801:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(path,ptr);
data/c2x-2.34d/qe_xml_read.c:803: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(path,name);
data/c2x-2.34d/qe_xml_read.c:818:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(path,cwd);
data/c2x-2.34d/qe_xml_read.c:820: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(path,name);
data/c2x-2.34d/rho_read.c:224: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(name,filename);
data/c2x-2.34d/shelx_write.c:78:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(outfile,fmt1,
data/c2x-2.34d/shelx_write.c:86:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(cspec,atno2sym(atom_list[i]));
data/c2x-2.34d/shelx_write.c:101:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt2,atno2sym(m->atoms[i].atno),
data/c2x-2.34d/vasp_read.c:107:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(m->title,buffer);
data/c2x-2.34d/vasp_read.c:992:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(filename,dict_get(m->dict,"in_dir"));
data/c2x-2.34d/vasp_read.c:1013:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(filename,dict_get(m->dict,"in_dir"));
data/c2x-2.34d/vasp_write.c:46:20:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  for(i=0;i<3;i++) fprintf(outfile,fmt,
data/c2x-2.34d/vasp_write.c:85:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(outfile,fmt,m->atoms[j].frac[0],
data/c2x-2.34d/vasp_write.c:111:28:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        if (fabs(x)>1e-99) fprintf(outfile,fmt,x);
data/c2x-2.34d/vasp_write.c:112:14:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        else fprintf(outfile,fmt,0.0);
data/c2x-2.34d/vasp_write.c:147:28:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        if (fabs(x)>1e-99) fprintf(outfile,fmt,x);
data/c2x-2.34d/vasp_write.c:148:14:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        else fprintf(outfile,fmt,0.0);
data/c2x-2.34d/xsf_read.c:154:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	      strcpy(gptr->name,buffer+18);
data/c2x-2.34d/xsf_read.c:159:8:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	      strcpy(gptr->name,buffer+12);
data/c2x-2.34d/xsf_write.c:111:23:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    for(i=0;i<=2;i++) fprintf(outfile,fmt3f,c->basis[i][0],
data/c2x-2.34d/xsf_write.c:114:23:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    for(i=0;i<=2;i++) fprintf(outfile,fmt3f,c->basis[i][0],
data/c2x-2.34d/xsf_write.c:129:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmtd6f,m->atoms[i].atno,x,y,z,
data/c2x-2.34d/xsf_write.c:132:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmtd3f,m->atoms[i].atno,x,y,z);
data/c2x-2.34d/xsf_write.c:145:24:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      for(i=0;i<3;i++) fprintf(outfile,fmt3f,c->basis[i][0],
data/c2x-2.34d/xsf_write.c:164:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf(outfile,fmtf,
data/c2x-2.34d/xyz_write.c:78:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt,
data/c2x-2.34d/xyz_write.c:87:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(outfile,fmt,"",c->basis[i][0],c->basis[i][1],c->basis[i][2]);
data/c2x-2.34d/xyz_write.c:90:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(outfile,fmt,"",0.0,0.0,0.0);
data/c2x-2.34d/qe_xml_read.c:780:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  ptr=getenv("PSEUDO_DIR");
data/c2x-2.34d/abinit_in_read.c:58:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[LINE_SIZE+1];
data/c2x-2.34d/abinit_in_read.c:766: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(s,p1,p2-p1);
data/c2x-2.34d/abinit_read.c:59: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 version[9];
data/c2x-2.34d/band_process.c:270: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 cbuff[CBUFF+1];
data/c2x-2.34d/band_process.c:302: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.
      sprintf(g->name,"band_vs%d_k%d_b%d",nspr,k,b);
data/c2x-2.34d/band_process.c:304: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.
      sprintf(g->name,"band_s%d_k%d_b%d",ns,k,b);
data/c2x-2.34d/band_process.c:306: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.
      sprintf(g->name,"band_k%d_b%d",k,b);
data/c2x-2.34d/band_process.c:324: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.
      sprintf(g->name,"bands"); /* Don't move to a new grid */
data/c2x-2.34d/bands_read.c:23: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 buffer[LINE_SIZE+1],*cptr,*newfile;
data/c2x-2.34d/bands_read.c:164: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).
      f=fopen(newfile,"r");
data/c2x-2.34d/bands_read.c:189: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 buffer[LINE_SIZE+1],*cptr,*newfile;
data/c2x-2.34d/bands_read.c:239:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        f=fopen(newfile,"r");
data/c2x-2.34d/bands_read.c:249: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).
            f=fopen(newfile,"r");
data/c2x-2.34d/c2x2spg.c:100: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(m2,m,sizeof(struct contents));
data/c2x-2.34d/c2x2spg.c:103: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(m2->atoms,m->atoms,m2->n*sizeof(struct atom));
data/c2x-2.34d/c2x2spg.c:106: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(c2,c,sizeof(struct unit_cell));
data/c2x-2.34d/c2x2spg.c:109: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(c2->basis,c->basis,9*sizeof(double));
data/c2x-2.34d/c2x2spg.c:698: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(tmp_pos,spg_pos,3*natoms*sizeof(double));
data/c2x-2.34d/c2x2spg.c:699: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(tmp_type,spg_type,natoms*sizeof(int));
data/c2x-2.34d/c2x2spg.c:714:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(tmp_pos,spg_pos,3*natoms*sizeof(double));
data/c2x-2.34d/c2x2spg.c:715:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(tmp_type,spg_type,natoms*sizeof(int));
data/c2x-2.34d/c2x2spg.c:766: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(tmp_pos,spg_pos,3*natoms*sizeof(double));
data/c2x-2.34d/c2x2spg.c:767: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(tmp_type,spg_type,natoms*sizeof(int));
data/c2x-2.34d/cell_read.c:80: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 sym[14],*ptr2;
data/c2x-2.34d/cell_read.c:81: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/cell_read.c:447:7:  [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(m->species_misc+smisc_size,"%block ");
data/c2x-2.34d/check2xsf.c:79: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.
void lscan(char **p, struct contents *m, double x[3]);
data/c2x-2.34d/check2xsf.c:824: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).
  infile=fopen(file1,"rb");
data/c2x-2.34d/check2xsf.c:844: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).
    outfile=fopen(file2,"wb");
data/c2x-2.34d/check2xsf.c:982:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(cptr+1,"chdiff");
data/c2x-2.34d/check2xsf.c:983:12:  [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).
    infile=fopen(cdfile,"rb");
data/c2x-2.34d/check2xsf.c:1000:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(cptr+1,"cst_esp");
data/c2x-2.34d/check2xsf.c:1001:12:  [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).
    infile=fopen(cdfile,"rb");
data/c2x-2.34d/check2xsf.c:1022:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(cptr+1,"cell");
data/c2x-2.34d/check2xsf.c:1023:12:  [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).
    infile=fopen(cdfile,"rb");
data/c2x-2.34d/check_read.c:91: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 head[HEAD_LEN+1];
data/c2x-2.34d/check_read.c:92: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 cbuff[CBUFF+1];
data/c2x-2.34d/check_read.c:110: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 dipole_correction[21];
data/c2x-2.34d/check_read.c:464:15:  [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(cbuff,"Wavefunction weighted by ");
data/c2x-2.34d/check_read.c:466:17:  [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(cbuff,"kpt weight");
data/c2x-2.34d/check_read.c:467:39:  [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 (flags&OCC_WEIGHT) strcat(cbuff," and ");
data/c2x-2.34d/check_read.c:469:37:  [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 (flags&OCC_WEIGHT) strcat(cbuff," occupancy");
data/c2x-2.34d/check_read.c:493:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(fft,head,12);
data/c2x-2.34d/check_read.c:781:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(m->species_misc+smisc_size,"%block SPECIES POT\n");
data/c2x-2.34d/check_read.c:802:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(m->species_misc+smisc_size,"%endblock SPECIES_POT\n");
data/c2x-2.34d/cif_read.c:54: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 buffer[LINE_SIZE+1], *buff;
data/c2x-2.34d/cif_read.c:219: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 buffer[LINE_SIZE];
data/c2x-2.34d/cif_read.c:220: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 *p1,sym[4],*buff;
data/c2x-2.34d/cif_write.c:186: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(m2->atoms,m->atoms,m->n*sizeof(struct atom));
data/c2x-2.34d/crystal_read.c:40: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/cube_read.c:29: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/denfmt_read.c:33: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/elk_read.c:32:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[LINE_SIZE+1], *ptr, *p2;
data/c2x-2.34d/elk_read.c:171:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[LINE_SIZE+1],*filename,*ptr;
data/c2x-2.34d/elk_read.c:199:7:  [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(filename,"GEOMETRY.OUT");
data/c2x-2.34d/elk_read.c:204: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).
    f=fopen(filename,"r");
data/c2x-2.34d/esp_read.c:136:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(gptr->name,"ESP_s%d",ns);
data/c2x-2.34d/f15.c:30: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).
  fort15=fopen("fort.15","w");
data/c2x-2.34d/f15.c:72: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).
  fort14=fopen("fort.14","w");
data/c2x-2.34d/f15.c:106: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).
  fort4=fopen("fort.4","w");
data/c2x-2.34d/fdf_read.c:57: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/fdf_read.c:459:9:  [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(buffer,"%endblock\n");
data/c2x-2.34d/fdf_read.c:543:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fs->f=fopen(name,"r");
data/c2x-2.34d/fdf_read.c:547:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fs->f=fopen(ptr,"r");
data/c2x-2.34d/fdf_read.c:719: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/fdf_read.c:726: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(name,".psf");
data/c2x-2.34d/fdf_read.c:728: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).
  pseudo=fopen(name,"rb");
data/c2x-2.34d/fdf_write.c:246: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).
  bin=fopen(filename,"wb");
data/c2x-2.34d/fort34_read.c:29: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/gcoeff_read.c:21: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/gcoeff_write.c:33: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 *order,required_order[5];
data/c2x-2.34d/geom_read.c:14: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 buffer[LINE_SIZE+1],species[5],*cptr;
data/c2x-2.34d/geom_read.c:121: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(cf,ts->cells+(nsteps-1),sizeof(struct unit_cell));
data/c2x-2.34d/geom_read.c:124: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(cf->basis,ts->cells[nsteps-1].basis,9*sizeof(double));
data/c2x-2.34d/geom_read.c:131: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(mf->atoms,ts->m[nsteps-1].atoms,mf->n*sizeof(struct atom));
data/c2x-2.34d/ident_sym.c:95:29:  [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 void equiv_read_comp(char *str_in, double x[4]){
data/c2x-2.34d/ksym.c:95:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ks->ops+n,rs->ops+i,sizeof(struct sym_op));
data/c2x-2.34d/ksym.c:104:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&invert,rs->ops+i,sizeof(struct sym_op));
data/c2x-2.34d/ksym.c:506: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(s->ops+j-1,s->ops+j,sizeof(struct sym_op));
data/c2x-2.34d/line_write.c:46: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.
void lscan(char **p, struct contents *m, double x[3]){
data/c2x-2.34d/line_write.c:47: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 *ptr,sym[5];
data/c2x-2.34d/parse.c:93: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 s[81];
data/c2x-2.34d/pdb_read.c:35:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[LINE_SIZE+1],buff2[LINE_SIZE+1],*cptr,*cptr2;
data/c2x-2.34d/periodic_table.c:25: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 *table[P_MAX_EL+2]={"X","H","He",
data/c2x-2.34d/potential.c:160: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(g->name,"Potential_Volts");
data/c2x-2.34d/qe_psi_read.c:52:18:  [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.
void qe_psi_read(char *dir, char *prefix, struct unit_cell *c,
data/c2x-2.34d/qe_psi_read.c:52:29:  [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.
void qe_psi_read(char *dir, char *prefix, struct unit_cell *c,
data/c2x-2.34d/qe_psi_read.c:94: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).
      infile=fopen(file,"r");
data/c2x-2.34d/qe_psi_read.c:98:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  infile=fopen(file,"r");
data/c2x-2.34d/qe_read.c:119: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(*str,p1,p2-p1);
data/c2x-2.34d/qe_read.c:133: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 sym[4],*ptr,*p2,*p3;
data/c2x-2.34d/qe_read.c:900: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/qe_xml_read.c:26:18:  [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.
void qe_psi_read(char *dir, char *prefix, struct unit_cell *c,
data/c2x-2.34d/qe_xml_read.c:26:29:  [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.
void qe_psi_read(char *dir, char *prefix, struct unit_cell *c,
data/c2x-2.34d/qe_xml_read.c:40: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/qe_xml_read.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 key[6];
data/c2x-2.34d/qe_xml_read.c:259: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(key,"nk%1d=\"",i+1);
data/c2x-2.34d/qe_xml_read.c:269: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(key," k%1d=\"",i+1);  /* NB leading space */
data/c2x-2.34d/qe_xml_read.c:707: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(den_name,"charge-density.dat");
data/c2x-2.34d/qe_xml_read.c:708: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).
    ch=fopen(den_name,"r");
data/c2x-2.34d/qe_xml_read.c:717:2:  [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(den_name2,".save/charge-density.dat");
data/c2x-2.34d/qe_xml_read.c:718: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).
	ch=fopen(den_name2,"r");
data/c2x-2.34d/qe_xml_read.c:755: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).
      p=fopen(path,"r");
data/c2x-2.34d/qe_xml_read.c:770: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).
    p=fopen(path,"r");
data/c2x-2.34d/qe_xml_read.c:791: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).
      p=fopen(path,"r");
data/c2x-2.34d/qe_xml_read.c:806: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).
    p=fopen(path,"r");
data/c2x-2.34d/qe_xml_read.c:822: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).
    p=fopen(path,"r");
data/c2x-2.34d/qe_xml_read.c:832: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).
  p=fopen(name,"r");
data/c2x-2.34d/qe_xml_read.c:842: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 buffer[LINE_SIZE+1],*ptr;
data/c2x-2.34d/qe_xml_read.c:987: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 *cptr,key[6];
data/c2x-2.34d/qe_xml_read.c:988: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/qe_xml_read.c:993:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(key,"<a%1d>",i+1);
data/c2x-2.34d/qe_xml_read.c:1014: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/rho_read.c:233: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).
  coords=fopen(name,"rb");
data/c2x-2.34d/rho_read.c:244: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).
  coords=fopen(name,"rb");
data/c2x-2.34d/rho_read.c:254:12:  [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).
    coords=fopen(name,"rb");
data/c2x-2.34d/shelx_read.c:43: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 buffer[LINE_SIZE+1],*cptr,*cptr2;
data/c2x-2.34d/shelx_write.c:36: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 cspec[4];
data/c2x-2.34d/vasp_read.c:79: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 buffer[LINE_SIZE+1], *ptr,*p2;
data/c2x-2.34d/vasp_read.c:262:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  f=fopen(p2,"r");
data/c2x-2.34d/vasp_read.c:286:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  f=fopen(p2,"r");
data/c2x-2.34d/vasp_read.c:378:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  f=fopen(p2,"r");
data/c2x-2.34d/vasp_read.c:496: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 *ptr,buffer[LINE_SIZE];
data/c2x-2.34d/vasp_read.c:639: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).
      f=fopen(newfile,"r");
data/c2x-2.34d/vasp_read.c:871: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/vasp_read.c:914: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 buffer[LINE_SIZE+1];
data/c2x-2.34d/vasp_read.c:993:7:  [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(filename,"POSCAR");
data/c2x-2.34d/vasp_read.c:998: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).
    f=fopen(filename,"r");
data/c2x-2.34d/vasp_read.c:1014:7:  [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(filename,"DOSCAR");
data/c2x-2.34d/vasp_read.c:1019: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).
    f=fopen(filename,"r");
data/c2x-2.34d/vasp_read.c:1046: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 buffer[LINE_SIZE+1],*p;
data/c2x-2.34d/xsf_read.c:35:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[LINE_SIZE+1];
data/c2x-2.34d/xsf_read.c:281: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 buffer[LINE_SIZE+1],sym[4];
data/c2x-2.34d/xv_read.c:35:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[LINE_SIZE+1];
data/c2x-2.34d/xyz_read.c:31: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 buffer[LINE_SIZE+1],*ptr,*ptr2;
data/c2x-2.34d/cell_read.c:252:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if((!strncasecmp(buffer,labels[j].l,strlen(labels[j].l)))&&
data/c2x-2.34d/cell_read.c:253:24:  [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).
               (buffer[strlen(labels[j].l)]==' ')){
data/c2x-2.34d/cell_read.c:258:42:  [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).
                m->atoms[i].label=malloc(strlen(labels[j].l)+1);
data/c2x-2.34d/cell_read.c:287:20:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
          else if (sscanf(buffer,"%12s%n",sym,&n)>=1){
data/c2x-2.34d/cell_read.c:294:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              m->atoms[i].label=malloc(strlen(ptr2)+1);
data/c2x-2.34d/cell_read.c:420:63:  [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).
        m->block_species=realloc(m->block_species,sblock_size+strlen(buffer)+2);
data/c2x-2.34d/cell_read.c:423:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        sblock_size+=strlen(buffer);
data/c2x-2.34d/cell_read.c:424:9:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
        strcpy(m->block_species+sblock_size,"\n");
data/c2x-2.34d/cell_read.c:445:58:  [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).
      m->species_misc=realloc(m->species_misc,smisc_size+strlen("%block ")+1);
data/c2x-2.34d/cell_read.c:448:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      smisc_size+=strlen("%block ");
data/c2x-2.34d/cell_read.c:450:58:  [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).
      m->species_misc=realloc(m->species_misc,smisc_size+strlen(ptr)+2);
data/c2x-2.34d/cell_read.c:453:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      smisc_size+=strlen(ptr);
data/c2x-2.34d/cell_read.c:454:7:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
      strcpy(m->species_misc+smisc_size,"\n");
data/c2x-2.34d/cell_read.c:463:60:  [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).
        m->species_misc=realloc(m->species_misc,smisc_size+strlen(buffer)+1);
data/c2x-2.34d/cell_read.c:466:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        smisc_size+=strlen(buffer);
data/c2x-2.34d/cell_read.c:470:7:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
      strcpy(m->species_misc+smisc_size,"\n");
data/c2x-2.34d/cell_read.c:525: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).
    ptr=buffer+strlen(buffer)-1;
data/c2x-2.34d/cell_read.c:539:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(*title,ptr,p2-ptr);
data/c2x-2.34d/check2xsf.c:314: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(argv[0])>=7)&&
data/c2x-2.34d/check2xsf.c:315:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      (!strcmp("cellsym",&argv[0][strlen(argv[0])-7]))) format=CELL;
data/c2x-2.34d/check2xsf.c:594: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).
            line_spec=malloc(strlen(optp+2)+1);
data/c2x-2.34d/check2xsf.c:768:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    pt_spec=malloc(strlen(optp+2)+1);
data/c2x-2.34d/check2xsf.c:829:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  cptr=malloc(strlen(file1)+1);
data/c2x-2.34d/check2xsf.c:838:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(cptr,file1,i);
data/c2x-2.34d/check2xsf.c:854:5:  [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).
  i=strlen(file1);
data/c2x-2.34d/check2xsf.c:965:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    i=fgetc(infile);
data/c2x-2.34d/check2xsf.c:976:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    cdfile=malloc(strlen(file1)+8);
data/c2x-2.34d/check2xsf.c:979: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).
    cptr=cdfile+strlen(cdfile);
data/c2x-2.34d/check2xsf.c:994:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    cdfile=malloc(strlen(file1)+9);
data/c2x-2.34d/check2xsf.c:997: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).
    cptr=cdfile+strlen(cdfile);
data/c2x-2.34d/check2xsf.c:1012:5:  [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).
  i=strlen(file1);
data/c2x-2.34d/check2xsf.c:1019: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).
    cptr=cdfile+strlen(cdfile);
data/c2x-2.34d/check2xsf.c:1797: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).
  c->txt=malloc(strlen(txt)+1);
data/c2x-2.34d/check2xsf.c:1800: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).
  if (c->txt[strlen(c->txt)-1]=='\n') c->txt[strlen(c->txt)-1]=0;
data/c2x-2.34d/check2xsf.c:1800:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (c->txt[strlen(c->txt)-1]=='\n') c->txt[strlen(c->txt)-1]=0;
data/c2x-2.34d/check_read.c:369:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(elect->dip_corr,dipole_correction,21);
data/c2x-2.34d/check_read.c:774: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).
    i=strlen(ps_pots);
data/c2x-2.34d/check_read.c:779: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).
			    strlen("%block SPECIES POT\n")+1);
data/c2x-2.34d/check_read.c:782: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).
    smisc_size+=strlen("%block SPECIES_POT\n");
data/c2x-2.34d/check_read.c:790:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(m->species_misc+smisc_size,ion_sym+ion_sym_len*j,ion_sym_len);
data/c2x-2.34d/check_read.c:792:7:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
      strcpy(m->species_misc+smisc_size," ");
data/c2x-2.34d/check_read.c:794:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(m->species_misc+smisc_size,cptr,(cptr2-cptr)+1);
data/c2x-2.34d/check_read.c:796:7:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
      strcpy(m->species_misc+smisc_size,"\n");
data/c2x-2.34d/check_read.c:800: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).
			    strlen("%endblock SPECIES_POT\n")+1);
data/c2x-2.34d/check_read.c:803: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).
    smisc_size+=strlen("%endblock SPECIES_POT\n");
data/c2x-2.34d/cif_read.c:36: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).
  return (strncasecmp(s1,s2,strlen(s2))==0)?1:0;
data/c2x-2.34d/cif_read.c:41: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).
  len=strlen(s2);
data/c2x-2.34d/cif_read.c:86: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).
      m->title=malloc(strlen(buff+strlen("_struct_title")));
data/c2x-2.34d/cif_read.c:86:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      m->title=malloc(strlen(buff+strlen("_struct_title")));
data/c2x-2.34d/cif_read.c:87:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      strcpy(m->title,buff+strlen("_struct_title")+1);
data/c2x-2.34d/cif_read.c:90:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sscanf(buff+strlen("_cell_length_a "),"%lf",abc);
data/c2x-2.34d/cif_read.c:92:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sscanf(buff+strlen("_cell_length_b "),"%lf",abc+1);
data/c2x-2.34d/cif_read.c:94:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sscanf(buff+strlen("_cell_length_c "),"%lf",abc+2);
data/c2x-2.34d/cif_read.c:97:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sscanf(buff+strlen("_cell_angle_alpha "),"%lf",abc+3);
data/c2x-2.34d/cif_read.c:100:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sscanf(buff+strlen("_cell_angle_beta "),"%lf",abc+4);
data/c2x-2.34d/cif_read.c:103:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sscanf(buff+strlen("_cell_angle_gamma "),"%lf",abc+5);
data/c2x-2.34d/cif_read.c:109:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buffer,buff,LINE_SIZE);
data/c2x-2.34d/cif_read.c:378: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).
      sym_as_xyz[s->n]=malloc(strlen(buff+f[fsym_as_xyz])+1);
data/c2x-2.34d/cube_read.c:41:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    m->title=malloc(strlen(buffer)+1);
data/c2x-2.34d/cube_read.c:45: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).
    m->title[strlen(m->title)-1]=0;
data/c2x-2.34d/dict.c:40:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  dict->key=malloc(strlen(key)+1);
data/c2x-2.34d/dict.c:56: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).
    p=malloc(strlen(value)+1);
data/c2x-2.34d/dict.c:71:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  dict->value=realloc(dict->value,strlen(dict->value)+strlen(value)+1);
data/c2x-2.34d/dict.c:71:55:  [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).
  dict->value=realloc(dict->value,strlen(dict->value)+strlen(value)+1);
data/c2x-2.34d/elk_read.c:196: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).
      filename=malloc(strlen(dict_get(m->dict,"in_dir"))+7);
data/c2x-2.34d/elk_read.c:283:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  filename=malloc(strlen(ptr)+1);
data/c2x-2.34d/elk_read.c:340: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).
    ptr=buffer+strlen(buffer)-1;
data/c2x-2.34d/fdf_read.c:109: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).
      m->title=malloc(strlen(ptr)+1);
data/c2x-2.34d/fdf_read.c:137:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(format,ptr,(ptr2-ptr)+1);
data/c2x-2.34d/fdf_read.c:168:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      ptr2=malloc(strlen(ptr)+1);
data/c2x-2.34d/fdf_read.c:177:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(ptr)){
data/c2x-2.34d/fdf_read.c:178:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if (strlen(siesta_misc[i])<28) /* 28 < length spaces array */
data/c2x-2.34d/fdf_read.c:179:54:  [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).
            dict_strcat(m->dict,"Siesta_misc",spaces+strlen(siesta_misc[i]));
data/c2x-2.34d/fdf_read.c:437: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).
    ptr=buffer+strlen(buffer)-1;
data/c2x-2.34d/fdf_read.c:539: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).
    name=malloc(strlen(dir)+strlen(ptr)+1);
data/c2x-2.34d/fdf_read.c:539: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).
    name=malloc(strlen(dir)+strlen(ptr)+1);
data/c2x-2.34d/fdf_read.c:548:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    fs->name=malloc(strlen(ptr)+1);
data/c2x-2.34d/fdf_read.c:721:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  name=malloc(strlen(prefix)+strlen(label)+5);
data/c2x-2.34d/fdf_read.c:721: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).
  name=malloc(strlen(prefix)+strlen(label)+5);
data/c2x-2.34d/fdf_write.c:234:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  filename=malloc(strlen(oldname)+5);
data/c2x-2.34d/fdf_write.c:238: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).
  cptr=filename+strlen(filename);
data/c2x-2.34d/gcoeff_write.c:59:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat(required_order,"s");
data/c2x-2.34d/gcoeff_write.c:61:9:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        strcat(required_order,"k");
data/c2x-2.34d/gcoeff_write.c:62:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
      strcat(required_order,"b");
data/c2x-2.34d/gcoeff_write.c:64: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).
      for(i=0;i<strlen(required_order)-1;i++){
data/c2x-2.34d/gcoeff_write.c:66:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        for(j=i+1;j<strlen(required_order);j++){
data/c2x-2.34d/geom_read.c:78:8:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	  if (sscanf(buffer,"%4s %d %lf %lf %lf",species,&dummy,
data/c2x-2.34d/geom_read.c:94:8:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	  if (sscanf(buffer,"%4s %d %lf %lf %lf",species,&dummy,
data/c2x-2.34d/parse.c:23: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).
  len=strlen(s2);
data/c2x-2.34d/parse.c:101:5:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
  i=sscanf(buff,"%80s%n",s,n);
data/c2x-2.34d/parse.c:215:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(c,"neg",4);
data/c2x-2.34d/pdb_read.c:60: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).
        m->title=malloc(strlen(buffer)-9);
data/c2x-2.34d/pdb_write.c:85: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).
              (strlen(atno2sym(m->atoms[i].atno))==1))
data/c2x-2.34d/qe_psi_read.c:66:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  file=malloc(strlen(dir)+30+(prefix?strlen(prefix):0));
data/c2x-2.34d/qe_psi_read.c:66:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  file=malloc(strlen(dir)+30+(prefix?strlen(prefix):0));
data/c2x-2.34d/qe_read.c:257: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).
            p2+=strlen(p2)-1;
data/c2x-2.34d/qe_read.c:318:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          p2+=strlen(p2)-1;
data/c2x-2.34d/qe_read.c:422: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).
			    strlen("starting_magnetization("))){
data/c2x-2.34d/qe_read.c:428: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).
	ptr+=strlen("starting_magnetization(");
data/c2x-2.34d/qe_read.c:451:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  len=len+strlen(ptr)+2;
data/c2x-2.34d/qe_read.c:453:4:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	  strcat(p2," ");
data/c2x-2.34d/qe_read.c:455:4:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	  strcat(p2,"\n");
data/c2x-2.34d/qe_write.c:218: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).
    if (m->atoms[i].label&&(strlen(m->atoms[i].label)<=3)){
data/c2x-2.34d/qe_write.c:219: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).
      j=strlen(atno2sym(m->atoms[i].atno));
data/c2x-2.34d/qe_write.c:246: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).
      if (m->atoms[i].label&&(strlen(m->atoms[i].label)<=3)){
data/c2x-2.34d/qe_write.c:247: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).
        j=strlen(atno2sym(m->atoms[i].atno));
data/c2x-2.34d/qe_xml_read.c:66: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).
  cptr=filename+strlen(filename);
data/c2x-2.34d/qe_xml_read.c:71:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(cwd,filename,(cptr-filename)+1);
data/c2x-2.34d/qe_xml_read.c:81:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while((i=fgetc(infile))!=EOF)
data/c2x-2.34d/qe_xml_read.c:105:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(m->title,cptr,(cptr2-cptr)+1);
data/c2x-2.34d/qe_xml_read.c:115:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cptr3,cptr,cptr2-cptr);
data/c2x-2.34d/qe_xml_read.c:126:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cptr3,cptr,cptr2-cptr);
data/c2x-2.34d/qe_xml_read.c:137:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cptr3,cptr,cptr2-cptr);
data/c2x-2.34d/qe_xml_read.c:239:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  cptr+=strlen("weight=");
data/c2x-2.34d/qe_xml_read.c:317:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  cptr+=strlen("weight=");
data/c2x-2.34d/qe_xml_read.c:331:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  cptr+=strlen("size=");
data/c2x-2.34d/qe_xml_read.c:361:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  cptr+=strlen("size=");
data/c2x-2.34d/qe_xml_read.c:410:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      cptr=strstr(buffer,"<atomic_species ")+strlen("<atomic_species ");
data/c2x-2.34d/qe_xml_read.c:448:15:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
              strncpy(species[i].p_pot,cptr,cptr2-cptr);
data/c2x-2.34d/qe_xml_read.c:454: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).
	      strlen("<starting_magnetization>");
data/c2x-2.34d/qe_xml_read.c:504:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            cptr+=strlen("<fractional_translation>");
data/c2x-2.34d/qe_xml_read.c:695: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).
    i=strlen(filename);
data/c2x-2.34d/qe_xml_read.c:702: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).
      den_name=realloc(den_name,strlen(filename)+1);
data/c2x-2.34d/qe_xml_read.c:703:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(den_name,filename,i);
data/c2x-2.34d/qe_xml_read.c:706: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).
    den_name=realloc(den_name,strlen(den_name)+strlen("charge-density.dat")+1);
data/c2x-2.34d/qe_xml_read.c:706:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    den_name=realloc(den_name,strlen(den_name)+strlen("charge-density.dat")+1);
data/c2x-2.34d/qe_xml_read.c:711:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (!strcmp(filename+strlen(filename)-4,".xml")){
data/c2x-2.34d/qe_xml_read.c:712:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	den_name2=malloc(strlen(filename)-3);
data/c2x-2.34d/qe_xml_read.c:713:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(den_name2,filename,strlen(filename)-4);
data/c2x-2.34d/qe_xml_read.c:713: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).
	strncpy(den_name2,filename,strlen(filename)-4);
data/c2x-2.34d/qe_xml_read.c:714: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).
	den_name2[strlen(filename)-4]=0;
data/c2x-2.34d/qe_xml_read.c:715: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).
	den_name2=realloc(den_name2,strlen(den_name2)+
data/c2x-2.34d/qe_xml_read.c:716:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			  strlen(".save/charge-density.dat")+1);
data/c2x-2.34d/qe_xml_read.c:747:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      path=malloc(strlen(cwd)+strlen(prefix)+strlen(name)+3);
data/c2x-2.34d/qe_xml_read.c:747: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).
      path=malloc(strlen(cwd)+strlen(prefix)+strlen(name)+3);
data/c2x-2.34d/qe_xml_read.c:747:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      path=malloc(strlen(cwd)+strlen(prefix)+strlen(name)+3);
data/c2x-2.34d/qe_xml_read.c:750:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
      strcat(path,"/");
data/c2x-2.34d/qe_xml_read.c:752:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
      strcat(path,"/");
data/c2x-2.34d/qe_xml_read.c:764: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).
    path=malloc(strlen(prefix)+strlen(name)+2);
data/c2x-2.34d/qe_xml_read.c:764:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    path=malloc(strlen(prefix)+strlen(name)+2);
data/c2x-2.34d/qe_xml_read.c:767:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(path,"/");
data/c2x-2.34d/qe_xml_read.c:783:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      path=malloc(strlen(cwd)+strlen(ptr)+strlen(name)+3);
data/c2x-2.34d/qe_xml_read.c:783: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).
      path=malloc(strlen(cwd)+strlen(ptr)+strlen(name)+3);
data/c2x-2.34d/qe_xml_read.c:783: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).
      path=malloc(strlen(cwd)+strlen(ptr)+strlen(name)+3);
data/c2x-2.34d/qe_xml_read.c:786:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
      strcat(path,"/");
data/c2x-2.34d/qe_xml_read.c:788:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
      strcat(path,"/");
data/c2x-2.34d/qe_xml_read.c:799: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).
    path=malloc(strlen(ptr)+strlen(name)+2);
data/c2x-2.34d/qe_xml_read.c:799: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).
    path=malloc(strlen(ptr)+strlen(name)+2);
data/c2x-2.34d/qe_xml_read.c:802:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(path,"/");
data/c2x-2.34d/qe_xml_read.c:816: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).
    path=malloc(strlen(cwd)+strlen(name)+2);
data/c2x-2.34d/qe_xml_read.c:816: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).
    path=malloc(strlen(cwd)+strlen(name)+2);
data/c2x-2.34d/qe_xml_read.c:819:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    strcat(path,"/");
data/c2x-2.34d/qe_xml_read.c:866:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ptr+=strlen("z_valence=\"");
data/c2x-2.34d/qe_xml_read.c:902: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).
  ptr+=strlen("<step n_step=")+1;
data/c2x-2.34d/qe_xml_read.c:1039:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(m->atoms[m->n-1].label,cptr,cptr3-cptr);
data/c2x-2.34d/rho_read.c:51: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).
  if ((!strcasecmp(filename+strlen(filename)-4,".rho"))||
data/c2x-2.34d/rho_read.c:52: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).
      (!strcasecmp(filename+strlen(filename)-6,".rhoxc"))){
data/c2x-2.34d/rho_read.c:64:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (!strcasecmp(filename+strlen(filename)-5,".toch")){
data/c2x-2.34d/rho_read.c:77: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).
  if ((!strcasecmp(filename+strlen(filename)-3,".vh"))||
data/c2x-2.34d/rho_read.c:78: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).
      (!strcasecmp(filename+strlen(filename)-3,".vt"))){
data/c2x-2.34d/rho_read.c:184:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (!strcasecmp(filename+strlen(filename)-4,".rho")){
data/c2x-2.34d/rho_read.c:222:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  name=malloc(strlen(filename)+5);
data/c2x-2.34d/rho_read.c:225:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  cptr=name+strlen(name);
data/c2x-2.34d/shelx_read.c:83:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(m->title,cptr,cptr2-cptr);
data/c2x-2.34d/vasp_read.c:102:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    m->title=malloc(strlen(buffer)+1);
data/c2x-2.34d/vasp_read.c:109: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).
    m->title[strlen(m->title)-1]=0;
data/c2x-2.34d/vasp_read.c:502:16:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    if (first) strncpy(buffer,first,LINE_SIZE);
data/c2x-2.34d/vasp_read.c:512:14:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  if (first) strncpy(buffer,first,LINE_SIZE);
data/c2x-2.34d/vasp_read.c:634:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    newfile=malloc(strlen(filename)+4);
data/c2x-2.34d/vasp_read.c:843: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).
  rtn=malloc(strlen(str)+strlen(new)-strlen(old)+1);
data/c2x-2.34d/vasp_read.c:843: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).
  rtn=malloc(strlen(str)+strlen(new)-strlen(old)+1);
data/c2x-2.34d/vasp_read.c:843:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  rtn=malloc(strlen(str)+strlen(new)-strlen(old)+1);
data/c2x-2.34d/vasp_read.c:849:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(rtn,str,cptr-str); /* Copy part before old */
data/c2x-2.34d/vasp_read.c:852:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(cptr2,new,strlen(new)); /* Copy new */
data/c2x-2.34d/vasp_read.c:852:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  strncpy(cptr2,new,strlen(new)); /* Copy new */
data/c2x-2.34d/vasp_read.c:853:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  cptr2+=strlen(new);
data/c2x-2.34d/vasp_read.c:854: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).
  cptr+=strlen(old);        /* No nulls copied */
data/c2x-2.34d/vasp_read.c:990:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      filename=malloc(strlen(dict_get(m->dict,"in_dir"))+7);
data/c2x-2.34d/vasp_read.c:1011: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).
      filename=malloc(strlen(dict_get(m->dict,"in_dir"))+7);
data/c2x-2.34d/xsf_read.c:152:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                (strlen(buffer)>18)){
data/c2x-2.34d/xsf_read.c:153: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).
	      gptr->name=malloc(strlen(buffer)-17);
data/c2x-2.34d/xsf_read.c:157:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                (strlen(buffer)>12)){
data/c2x-2.34d/xsf_read.c:158: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).
	      gptr->name=malloc(strlen(buffer)-11);
data/c2x-2.34d/xsf_read.c:256: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).
    ptr=buffer+strlen(buffer)-1;
data/c2x-2.34d/xsf_read.c:292:12:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
  else if (sscanf(buffer,"%3s %lf %lf %lf %lf %lf %lf",
data/c2x-2.34d/xsf_read.c:309:12:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
  else if (sscanf(buffer,"%3s %lf %lf %lf",
data/c2x-2.34d/xyz_read.c:48:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ptr+=strlen("Lattice=")+1;

ANALYSIS SUMMARY:

Hits = 438
Lines analyzed = 24551 in approximately 0.97 seconds (25232 lines/second)
Physical Source Lines of Code (SLOC) = 18929
Hits@level = [0] 1782 [1] 187 [2] 135 [3]   1 [4] 115 [5]   0
Hits@level+ = [0+] 2220 [1+] 438 [2+] 251 [3+] 116 [4+] 115 [5+]   0
Hits/KSLOC@level+ = [0+] 117.28 [1+] 23.1391 [2+] 13.2601 [3+] 6.12816 [4+] 6.07533 [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.