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/cldump-0.11~dfsg/src/cl_utils.c
Examining data/cldump-0.11~dfsg/src/cl_meta.c
Examining data/cldump-0.11~dfsg/src/cldump.c
Examining data/cldump-0.11~dfsg/src/cl_dump_meta_csv.c
Examining data/cldump-0.11~dfsg/src/cl_dump_field.c
Examining data/cldump-0.11~dfsg/src/cl_dump_data_csv.c
Examining data/cldump-0.11~dfsg/src/cl_dump_meta_sql.c
Examining data/cldump-0.11~dfsg/src/cl_decrypt.c
Examining data/cldump-0.11~dfsg/src/cl_dump_meta.c
Examining data/cldump-0.11~dfsg/src/cldump.h
Examining data/cldump-0.11~dfsg/src/cl_dump_data_sql.c
Examining data/cldump-0.11~dfsg/src/cl_dump_data.c

FINAL RESULTS:

data/cldump-0.11~dfsg/src/cldump.c:210:19:  [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 ((clopt = getopt_long(argc, argv, "dDmf:cSsMnU::x:hv", clargs, &cloptind)) != -1)
data/cldump-0.11~dfsg/src/cl_decrypt.c:59:14:  [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).
  cl->data = fopen(cl->datfile, "rb");
data/cldump-0.11~dfsg/src/cl_decrypt.c:338:8:  [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 = open(cl->memfile, O_RDWR);
data/cldump-0.11~dfsg/src/cl_decrypt.c:398:8:  [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 = open(cl->datfile, O_RDWR);
data/cldump-0.11~dfsg/src/cl_decrypt.c:427: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(mapbase + 2, &clh->sfatr, 2);
data/cldump-0.11~dfsg/src/cl_dump_data.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 *rhd[8] = {
data/cldump-0.11~dfsg/src/cl_dump_data_sql.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[512];
data/cldump-0.11~dfsg/src/cl_dump_data_sql.c:158: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 *rhd[8] = {
data/cldump-0.11~dfsg/src/cl_dump_meta.c:36: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 *sfatr[8] = {
data/cldump-0.11~dfsg/src/cl_dump_meta.c:208: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 *fldtype[9] = {
data/cldump-0.11~dfsg/src/cl_dump_meta.c:257: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 *fldtype[9] = {
data/cldump-0.11~dfsg/src/cl_dump_meta_csv.c:56:7:  [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(buf, clfd[i].fldname, 17);
data/cldump-0.11~dfsg/src/cl_dump_meta_sql.c:44:7:  [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(buf, clfd[i].fldname, 17);
data/cldump-0.11~dfsg/src/cl_dump_meta_sql.c:129:7:  [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(buf, clk[i].keyname, 17);
data/cldump-0.11~dfsg/src/cl_dump_meta_sql.c:171:8:  [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(buf, clfd[clkp[k].fldnum - 1].fldname, 17);
data/cldump-0.11~dfsg/src/cl_meta.c:160:12:  [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).
      fk = fopen(keyfile, "rb");
data/cldump-0.11~dfsg/src/cldump.c:48:8:  [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).
  fp = fopen(cl->memfile, "rb");
data/cldump-0.11~dfsg/src/cldump.c:269:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    cl.decmode = atoi(optarg);
data/cldump-0.11~dfsg/src/cldump.c:327: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).
  cl.data = fopen(argv[optind], "rb");
data/cldump-0.11~dfsg/src/cl_dump_data_sql.c:41: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((char *)buf) > 0)
data/cldump-0.11~dfsg/src/cl_dump_data_sql.c:118:9:  [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(buf) > 0)
data/cldump-0.11~dfsg/src/cl_dump_data_sql.c:172:8:  [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).
  cbuf[strlen(cbuf) - 4] = '\0';
data/cldump-0.11~dfsg/src/cl_dump_data_sql.c:180:19:  [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).
  for (i = 0; i < strlen(tblname); i++)
data/cldump-0.11~dfsg/src/cl_dump_field.c:142: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((char *)buf) > 0)
data/cldump-0.11~dfsg/src/cl_dump_field.c:232: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).
  for (obuf = cbuf; i < strlen(cbuf); obuf++)
data/cldump-0.11~dfsg/src/cl_dump_field.c:242:11:  [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(obuf) > 0)
data/cldump-0.11~dfsg/src/cl_dump_meta_sql.c:53: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).
      for (j = 0; j < strlen((char *)pbuf); j++)
data/cldump-0.11~dfsg/src/cl_dump_meta_sql.c:138: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).
      for (j = 0; j < strlen((char *)pbuf); j++)
data/cldump-0.11~dfsg/src/cl_dump_meta_sql.c:180:24:  [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).
	      for (l = 0; l < strlen((char *)pbuf); l++)
data/cldump-0.11~dfsg/src/cl_dump_meta_sql.c:207: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).
  buf[strlen(buf) - 4] = '\0';
data/cldump-0.11~dfsg/src/cl_dump_meta_sql.c:215:19:  [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).
  for (i = 0; i < strlen(pbuf); i++)
data/cldump-0.11~dfsg/src/cl_meta.c:143:11:  [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).
  keyfile[strlen(keyfile) - 3] = 'K';
data/cldump-0.11~dfsg/src/cl_meta.c:157: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).
      keyfile[strlen(keyfile) - 2] = (l > 9) ? 'a' + (l - 10) : '0' + l;
data/cldump-0.11~dfsg/src/cl_meta.c:158: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).
      keyfile[strlen(keyfile) - 1] = (r > 9) ? 'a' + (r - 10) : '0' + r;
data/cldump-0.11~dfsg/src/cl_utils.c:105: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).
	      memmove(p, data, strlen(data)+1);
data/cldump-0.11~dfsg/src/cl_utils.c:126:9:  [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).
  len = strlen(data);
data/cldump-0.11~dfsg/src/cldump.c:44: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).
  cl->memfile[strlen(cl->memfile) - 1] = 'M';
data/cldump-0.11~dfsg/src/cldump.c:45: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).
  cl->memfile[strlen(cl->memfile) - 2] = 'E';
data/cldump-0.11~dfsg/src/cldump.c:46: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).
  cl->memfile[strlen(cl->memfile) - 3] = 'M';
data/cldump-0.11~dfsg/src/cldump.c:224:10:  [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(optarg) > 1)

ANALYSIS SUMMARY:

Hits = 40
Lines analyzed = 3114 in approximately 0.13 seconds (23658 lines/second)
Physical Source Lines of Code (SLOC) = 2267
Hits@level = [0] 307 [1]  21 [2]  18 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+] 347 [1+]  40 [2+]  19 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 153.066 [1+] 17.6445 [2+] 8.38112 [3+] 0.441112 [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.