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/gimp-dcraw-1.32/rawphoto.c

FINAL RESULTS:

data/gimp-dcraw-1.32/rawphoto.c:139:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (command, "dcraw -i '%s'\n",fname);
data/gimp-dcraw-1.32/rawphoto.c:141:10:  [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.
  stat = system (command);
data/gimp-dcraw-1.32/rawphoto.c:189:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (command,
data/gimp-dcraw-1.32/rawphoto.c:200:9:  [4] (shell) popen:
  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.
  pfp = popen (command, "r");
data/gimp-dcraw-1.32/rawphoto.c:277:16:  [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 const char *label[9] =
data/gimp-dcraw-1.32/rawphoto.c:133: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).
  command = g_malloc (strlen(fname)+20);
data/gimp-dcraw-1.32/rawphoto.c:147: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).
    if (!strcasecmp (fname + strlen(fname) - 4, ".jpg"))
data/gimp-dcraw-1.32/rawphoto.c:187: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).
  command = g_malloc (strlen(filename)+100);

ANALYSIS SUMMARY:

Hits = 8
Lines analyzed = 355 in approximately 0.07 seconds (5092 lines/second)
Physical Source Lines of Code (SLOC) = 278
Hits@level = [0]   2 [1]   3 [2]   1 [3]   0 [4]   4 [5]   0
Hits@level+ = [0+]  10 [1+]   8 [2+]   5 [3+]   4 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 35.9712 [1+] 28.777 [2+] 17.9856 [3+] 14.3885 [4+] 14.3885 [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.