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/xtrlock-2.14/patchlevel.h
Examining data/xtrlock-2.14/xtrlock.c

FINAL RESULTS:

data/xtrlock-2.14/xtrlock.c:70:10:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  encr = crypt(s, key);
data/xtrlock-2.14/xtrlock.c:75:18:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  return !strcmp(crypt(s, pw->pw_passwd), pw->pw_passwd);
data/xtrlock-2.14/xtrlock.c:122:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv("WAYLAND_DISPLAY"))
data/xtrlock-2.14/xtrlock.c:64: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 key[3];
data/xtrlock-2.14/xtrlock.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 cbuf[10], rbuf[128]; /* shadow appears to suggest 127 a good value here */
data/xtrlock-2.14/xtrlock.c:172: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 mask[XIMaskLen(XI_LASTEVENT)];
data/xtrlock-2.14/xtrlock.c:159: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(pw->pw_passwd) < 13) {

ANALYSIS SUMMARY:

Hits = 7
Lines analyzed = 348 in approximately 0.03 seconds (11877 lines/second)
Physical Source Lines of Code (SLOC) = 272
Hits@level = [0]   8 [1]   1 [2]   3 [3]   1 [4]   2 [5]   0
Hits@level+ = [0+]  15 [1+]   7 [2+]   6 [3+]   3 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 55.1471 [1+] 25.7353 [2+] 22.0588 [3+] 11.0294 [4+] 7.35294 [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.