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/das-watchdog-0.9.0/test_rt.c
Examining data/das-watchdog-0.9.0/das_watchdog.c

FINAL RESULTS:

data/das-watchdog-0.9.0/das_watchdog.c:94:5:  [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 (temp, 9998, fmt, ap);
data/das-watchdog-0.9.0/das_watchdog.c:369:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if(access(xa_filename,R_OK)==0){
data/das-watchdog-0.9.0/das_watchdog.c:373:8:  [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.
    if(system(message)==0)
data/das-watchdog-0.9.0/das_watchdog.c:406:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(xauthpath,"%s/.Xauthority",pass->pw_dir);
data/das-watchdog-0.9.0/das_watchdog.c:430:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(message,"%s \"WARNING! das_watchdog pauses realtime operations for %d seconds.\"",WHICH_XMESSAGE,waittime);
data/das-watchdog-0.9.0/das_watchdog.c:529:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if(access(WHICH_XMESSAGE,X_OK)!=0){
data/das-watchdog-0.9.0/das_watchdog.c:56:25:  [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).
#define OPTARG_GETINT() atoi(argv[++lokke])
data/das-watchdog-0.9.0/das_watchdog.c:91: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 temp[10000];
data/das-watchdog-0.9.0/das_watchdog.c:215: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 temp[500];
data/das-watchdog-0.9.0/das_watchdog.c:220:3:  [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(name,"softirq-timer/%d",cpu);
data/das-watchdog-0.9.0/das_watchdog.c:225: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(name,"ksoftirqd/%d",cpu);
data/das-watchdog-0.9.0/das_watchdog.c:236: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 name[500];
data/das-watchdog-0.9.0/das_watchdog.c:315:3:  [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(temp,"/proc/%d/environ",pid);
data/das-watchdog-0.9.0/das_watchdog.c:317:6:  [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(temp,"r");
data/das-watchdog-0.9.0/das_watchdog.c:404: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 xauthpath[5000];
data/das-watchdog-0.9.0/das_watchdog.c:421: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 message[5000];
data/das-watchdog-0.9.0/das_watchdog.c:428: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(message,"xmessage \"WARNING! das_watchdog pauses realtime operations for %d seconds.\"",waittime);
data/das-watchdog-0.9.0/das_watchdog.c:588:4:  [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 message[5000];
data/das-watchdog-0.9.0/das_watchdog.c:589:4:  [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(message,"realtime operations paused for %d seconds.",waittime);
data/das-watchdog-0.9.0/das_watchdog.c:324:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int c = fgetc(fp);

ANALYSIS SUMMARY:

Hits = 20
Lines analyzed = 681 in approximately 0.07 seconds (9589 lines/second)
Physical Source Lines of Code (SLOC) = 508
Hits@level = [0]   9 [1]   1 [2]  13 [3]   0 [4]   6 [5]   0
Hits@level+ = [0+]  29 [1+]  20 [2+]  19 [3+]   6 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 57.0866 [1+] 39.3701 [2+] 37.4016 [3+] 11.811 [4+] 11.811 [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.