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/galleta-1.0+20040505/src/galleta.c

FINAL RESULTS:

data/galleta-1.0+20040505/src/galleta.c:134:17:  [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.
  while ((opt = getopt( argc, argv, "d:")) != -1) {
data/galleta-1.0+20040505/src/galleta.c:108: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 delim[10];
data/galleta-1.0+20040505/src/galleta.c:111: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 site[STRSIZE], variable[STRSIZE], value[STRSIZE], ctime1[STRSIZE], ctime2[STRSIZE], etime1[STRSIZE], etime2[STRSIZE], flags[STRSIZE];
data/galleta-1.0+20040505/src/galleta.c:114: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 ascctime[26], ascetime[26];
data/galleta-1.0+20040505/src/galleta.c:126:17:  [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).
  cookie_file = open( argv[argc-1], O_RDONLY, 0 );
data/galleta-1.0+20040505/src/galleta.c:256: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( ascctime, "%02d/%02d/%02d %02d:%02d:%02d", mon, ctimetm->tm_mday, year, ctimetm->tm_hour, ctimetm->tm_min, ctimetm->tm_sec );
data/galleta-1.0+20040505/src/galleta.c:261: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( ascetime, "%02d/%02d/%02d %02d:%02d:%02d", mon, etimetm->tm_mday, year, etimetm->tm_hour, etimetm->tm_min, etimetm->tm_sec );
data/galleta-1.0+20040505/src/galleta.c:48:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  read( d, buf, nbytes );
data/galleta-1.0+20040505/src/galleta.c:123: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( delim, "\t" );
data/galleta-1.0+20040505/src/galleta.c:137:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy( delim, optarg, 10 );

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 267 in approximately 0.04 seconds (7128 lines/second)
Physical Source Lines of Code (SLOC) = 188
Hits@level = [0]   7 [1]   3 [2]   6 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  17 [1+]  10 [2+]   7 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 90.4255 [1+] 53.1915 [2+] 37.234 [3+] 5.31915 [4+]   0 [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.