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/xcftools-1.0.7/flatspec.c
Examining data/xcftools-1.0.7/flatten.c
Examining data/xcftools-1.0.7/flatten.h
Examining data/xcftools-1.0.7/gimp/base-enums.h
Examining data/xcftools-1.0.7/gimp/gimpbaseenums.h
Examining data/xcftools-1.0.7/gimp/xcf-private.h
Examining data/xcftools-1.0.7/io-unix.c
Examining data/xcftools-1.0.7/palette.c
Examining data/xcftools-1.0.7/palette.h
Examining data/xcftools-1.0.7/pixels.c
Examining data/xcftools-1.0.7/pixels.h
Examining data/xcftools-1.0.7/scaletab.c
Examining data/xcftools-1.0.7/test/source/mkmodebase.c
Examining data/xcftools-1.0.7/test/source/mktile1.c
Examining data/xcftools-1.0.7/utils.c
Examining data/xcftools-1.0.7/xcf-general.c
Examining data/xcftools-1.0.7/xcf2pnm.c
Examining data/xcftools-1.0.7/xcfinfo.c
Examining data/xcftools-1.0.7/xcftools.h
Examining data/xcftools-1.0.7/xcf2png.c

FINAL RESULTS:

data/xcftools-1.0.7/gimp/base-enums.h:26:63:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
   not marked with /*< skip >*/ are registered with the GType system.
data/xcftools-1.0.7/io-unix.c:57:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if( access(filename,R_OK) != 0 )
data/xcftools-1.0.7/io-unix.c:96:7:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      execlp(unzipper,unzipper,filename,NULL) ;
data/xcftools-1.0.7/utils.c:34:7:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      vfprintf(stderr,format+1,args);
data/xcftools-1.0.7/utils.c:37:7:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      vfprintf(stderr,format,args);
data/xcftools-1.0.7/utils.c:92: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,PACKAGE_STRING "\n");
data/xcftools-1.0.7/xcf2pnm.c:65: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(stderr,f == &outfile ? _("Writing converted image as %s\n")
data/xcftools-1.0.7/xcftools.h:110:28:  [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.
     __ATTRIBUTE__((format(printf,2,3),noreturn)) ;
data/xcftools-1.0.7/xcftools.h:112:28:  [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.
     __ATTRIBUTE__((format(printf,1,2),noreturn)) ;
data/xcftools-1.0.7/xcftools.h:114:28:  [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.
     __ATTRIBUTE__((format(printf,1,2),noreturn)) ;
data/xcftools-1.0.7/xcftools.h:116:28:  [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.
     __ATTRIBUTE__((format(printf,1,2),noreturn)) ;
data/xcftools-1.0.7/xcftools.h:140:28:  [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.
     __ATTRIBUTE__((format(printf,3,4)));
data/xcftools-1.0.7/xcf2png.c:33:9:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
#define getopt_long(argc,argv,optstring,l1,l2) getopt(argc,argv,optstring)
data/xcftools-1.0.7/xcf2png.c:33:48:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
#define getopt_long(argc,argv,optstring,l1,l2) getopt(argc,argv,optstring)
data/xcftools-1.0.7/xcf2png.c:377:18:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while( (option=getopt_long(argc,argv,"-"OPTSTRING,longopts,NULL)) >= 0 )
data/xcftools-1.0.7/xcf2pnm.c:31:9:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
#define getopt_long(argc,argv,optstring,l1,l2) getopt(argc,argv,optstring)
data/xcftools-1.0.7/xcf2pnm.c:31:48:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
#define getopt_long(argc,argv,optstring,l1,l2) getopt(argc,argv,optstring)
data/xcftools-1.0.7/xcf2pnm.c:219:18:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while( (option=getopt_long(argc,argv,"-@#"OPTSTRING,longopts,NULL)) >= 0 )
data/xcftools-1.0.7/xcfinfo.c:29:9:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
#define getopt_long(argc,argv,optstring,l1,l2) getopt(argc,argv,optstring)
data/xcftools-1.0.7/xcfinfo.c:29:48:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
#define getopt_long(argc,argv,optstring,l1,l2) getopt(argc,argv,optstring)
data/xcftools-1.0.7/xcfinfo.c:59:18:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while( (option=getopt_long(argc,argv,"-"OPTSTRING,longopts,NULL)) >= 0 )
data/xcftools-1.0.7/flatten.c:647: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(rows[y] + (where.l - spec->dim.c.l),
data/xcftools-1.0.7/io-unix.c:76:17:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    xcfstream = tmpfile() ;
data/xcftools-1.0.7/io-unix.c:124:17:  [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).
    xcfstream = fopen(filename,"rb") ;
data/xcftools-1.0.7/utils.c:128: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).
  newfile = fopen(name,"wb") ;
data/xcftools-1.0.7/io-unix.c:63: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).
    pc = filename + strlen(filename) ;
data/xcftools-1.0.7/xcf2pnm.c:180: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).
  if( strlen(string) >= 3 ) {
data/xcftools-1.0.7/xcf2pnm.c:181: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).
    string += strlen(string)-3 ;
data/xcftools-1.0.7/xcf2pnm.c:247: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).
      strlen(flatspec.output_filename) > 4 &&
data/xcftools-1.0.7/xcf2pnm.c:248: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).
      flatspec.output_filename[strlen(flatspec.output_filename)-4] == '.' )
data/xcftools-1.0.7/xcf2pnm.c:255: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).
      strlen(progname) > 3 )

ANALYSIS SUMMARY:

Hits = 31
Lines analyzed = 4122 in approximately 0.14 seconds (28542 lines/second)
Physical Source Lines of Code (SLOC) = 3140
Hits@level = [0]  49 [1]   6 [2]   4 [3]   9 [4]  12 [5]   0
Hits@level+ = [0+]  80 [1+]  31 [2+]  25 [3+]  21 [4+]  12 [5+]   0
Hits/KSLOC@level+ = [0+] 25.4777 [1+] 9.87261 [2+] 7.96178 [3+] 6.6879 [4+] 3.82166 [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.