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/clipper-2.1.20201109/clipper/minimol/container_minimol.cpp
Examining data/clipper-2.1.20201109/clipper/minimol/minimol_data.h
Examining data/clipper-2.1.20201109/clipper/minimol/minimol_data.cpp
Examining data/clipper-2.1.20201109/clipper/minimol/minimol.h
Examining data/clipper-2.1.20201109/clipper/minimol/container_minimol.h
Examining data/clipper-2.1.20201109/clipper/minimol/minimol_io.h
Examining data/clipper-2.1.20201109/clipper/minimol/minimol_seq.cpp
Examining data/clipper-2.1.20201109/clipper/minimol/minimol_utils.cpp
Examining data/clipper-2.1.20201109/clipper/minimol/minimol_seq.h
Examining data/clipper-2.1.20201109/clipper/minimol/minimol_utils.h
Examining data/clipper-2.1.20201109/clipper/minimol/minimol_io.cpp
Examining data/clipper-2.1.20201109/clipper/minimol/minimol.cpp
Examining data/clipper-2.1.20201109/clipper/clipper-cctbx.h
Examining data/clipper-2.1.20201109/clipper/cctbx/clipper_cctbx.h
Examining data/clipper-2.1.20201109/clipper/cctbx/clipper_cctbx.cpp
Examining data/clipper-2.1.20201109/clipper/core/container_hkl.h
Examining data/clipper-2.1.20201109/clipper/core/fftmap.h
Examining data/clipper-2.1.20201109/clipper/core/fftmap_sparse.cpp
Examining data/clipper-2.1.20201109/clipper/core/hkl_compute.h
Examining data/clipper-2.1.20201109/clipper/core/container_types.cpp
Examining data/clipper-2.1.20201109/clipper/core/test_data.h
Examining data/clipper-2.1.20201109/clipper/core/derivs.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_memory.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_thread.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_test.h
Examining data/clipper-2.1.20201109/clipper/core/coords.h
Examining data/clipper-2.1.20201109/clipper/core/container_hkl.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_sysdep.h
Examining data/clipper-2.1.20201109/clipper/core/hkl_info.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_util.cpp
Examining data/clipper-2.1.20201109/clipper/core/nxmap_operator.h
Examining data/clipper-2.1.20201109/clipper/core/clipper_types.cpp
Examining data/clipper-2.1.20201109/clipper/core/derivs.h
Examining data/clipper-2.1.20201109/clipper/core/spacegroup_data.h
Examining data/clipper-2.1.20201109/clipper/core/nxmap_operator.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_precision.h
Examining data/clipper-2.1.20201109/clipper/core/container_map.h
Examining data/clipper-2.1.20201109/clipper/core/container_types.h
Examining data/clipper-2.1.20201109/clipper/core/hkl_lookup.h
Examining data/clipper-2.1.20201109/clipper/core/container.h
Examining data/clipper-2.1.20201109/clipper/core/clipper_message.h
Examining data/clipper-2.1.20201109/clipper/core/clipper_message.cpp
Examining data/clipper-2.1.20201109/clipper/core/cell.h
Examining data/clipper-2.1.20201109/clipper/core/resol_basisfn.h
Examining data/clipper-2.1.20201109/clipper/core/hkl_data.h
Examining data/clipper-2.1.20201109/clipper/core/test_core.h
Examining data/clipper-2.1.20201109/clipper/core/rotation.h
Examining data/clipper-2.1.20201109/clipper/core/fftmap.cpp
Examining data/clipper-2.1.20201109/clipper/core/cell.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_test.cpp
Examining data/clipper-2.1.20201109/clipper/core/resol_fn.cpp
Examining data/clipper-2.1.20201109/clipper/core/hkl_operators.cpp
Examining data/clipper-2.1.20201109/clipper/core/hkl_datatypes.cpp
Examining data/clipper-2.1.20201109/clipper/core/hkl_operators.h
Examining data/clipper-2.1.20201109/clipper/core/atomsf.cpp
Examining data/clipper-2.1.20201109/clipper/core/fftmap_sparse.h
Examining data/clipper-2.1.20201109/clipper/core/clipper_types.h
Examining data/clipper-2.1.20201109/clipper/core/clipper_stats.cpp
Examining data/clipper-2.1.20201109/clipper/core/hkl_data.cpp
Examining data/clipper-2.1.20201109/clipper/core/hkl_compute.cpp
Examining data/clipper-2.1.20201109/clipper/core/spacegroup.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_memory.h
Examining data/clipper-2.1.20201109/clipper/core/symop.h
Examining data/clipper-2.1.20201109/clipper/core/nxmap.cpp
Examining data/clipper-2.1.20201109/clipper/core/resol_targetfn.h
Examining data/clipper-2.1.20201109/clipper/core/clipper_stats.h
Examining data/clipper-2.1.20201109/clipper/core/clipper_thread.h
Examining data/clipper-2.1.20201109/clipper/core/resol_basisfn.cpp
Examining data/clipper-2.1.20201109/clipper/core/spacegroup.h
Examining data/clipper-2.1.20201109/clipper/core/coords.cpp
Examining data/clipper-2.1.20201109/clipper/core/map_utils.cpp
Examining data/clipper-2.1.20201109/clipper/core/test_core.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_instance.h
Examining data/clipper-2.1.20201109/clipper/core/xmap.cpp
Examining data/clipper-2.1.20201109/clipper/core/ramachandran.h
Examining data/clipper-2.1.20201109/clipper/core/hkl_info.h
Examining data/clipper-2.1.20201109/clipper/core/hkl_datatypes.h
Examining data/clipper-2.1.20201109/clipper/core/container.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_instance.cpp
Examining data/clipper-2.1.20201109/clipper/core/xmap.h
Examining data/clipper-2.1.20201109/clipper/core/nxmap.h
Examining data/clipper-2.1.20201109/clipper/core/ramachandran.cpp
Examining data/clipper-2.1.20201109/clipper/core/map_interp.h
Examining data/clipper-2.1.20201109/clipper/core/map_utils.h
Examining data/clipper-2.1.20201109/clipper/core/hkl_lookup.cpp
Examining data/clipper-2.1.20201109/clipper/core/map_interp.cpp
Examining data/clipper-2.1.20201109/clipper/core/container_map.cpp
Examining data/clipper-2.1.20201109/clipper/core/resol_fn.h
Examining data/clipper-2.1.20201109/clipper/core/test_data.cpp
Examining data/clipper-2.1.20201109/clipper/core/symop.cpp
Examining data/clipper-2.1.20201109/clipper/core/atomsf.h
Examining data/clipper-2.1.20201109/clipper/core/resol_targetfn.cpp
Examining data/clipper-2.1.20201109/clipper/core/clipper_util.h
Examining data/clipper-2.1.20201109/clipper/core/rotation.cpp
Examining data/clipper-2.1.20201109/clipper/core/spacegroup_data.cpp
Examining data/clipper-2.1.20201109/clipper/clipper-mmdb.h
Examining data/clipper-2.1.20201109/clipper/clipper-cif.h
Examining data/clipper-2.1.20201109/clipper/clipper-mmdbold.h
Examining data/clipper-2.1.20201109/clipper/clipper-ccp4.h
Examining data/clipper-2.1.20201109/clipper/minimal-clipper-hkl.h
Examining data/clipper-2.1.20201109/clipper/mtz/mtz_types.cpp
Examining data/clipper-2.1.20201109/clipper/mtz/mtz_io.h
Examining data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp
Examining data/clipper-2.1.20201109/clipper/mtz/map_io.cpp
Examining data/clipper-2.1.20201109/clipper/mtz/map_io.h
Examining data/clipper-2.1.20201109/clipper/mtz/mtz_types.h
Examining data/clipper-2.1.20201109/clipper/ccp4/ccp4_utils.cpp
Examining data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.h
Examining data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_types.cpp
Examining data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp
Examining data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_types.h
Examining data/clipper-2.1.20201109/clipper/ccp4/ccp4_map_io.h
Examining data/clipper-2.1.20201109/clipper/ccp4/ccp4_map_io.cpp
Examining data/clipper-2.1.20201109/clipper/ccp4/ccp4_utils.h
Examining data/clipper-2.1.20201109/clipper/clipper-phs.h
Examining data/clipper-2.1.20201109/clipper/minimal-clipper-map.h
Examining data/clipper-2.1.20201109/clipper/contrib/skeleton.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/sfcalc_obs.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/originmatch.h
Examining data/clipper-2.1.20201109/clipper/contrib/convolution_search.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/sfweight.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/fffear.h
Examining data/clipper-2.1.20201109/clipper/contrib/function_object_bases.h
Examining data/clipper-2.1.20201109/clipper/contrib/mapfilter.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/sfcalc.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/test_contrib.h
Examining data/clipper-2.1.20201109/clipper/contrib/sfscale.h
Examining data/clipper-2.1.20201109/clipper/contrib/test_contrib.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/function_object_bases.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/skeleton.h
Examining data/clipper-2.1.20201109/clipper/contrib/sfcalc_obs.h
Examining data/clipper-2.1.20201109/clipper/contrib/sfscale.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/edcalc.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/originmatch.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/fffear.cpp
Examining data/clipper-2.1.20201109/clipper/contrib/edcalc.h
Examining data/clipper-2.1.20201109/clipper/contrib/sfweight.h
Examining data/clipper-2.1.20201109/clipper/contrib/convolution_search.h
Examining data/clipper-2.1.20201109/clipper/contrib/mapfilter.h
Examining data/clipper-2.1.20201109/clipper/contrib/sfcalc.h
Examining data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp
Examining data/clipper-2.1.20201109/clipper/cns/cns_map_io.h
Examining data/clipper-2.1.20201109/clipper/cns/cns_map_io.cpp
Examining data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.h
Examining data/clipper-2.1.20201109/clipper/clipper-minimol.h
Examining data/clipper-2.1.20201109/clipper/mmdbold/container_mmdb.cpp
Examining data/clipper-2.1.20201109/clipper/mmdbold/container_mmdb.h
Examining data/clipper-2.1.20201109/clipper/mmdbold/clipper_mmdb_types.h
Examining data/clipper-2.1.20201109/clipper/mmdbold/clipper_mmdb_wrapper.cpp
Examining data/clipper-2.1.20201109/clipper/mmdbold/clipper_mmdb.h
Examining data/clipper-2.1.20201109/clipper/mmdbold/clipper_mmdb_types.cpp
Examining data/clipper-2.1.20201109/clipper/mmdbold/clipper_mmdb_wrapper.h
Examining data/clipper-2.1.20201109/clipper/mmdbold/clipper_mmdb.cpp
Examining data/clipper-2.1.20201109/clipper/fortran/f_interface.cpp
Examining data/clipper-2.1.20201109/clipper/clipper.h
Examining data/clipper-2.1.20201109/clipper/clipper-cns.h
Examining data/clipper-2.1.20201109/clipper/mmdb/clipper_mmdb.h
Examining data/clipper-2.1.20201109/clipper/mmdb/clipper_mmdb.cpp
Examining data/clipper-2.1.20201109/clipper/clipper-contrib.h
Examining data/clipper-2.1.20201109/clipper/cif/cif_data_io.h
Examining data/clipper-2.1.20201109/clipper/cif/cif_data_io.cpp
Examining data/clipper-2.1.20201109/clipper/phs/phs_io.h
Examining data/clipper-2.1.20201109/clipper/phs/phs_io.cpp
Examining data/clipper-2.1.20201109/examples/mtzcut.cpp
Examining data/clipper-2.1.20201109/examples/symtest.cpp
Examining data/clipper-2.1.20201109/examples/cnstest.cpp
Examining data/clipper-2.1.20201109/examples/cns2mtz.h
Examining data/clipper-2.1.20201109/examples/cctbxtest.cpp
Examining data/clipper-2.1.20201109/examples/sktest.cpp
Examining data/clipper-2.1.20201109/examples/mtztest.cpp
Examining data/clipper-2.1.20201109/examples/cns2mtz.cpp
Examining data/clipper-2.1.20201109/examples/phstest.cpp
Examining data/clipper-2.1.20201109/examples/maptest.cpp
Examining data/clipper-2.1.20201109/examples/rfltest.cpp
Examining data/clipper-2.1.20201109/examples/reftest2.cpp
Examining data/clipper-2.1.20201109/examples/ccad.cpp
Examining data/clipper-2.1.20201109/examples/octest.cpp
Examining data/clipper-2.1.20201109/examples/mmtest.cpp
Examining data/clipper-2.1.20201109/examples/memtest.cpp
Examining data/clipper-2.1.20201109/examples/reftest.cpp
Examining data/clipper-2.1.20201109/examples/maketestdata.cpp
Examining data/clipper-2.1.20201109/examples/cmaplocal.cpp
Examining data/clipper-2.1.20201109/examples/fomvar.cpp
Examining data/clipper-2.1.20201109/examples/maphist.cpp
Examining data/clipper-2.1.20201109/examples/ffttest.cpp
Examining data/clipper-2.1.20201109/examples/ciftophs.cpp
Examining data/clipper-2.1.20201109/examples/c2test.cpp
Examining data/clipper-2.1.20201109/examples/diffmap.cpp
Examining data/clipper-2.1.20201109/examples/sgtest.cpp
Examining data/clipper-2.1.20201109/examples/ftndemo_lib.cpp
Examining data/clipper-2.1.20201109/examples/sftest.cpp
Examining data/clipper-2.1.20201109/examples/mtziotest.cpp
Examining data/clipper-2.1.20201109/examples/mtzmissing.cpp

FINAL RESULTS:

data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:364:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy( mcol->colsource, ccol.source.substr(0,36).c_str() );
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:365:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy( mcol->grpname, ccol.grpname.substr(0,30).c_str() );
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:366:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy( mcol->grptype, ccol.grptype.substr(0,4).c_str() );
data/clipper-2.1.20201109/clipper/minimol/minimol_io.cpp:309:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy( smon.db->insCode, smon.mm->id().substr(pos+1,9).c_str() );
data/clipper-2.1.20201109/clipper/minimol/minimol_io.cpp:341:19:  [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).
	  if ( a != "" ) strcpy( satm.db->altLoc, a.substr(0,19).c_str() );
data/clipper-2.1.20201109/clipper/ccp4/ccp4_utils.cpp:112:12:  [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.
  html = ( getenv( "CCP_SUPPRESS_HTML" ) == NULL ); 
data/clipper-2.1.20201109/clipper/ccp4/ccp4_utils.cpp:113:12:  [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.
  summ = ( getenv( "CCP_SUPPRESS_SUMMARY" ) == NULL ); 
data/clipper-2.1.20201109/clipper/core/clipper_sysdep.h:134:35:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
#define CLIPPER_MUTEX_INIT(MUTEX) InitializeCriticalSection(MUTEX)
data/clipper-2.1.20201109/clipper/core/clipper_sysdep.h:136:35:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
#define CLIPPER_MUTEX_LOCK(MUTEX) EnterCriticalSection(MUTEX)
data/clipper-2.1.20201109/examples/cns2mtz.cpp:441:27:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	datafree[ih] = dataFlag( random()%(nfree-1) + 1 );
data/clipper-2.1.20201109/examples/cns2mtz.cpp:447:32:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
      datafree[ih] = dataFlag( random()%nfree );
data/clipper-2.1.20201109/examples/mtzmissing.cpp:36:24:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    if ( 0.0001*double(random()%10000) < frac )
data/clipper-2.1.20201109/clipper/ccp4/ccp4_map_io.cpp:89: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 symop[81];
data/clipper-2.1.20201109/clipper/ccp4/ccp4_map_io.cpp:263: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 symop[80];
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:256: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 mtzlauetab[231][8]={"?","1","-1","2","2","2","m","m","m","m","2/m","2/m","2/m","2/m","2/m","2/m","222","222","222","222","222","222","222","222","222","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mm2","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","mmm","4","4","4","4","4","4","-4","-4","4/m","4/m","4/m","4/m","4/m","4/m","422","422","422","422","422","422","422","422","422","422","4mm","4mm","4mm","4mm","4mm","4mm","4mm","4mm","4mm","4mm","4mm","4mm","-4m2","-4m2","-4m2","-4m2","-42m","-42m","-42m","-42m","-42m","-42m","-4m2","-4m2","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","4/mmm","3","3","3","3","-3","-3","312","321","312","321","312","321","32","3m1","31m","3m1","31m","3m","3m","-31m","-31m","-3m1","-3m1","-3m","-3m","6","6","6","6","6","6","-6","6/m","6/m","622","622","622","622","622","622","6mm","6mm","6mm","6mm","-62m","-62m","-6m2","-6m2","6/mmm","6/mmm","6/mmm","6/mmm","23","23","23","23","23","m-3","m-3","m-3","m-3","m-3","m-3","m-3","432","432","432","432","432","432","432","432","-43m","-43m","-43m","-43m","-43m","-43m","m-3m","m-3m","m-3m","m-3m","m-3m","m-3m","m-3m","m-3m","m-3m","m-3m"};
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:680:41:  [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.
    CMtz::MtzAddHistory( mtzout, (const char (*)[MTZRECORDLENGTH])&(newhist[0]),
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:853:41:  [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.
    CMtz::MtzAddHistory( mtzout, (const char (*)[MTZRECORDLENGTH])&(newhist[0]),
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.h:80:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char names[200][12];
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.h:81:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char types[200][4];
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.h:83:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char groupnames[200][20];
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.h:84:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char grouptypes[200][8];
data/clipper-2.1.20201109/clipper/cif/cif_data_io.cpp:140: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).
  FILE* cif = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cif/cif_data_io.cpp:467: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).
  FILE* cif = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cif/cif_data_io.cpp:548:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
     FILE* cif = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cif/cif_data_io.cpp:671:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   FILE* cif = fopen( cif_file_name.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cif/cif_data_io.cpp:845:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   char word[800];
data/clipper-2.1.20201109/clipper/cif/cif_data_io.cpp:858:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   from.open(cif_file_name.c_str()); 
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:116:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE* cns_hkl = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:186:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE* cns_hkl = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:260:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE* cns_hkl = fopen( filename.c_str(), "w" );
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:286:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE* cns_hkl = fopen( filename.c_str(), "w" );
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:360:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE* cns_hkl = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:402:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE* cns_hkl = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cns/cns_map_io.cpp:110: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).
  FILE* f = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cns/cns_map_io.cpp:200:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[512];
data/clipper-2.1.20201109/clipper/cns/cns_map_io.cpp:201: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).
  FILE* f = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cns/cns_map_io.cpp:273: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).
  FILE* f = fopen( filename.c_str(), "w" );
data/clipper-2.1.20201109/clipper/cns/cns_map_io.cpp:329:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[512];
data/clipper-2.1.20201109/clipper/cns/cns_map_io.cpp:330: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).
  FILE* f = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/cns/cns_map_io.cpp:398: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).
  FILE* f = fopen( filename.c_str(), "w" );
data/clipper-2.1.20201109/clipper/cns/cns_map_io.cpp:495:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[512];
data/clipper-2.1.20201109/clipper/cns/cns_map_io.cpp:496: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).
  FILE* f = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/minimol/minimol_io.cpp:134: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 txt[256];
data/clipper-2.1.20201109/clipper/mtz/map_io.cpp: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 title[240], symop[80];
data/clipper-2.1.20201109/clipper/mtz/map_io.cpp:177: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 title[80];
data/clipper-2.1.20201109/clipper/mtz/map_io.cpp:219: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 symop[80];
data/clipper-2.1.20201109/clipper/mtz/map_io.cpp:294: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 title[80];
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp: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 symop[80];
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:619:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
  strcpy( fxtl.xname, "HKL" );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:620:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
  strcpy( fxtl.pname, "HKL" );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:624:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
  strcpy( fset.dname, "HKL" );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.h:44:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char names[200][12];
data/clipper-2.1.20201109/clipper/mtz/mtz_io.h:45:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char types[200][4];
data/clipper-2.1.20201109/clipper/phs/phs_io.cpp:90: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).
  FILE* phs = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/phs/phs_io.cpp:116: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[240];
data/clipper-2.1.20201109/clipper/phs/phs_io.cpp:117: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).
  FILE* phs = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/phs/phs_io.cpp:153: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).
  FILE* phs = fopen( filename.c_str(), "w" );
data/clipper-2.1.20201109/clipper/phs/phs_io.cpp:180: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).
  FILE* phs = fopen( filename.c_str(), "w" );
data/clipper-2.1.20201109/clipper/phs/phs_io.cpp:214: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[240];
data/clipper-2.1.20201109/clipper/phs/phs_io.cpp:215: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).
  FILE* phs = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/phs/phs_io.cpp:244: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[240];
data/clipper-2.1.20201109/clipper/phs/phs_io.cpp:245: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).
  FILE* phs = fopen( filename.c_str(), "r" );
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:271:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( mtzout->mtzsymm.spcgrpname, mtzsymb.c_str(), 11 );
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:272:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( mtzout->mtzsymm.pgname, mtzlaue.c_str(), 11 );
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:841:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( mtzout->mtzsymm.spcgrpname,mtzin->mtzsymm.spcgrpname, 11 );
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:842:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( mtzout->mtzsymm.pgname,    mtzin->mtzsymm.pgname    , 11 );
data/clipper-2.1.20201109/clipper/ccp4/ccp4_mtz_io.cpp:919:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( mtzout->unknown_headers, mtzin->unknown_headers, mtzin->n_unknown_headers*MTZRECORDLENGTH );
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:55:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  char c = fgetc( f );
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:57:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc( f );
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:61:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc( f );
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:69:12:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  char c = fgetc( f );
data/clipper-2.1.20201109/clipper/cns/cns_hkl_io.cpp:72:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc( f );
data/clipper-2.1.20201109/clipper/mmdb/clipper_mmdb.cpp:231:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
{ strncpy( insCode, n.c_str(), 10 ); }
data/clipper-2.1.20201109/clipper/mmdbold/clipper_mmdb.cpp:296:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
{ strncpy( ptr->insCode, n.c_str(), 10 ); }
data/clipper-2.1.20201109/clipper/mmdbold/clipper_mmdb_wrapper.cpp:53:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( spaceGroup, name.substr( 0, 29 ).c_str(), 30 );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:626:3:  [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( fcol.type, "H" );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:627:3:  [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( fcol.label, "H" );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:629:3:  [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( fcol.label, "K" );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:631:3:  [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( fcol.label, "L" );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:674:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( fxtl.xname, cxtl.crystal_name().substr( 0, 64 ).c_str(), 64 );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:675:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( fxtl.pname, cxtl.project_name().substr( 0, 64 ).c_str(), 64 );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:681:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy( fset.dname, cset.dataset_name().substr( 0, 64 ).c_str(), 64 );
data/clipper-2.1.20201109/clipper/mtz/mtz_io.cpp:687:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( fcol.label, col_names[c].substr( 0, 30 ).c_str(), 30 );

ANALYSIS SUMMARY:

Hits = 83
Lines analyzed = 84486 in approximately 4.75 seconds (17805 lines/second)
Physical Source Lines of Code (SLOC) = 65248
Hits@level = [0]  40 [1]  21 [2]  50 [3]   7 [4]   5 [5]   0
Hits@level+ = [0+] 123 [1+]  83 [2+]  62 [3+]  12 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 1.88512 [1+] 1.27207 [2+] 0.950221 [3+] 0.183914 [4+] 0.0766307 [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.