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/sfepy-2019.4/sfepy/discrete/common/extmods/common.h
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/common_python.c
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.h
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/geommech.c
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/geommech.h
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/geomtrans.c
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/geomtrans.h
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/mesh.h
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/meshutils.c
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/meshutils.h
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/refcoors.c
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/refcoors.h
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/refmaps.c
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/refmaps.h
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/sort.c
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/sort.h
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/types.h
Examining data/sfepy-2019.4/sfepy/discrete/common/extmods/mesh.c
Examining data/sfepy-2019.4/sfepy/discrete/fem/extmods/lagrange.c
Examining data/sfepy-2019.4/sfepy/discrete/fem/extmods/lagrange.h
Examining data/sfepy-2019.4/sfepy/discrete/fem/extmods/lobatto.c
Examining data/sfepy-2019.4/sfepy/discrete/fem/extmods/lobatto.h
Examining data/sfepy-2019.4/sfepy/discrete/fem/extmods/lobatto1d.c
Examining data/sfepy-2019.4/sfepy/discrete/fem/extmods/lobatto1d.h
Examining data/sfepy-2019.4/sfepy/discrete/fem/extmods/lobatto1d_template.c
Examining data/sfepy-2019.4/sfepy/discrete/fem/extmods/lobatto1d_template.h
Examining data/sfepy-2019.4/sfepy/discrete/iga/extmods/nurbs.c
Examining data/sfepy-2019.4/sfepy/discrete/iga/extmods/nurbs.h
Examining data/sfepy-2019.4/sfepy/mechanics/extmods/contres.c
Examining data/sfepy-2019.4/sfepy/mechanics/extmods/contres.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/form_sdcc.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/form_sdcc.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_adj_navier_stokes.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_adj_navier_stokes.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_basic.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_basic.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_biot.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_biot.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_diffusion.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_diffusion.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_dot.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_dot.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_elastic.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_elastic.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_electric.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_electric.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_hyperelastic.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_hyperelastic.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_navier_stokes.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_navier_stokes.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_op.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_op.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_piezo.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_piezo.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_surface.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_surface.h
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_volume.c
Examining data/sfepy-2019.4/sfepy/terms/extmods/terms_volume.h

FINAL RESULTS:

data/sfepy-2019.4/sfepy/discrete/common/extmods/common_python.c:18:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(what, ap);
data/sfepy-2019.4/sfepy/discrete/common/extmods/common_python.c:35:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(what, ap);
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1521: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( file, FI32" "FI32" "FI32"\n", obj->nLev, obj->nRow, obj->nCol );
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1523: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( file, FI32"\n", il );
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1556: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( file, FI32" "FI32" "FI32" "FI32" "FI32"\n",
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1559: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( file, FI32"\n", il );
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1646: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( file, FI32"\n", obj->nAlloc );
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1648: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( file, FI32" %.12e\n", ii, obj->val0[ii] );
data/sfepy-2019.4/sfepy/discrete/common/extmods/geommech.c:915:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf( FI32" ", conn[ii] );
data/sfepy-2019.4/sfepy/discrete/common/extmods/mesh.c:11:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(what, ap);
data/sfepy-2019.4/sfepy/discrete/common/extmods/refmaps.c:30: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( file, FI32" det:\n", ii );
data/sfepy-2019.4/sfepy/discrete/common/extmods/refmaps.c:33: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( file, FI32" volume:\n", ii );
data/sfepy-2019.4/sfepy/discrete/common/extmods/refmaps.c:39: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( file, FI32 " bfGM:\n", ii );
data/sfepy-2019.4/sfepy/discrete/common/extmods/refmaps.c:44: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( file, FI32 " normal:\n", ii );
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:53: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( (*p_obj)->val0, val, (*p_obj)->nAlloc * sizeof( float64 ) );
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:292: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( obj->val0, val,
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1442: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( objR->val, objA->val, objA->cellSize * sizeof( float64 ) );
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1499: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( objR->val0, objA->val0,
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1589:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((file = fopen( fileName, "w" )) == 0) {
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1610:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((file = fopen( fileName, "w" )) == 0) {
data/sfepy-2019.4/sfepy/discrete/common/extmods/fmfield.c:1635:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if ((file = fopen( fileName, "w" )) == 0) {
data/sfepy-2019.4/sfepy/discrete/common/extmods/mesh.c:295: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(conn->offsets, other->offsets, (conn->num + 1) * sizeof(uint32));
data/sfepy-2019.4/sfepy/discrete/common/extmods/mesh.c:296: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(conn->indices, other->indices, conn->n_incident * sizeof(uint32));
data/sfepy-2019.4/sfepy/discrete/common/extmods/common_python.c:566:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read (STDERR_FILENO, &ch, 1) < 0) {

ANALYSIS SUMMARY:

Hits = 24
Lines analyzed = 18356 in approximately 0.50 seconds (36793 lines/second)
Physical Source Lines of Code (SLOC) = 13832
Hits@level = [0]  36 [1]   1 [2]   9 [3]   0 [4]  14 [5]   0
Hits@level+ = [0+]  60 [1+]  24 [2+]  23 [3+]  14 [4+]  14 [5+]   0
Hits/KSLOC@level+ = [0+] 4.33777 [1+] 1.73511 [2+] 1.66281 [3+] 1.01215 [4+] 1.01215 [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.