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/cdebootstrap-0.7.7/include/check.h
Examining data/cdebootstrap-0.7.7/include/decompress.h
Examining data/cdebootstrap-0.7.7/include/download.h
Examining data/cdebootstrap-0.7.7/include/execute.h
Examining data/cdebootstrap-0.7.7/include/frontend.h
Examining data/cdebootstrap-0.7.7/include/gpg.h
Examining data/cdebootstrap-0.7.7/include/install.h
Examining data/cdebootstrap-0.7.7/include/log.h
Examining data/cdebootstrap-0.7.7/include/package.h
Examining data/cdebootstrap-0.7.7/include/suite.h
Examining data/cdebootstrap-0.7.7/include/suite_action.h
Examining data/cdebootstrap-0.7.7/include/suite_config.h
Examining data/cdebootstrap-0.7.7/include/suite_packages.h
Examining data/cdebootstrap-0.7.7/include/target.h
Examining data/cdebootstrap-0.7.7/include/util.h
Examining data/cdebootstrap-0.7.7/src/check.c
Examining data/cdebootstrap-0.7.7/src/decompress_bz.c
Examining data/cdebootstrap-0.7.7/src/decompress_gz.c
Examining data/cdebootstrap-0.7.7/src/decompress_null.c
Examining data/cdebootstrap-0.7.7/src/decompress_xz.c
Examining data/cdebootstrap-0.7.7/src/download.c
Examining data/cdebootstrap-0.7.7/src/execute.c
Examining data/cdebootstrap-0.7.7/src/frontend/debian-installer/main.c
Examining data/cdebootstrap-0.7.7/src/frontend/debian-installer/message.c
Examining data/cdebootstrap-0.7.7/src/frontend/standalone/main.c
Examining data/cdebootstrap-0.7.7/src/frontend/standalone/message.c
Examining data/cdebootstrap-0.7.7/src/frontend/standalone/message.h
Examining data/cdebootstrap-0.7.7/src/gpg.c
Examining data/cdebootstrap-0.7.7/src/install.c
Examining data/cdebootstrap-0.7.7/src/log.c
Examining data/cdebootstrap-0.7.7/src/main.c
Examining data/cdebootstrap-0.7.7/src/package.c
Examining data/cdebootstrap-0.7.7/src/suite.c
Examining data/cdebootstrap-0.7.7/src/suite_action.c
Examining data/cdebootstrap-0.7.7/src/suite_config.c
Examining data/cdebootstrap-0.7.7/src/suite_packages.c
Examining data/cdebootstrap-0.7.7/src/target.c

FINAL RESULTS:

data/cdebootstrap-0.7.7/include/log.h:64:95:  [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.
void log_text (di_log_level_flags log_level, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
data/cdebootstrap-0.7.7/src/check.c:49:8:  [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.
  in = popen (buf, "r");
data/cdebootstrap-0.7.7/src/frontend/debian-installer/main.c:45:9:  [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.
  ret = system (buf);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:245:3:  [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 (file, target_root);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:268:3:  [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 (file, target_root);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:291:3:  [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 (file_out, target_root);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:331:3:  [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 (dir_temp, program_name);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:333:3:  [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 (binary_configdir, dir);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:335:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat (binary_configdir, default_configdir);
data/cdebootstrap-0.7.7/src/frontend/standalone/message.c:40:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf (buf, sizeof (buf), msg->text, args);
data/cdebootstrap-0.7.7/src/log.c:165:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf (buf, sizeof (buf), msg->text, args);
data/cdebootstrap-0.7.7/src/log.c:184:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf (msg, sizeof (msg), format, args);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:470:15:  [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 ((c = getopt_long (argc, argv, "a:c:df:hH:i:k:s:qv", long_opts, NULL)) != -1)
data/cdebootstrap-0.7.7/include/execute.h:48:25:  [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.
int execute_full (const char *const argv[0], const struct execute_io_info io_info[], unsigned int io_info_count);
data/cdebootstrap-0.7.7/include/execute.h:49:32:  [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.
int execute_target_full (const char *const argv[0], const struct execute_io_info io_info[], unsigned int io_info_count);
data/cdebootstrap-0.7.7/include/execute.h:53:34:  [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.
inline static int execute (const char *const argv[0])
data/cdebootstrap-0.7.7/include/execute.h:58: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.
inline static int execute_target (const char *const argv[0])
data/cdebootstrap-0.7.7/src/check.c:42: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[1024];
data/cdebootstrap-0.7.7/src/check.c:69: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_name[64];
data/cdebootstrap-0.7.7/src/check.c:70: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_file[128];
data/cdebootstrap-0.7.7/src/decompress_bz.c:65: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 bufin[8*1024], bufout[16*1024];
data/cdebootstrap-0.7.7/src/decompress_gz.c:65: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.
  unsigned char bufin[8*1024], bufout[16*1024];
data/cdebootstrap-0.7.7/src/decompress_null.c:57: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[8*1024];
data/cdebootstrap-0.7.7/src/download.c:63:11:  [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).
  fd_in = open (file_in, O_RDONLY);
data/cdebootstrap-0.7.7/src/download.c:64:12:  [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).
  fd_out = open (file_out, O_WRONLY | O_CREAT, 0644);
data/cdebootstrap-0.7.7/src/download.c:85:11:  [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).
  fd_in = open (file_in, O_RDONLY);
data/cdebootstrap-0.7.7/src/download.c:86:12:  [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).
  fd_out = open (file_out, O_WRONLY | O_CREAT, 0644);
data/cdebootstrap-0.7.7/src/download.c:110: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 target[4096];
data/cdebootstrap-0.7.7/src/download.c:119: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 source[256];
data/cdebootstrap-0.7.7/src/download.c:120: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 target[4096], sig_target[4096];
data/cdebootstrap-0.7.7/src/download.c:192: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 file[256];
data/cdebootstrap-0.7.7/src/download.c:205: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 source[256];
data/cdebootstrap-0.7.7/src/download.c:206: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 target[4096];
data/cdebootstrap-0.7.7/src/download.c:220: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 source[256];
data/cdebootstrap-0.7.7/src/download.c:221: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 target[4096];
data/cdebootstrap-0.7.7/src/download.c:235: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 target_plain[4096];
data/cdebootstrap-0.7.7/src/download.c:270: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 target[4096];
data/cdebootstrap-0.7.7/src/execute.c:137:13:  [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).
  fd_null = open ("/dev/null", O_RDWR | O_CLOEXEC);
data/cdebootstrap-0.7.7/src/execute.c:196: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[1024];
data/cdebootstrap-0.7.7/src/frontend/debian-installer/main.c:41: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[1024];
data/cdebootstrap-0.7.7/src/frontend/debian-installer/message.c:122: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 arg[10];
data/cdebootstrap-0.7.7/src/frontend/debian-installer/message.c:128: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 (arg, "ARG%d", i);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:109: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[1024];
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:130: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(target, "w");
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:237: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 file[PATH_MAX];
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:239: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[1024];
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:246:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
  strcat (file, "/etc/apt/sources.list");
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:248:9:  [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).
  out = fopen (file, "w");
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c: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 file[PATH_MAX];
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:269:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
  strcat (file, "/etc/hosts");
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:271:9:  [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).
  out = fopen (file, "w");
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:286: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 file_in[PATH_MAX], file_out[PATH_MAX], buf[1024];
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:290: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 (file_in, "/etc/resolv.conf");
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:292:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
  strcat (file_out, "/etc/resolv.conf");
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:298:10:  [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).
    in = fopen (file_in, "r");
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:299:11:  [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).
    out = fopen (file_out, "w");
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:328:10:  [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 binary_configdir[4096];
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c: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 dir_temp[strlen (program_name) + 1], *dir;
data/cdebootstrap-0.7.7/src/frontend/standalone/message.c:37: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[1024];
data/cdebootstrap-0.7.7/src/gpg.c:51: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[1024];
data/cdebootstrap-0.7.7/src/gpg.c:111:10:  [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 keyring_path[4096];
data/cdebootstrap-0.7.7/src/install.c:50: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[1024], buf_package[129], buf_status[33];
data/cdebootstrap-0.7.7/src/install.c:83: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[4096], buf_package[129], buf_uri[1025], buf_filename[1025];
data/cdebootstrap-0.7.7/src/install.c:203:9:  [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.
  const char *argv[count + 1], **argv_cur = argv;
data/cdebootstrap-0.7.7/src/install.c:233:9:  [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.
  const char *argv[count + 1], **argv_cur = argv;
data/cdebootstrap-0.7.7/src/install.c:267:9:  [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.
  const char *command[16], **c = command;
data/cdebootstrap-0.7.7/src/install.c:282:9:  [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.
  const char *command[16], **c = command;
data/cdebootstrap-0.7.7/src/install.c:296:9:  [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.
  const char *command[16], **c = command;
data/cdebootstrap-0.7.7/src/install.c:347: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[PATH_MAX];
data/cdebootstrap-0.7.7/src/install.c:375: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 file_source[4096];
data/cdebootstrap-0.7.7/src/install.c:376: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 file_dest_target[256];
data/cdebootstrap-0.7.7/src/install.c:377: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 file_dest[4096];
data/cdebootstrap-0.7.7/src/log.c:149: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[PATH_MAX];
data/cdebootstrap-0.7.7/src/log.c:154: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).
  if (!(logfile = fopen (buf, "w")))
data/cdebootstrap-0.7.7/src/log.c:160: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[1024];
data/cdebootstrap-0.7.7/src/log.c:180: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 msg[1024];
data/cdebootstrap-0.7.7/src/package.c:49: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 lintbuf[15];
data/cdebootstrap-0.7.7/src/package.c:55: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 (lintbuf, inh, len);
data/cdebootstrap-0.7.7/src/package.c:152:5:  [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 versionbuf[SARMAG];
data/cdebootstrap-0.7.7/src/package.c:176:7:  [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 infobuf[4];
data/cdebootstrap-0.7.7/src/package.c:218: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_file[PATH_MAX];
data/cdebootstrap-0.7.7/src/package.c:223:12:  [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).
  int fd = open (buf_file, O_RDONLY);
data/cdebootstrap-0.7.7/src/suite_config.c:369: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 file[PATH_MAX];
data/cdebootstrap-0.7.7/src/suite_config.c:385: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 dir[PATH_MAX];
data/cdebootstrap-0.7.7/src/target.c:39: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).
  int fd_root = open(target_root, O_DIRECTORY | O_RDONLY);
data/cdebootstrap-0.7.7/src/check.c:77:14:  [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).
  key.size = strlen (buf_file);
data/cdebootstrap-0.7.7/src/decompress_bz.c:71:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t r = read(c->fd, bufin, toread);
data/cdebootstrap-0.7.7/src/decompress_gz.c:71:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t r = read(c->fd, bufin, toread);
data/cdebootstrap-0.7.7/src/decompress_null.c:63:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t r = read(c->fd, buf, MIN(c->len, (off_t) sizeof (buf)));
data/cdebootstrap-0.7.7/src/decompress_xz.c:73:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t r = read(c->fd, bufin, toread);
data/cdebootstrap-0.7.7/src/execute.c:86:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read (pollfds[0].fd, &status, sizeof (int)) < 0)
data/cdebootstrap-0.7.7/src/execute.c:199:16:  [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).
    size_t n = strlen (buf);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:164:20:  [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).
  size_t url_len = strlen(buf);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:165: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).
  size_t source_len = strlen(source);
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:171:43:  [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 (!(mirror = strndup(effective_url, strlen(effective_url) - source_len - 1)))
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:329:17:  [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).
  char dir_temp[strlen (program_name) + 1], *dir;
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:334:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
  strcat (binary_configdir, "/");
data/cdebootstrap-0.7.7/src/frontend/standalone/main.c:587:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
  umask (022);
data/cdebootstrap-0.7.7/src/gpg.c:55:16:  [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).
    size_t n = strlen (buf);
data/cdebootstrap-0.7.7/src/gpg.c:61:37:  [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 (strncmp (buf, GNUPGGOODSIG, strlen (GNUPGGOODSIG)) == 0)
data/cdebootstrap-0.7.7/src/gpg.c:63:29:  [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).
      const char *b = buf + strlen (GNUPGGOODSIG) + 16 + 2;
data/cdebootstrap-0.7.7/src/gpg.c:67:41:  [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).
    else if (strncmp (buf, GNUPGBADSIG, strlen (GNUPGBADSIG)) == 0)
data/cdebootstrap-0.7.7/src/gpg.c:69:29:  [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).
      const char *b = buf + strlen (GNUPGBADSIG) + 16 + 2;
data/cdebootstrap-0.7.7/src/install.c:54:16:  [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).
    size_t n = strlen (buf);
data/cdebootstrap-0.7.7/src/install.c:87:16:  [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).
    size_t n = strlen (buf);
data/cdebootstrap-0.7.7/src/install.c:93:9:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    if (sscanf (buf, "download: %128[a-z0-9.+-]: %1024s %1024s", buf_package, buf_uri, buf_filename) == 3)
data/cdebootstrap-0.7.7/src/package.c:154:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read (fd, versionbuf, sizeof (versionbuf)) < 0)
data/cdebootstrap-0.7.7/src/package.c:164:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read (fd, &arh, sizeof (arh)) < 0)
data/cdebootstrap-0.7.7/src/package.c:180:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read (fd, infobuf, sizeof (infobuf)) < 0)
data/cdebootstrap-0.7.7/src/suite_config.c:463:25:  [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).
    section->key.size = strlen (section->key.string);
data/cdebootstrap-0.7.7/src/suite_config.c:490:12:  [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).
    size = strlen (name);

ANALYSIS SUMMARY:

Hits = 111
Lines analyzed = 5121 in approximately 0.15 seconds (33707 lines/second)
Physical Source Lines of Code (SLOC) = 3533
Hits@level = [0]  35 [1]  26 [2]  72 [3]   1 [4]  12 [5]   0
Hits@level+ = [0+] 146 [1+] 111 [2+]  85 [3+]  13 [4+]  12 [5+]   0
Hits/KSLOC@level+ = [0+] 41.3247 [1+] 31.4181 [2+] 24.0589 [3+] 3.67959 [4+] 3.39655 [5+]   0
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.