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/hashalot-0.3/rmd160.c
Examining data/hashalot-0.3/rmd160.h
Examining data/hashalot-0.3/hashalot.c
Examining data/hashalot-0.3/sha512.c
Examining data/hashalot-0.3/sha512.h

FINAL RESULTS:

data/hashalot-0.3/hashalot.c:137:10:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
		return getpass(prompt); /* FIXME getpass(3) obsolete */
data/hashalot-0.3/hashalot.c:190:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%s%s", pass, salt);
data/hashalot-0.3/hashalot.c:221:14:  [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 ((c = getopt(argc, argv, "n:s:qx")) != -1) {
data/hashalot-0.3/hashalot.c:39:2:  [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 key[RMD160_HASH_SIZE * 2] = { 0, };
data/hashalot-0.3/hashalot.c:50:2:  [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(dest, key, dest_len);
data/hashalot-0.3/hashalot.c:202:2:  [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(h, hash, hashlen);
data/hashalot-0.3/rmd160.c:214:5:  [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( x, data, 64 );
data/hashalot-0.3/rmd160.c:531:5:  [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( outbuf, hd.buf, 20 );
data/hashalot-0.3/sha512.c:96:5:  [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(&ctx->sha_H[0], &sha256_hashInit[0], sizeof(ctx->sha_H));
data/hashalot-0.3/sha512.c:234:5:  [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(ob, &ctx.sha_out[0], ole);
data/hashalot-0.3/sha512.c:243:5:  [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(&ctx->sha_H[0], &sha512_hashInit[0], sizeof(ctx->sha_H));
data/hashalot-0.3/sha512.c:405:5:  [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(ob, &ctx.sha_out[0], ole);
data/hashalot-0.3/sha512.c:413:5:  [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(&ctx->sha_H[0], &sha384_hashInit[0], sizeof(ctx->sha_H));
data/hashalot-0.3/sha512.c:429:5:  [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(ob, &ctx.sha_out[0], ole);
data/hashalot-0.3/sha512.h:13:14:  [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   sha_out[64];    /* results are here, bytes 0...31 */
data/hashalot-0.3/sha512.h:20:14:  [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   sha_out[128];   /* results are here, bytes 0...63 */
data/hashalot-0.3/hashalot.c:44:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(tmp + 1, src, src_len);
data/hashalot-0.3/hashalot.c:157:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read(STDIN_FILENO, pass+i, 1) != 1 || pass[i] == '\n')
data/hashalot-0.3/hashalot.c:189:22:  [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 *buf = xmalloc(strlen(pass) + strlen(salt) + 1);
data/hashalot-0.3/hashalot.c:189: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).
	char *buf = xmalloc(strlen(pass) + strlen(salt) + 1);
data/hashalot-0.3/hashalot.c:192: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).
	memset (pass, 0, strlen (pass)); /* paranoia */
data/hashalot-0.3/hashalot.c:206:2:  [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(hash, "\n");
data/hashalot-0.3/hashalot.c:276:42:  [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).
	hashlen = func(passhash, hashlen, pass, strlen(pass));
data/hashalot-0.3/hashalot.c:277: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).
	memset (pass, 0, strlen (pass)); /* paranoia */

ANALYSIS SUMMARY:

Hits = 24
Lines analyzed = 1311 in approximately 0.06 seconds (21436 lines/second)
Physical Source Lines of Code (SLOC) = 950
Hits@level = [0]   7 [1]   8 [2]  13 [3]   1 [4]   2 [5]   0
Hits@level+ = [0+]  31 [1+]  24 [2+]  16 [3+]   3 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 32.6316 [1+] 25.2632 [2+] 16.8421 [3+] 3.15789 [4+] 2.10526 [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.