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/multitime-1.4/format.c
Examining data/multitime-1.4/format.h
Examining data/multitime-1.4/multitime.c
Examining data/multitime-1.4/multitime.h

FINAL RESULTS:

data/multitime-1.4/format.c:345:11:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
          fprintf(stderr, #n); \
data/multitime-1.4/multitime.c:87:13:  [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(pre_cmd) != 0)
data/multitime-1.4/multitime.c:129:9:  [4] (shell) execvp:
  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.
        execvp(cmd->argv[0], cmd->argv);
data/multitime-1.4/multitime.c:155:22:  [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.
        FILE *cmdf = popen(output_cmd, "w");
data/multitime-1.4/multitime.c:179:18:  [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.
    FILE *cmdf = popen(input_cmd, "r");
data/multitime-1.4/multitime.c:62:26:  [3] (random) drand48:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define RANDN(n) ((int) (drand48() * n))
data/multitime-1.4/multitime.c:64:19:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define RANDN(n) (random() % n)
data/multitime-1.4/multitime.c:573:18:  [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 ((ch = getopt(argc, argv, "+b:f:hi:ln:I:o:pqr:s:v")) != -1) {
data/multitime-1.4/multitime.c:707:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(tv.tv_sec ^ tv.tv_usec);
data/multitime-1.4/multitime.c:712:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(tv.tv_sec ^ tv.tv_usec);
data/multitime-1.4/multitime.c:101:24:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
        int outtmpfd = mkstemp(outtmpp);
data/multitime-1.4/multitime.c:184:17:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    int tmpfd = mkstemp(tmpp);
data/multitime-1.4/multitime.c:262: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.
        char buf1[nch + 1];
data/multitime-1.4/multitime.c:299:16:  [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 *bf = fopen(path, "r");
data/multitime-1.4/format.c:94: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).
        for (int k = 0; k < strlen(s); k += 1) {
data/multitime-1.4/format.c:346:36:  [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 (int j = 0; j < 12 - strlen(#n); j += 1) \
data/multitime-1.4/multitime.c:100:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
        umask(S_IRWXG | S_IRWXO | S_IXUSR);
data/multitime-1.4/multitime.c:183:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(S_IRWXG | S_IRWXO | S_IXUSR);
data/multitime-1.4/multitime.c:247: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).
        rtn = malloc(strlen(s) + 1);
data/multitime-1.4/multitime.c:248: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(rtn, s, strlen(s));
data/multitime-1.4/multitime.c:249:13:  [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).
        rtn[strlen(s)] = 0;
data/multitime-1.4/multitime.c:259:18:  [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).
            f += strlen(cmd->replace_str);
data/multitime-1.4/multitime.c:264: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).
        rtn = malloc(strlen(s) + replacen * (nch - strlen(cmd->replace_str)) + 1);
data/multitime-1.4/multitime.c:264:52:  [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).
        rtn = malloc(strlen(s) + replacen * (nch - strlen(cmd->replace_str)) + 1);
data/multitime-1.4/multitime.c:270:31:  [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(r, f, strlen(f));
data/multitime-1.4/multitime.c:271: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).
                r[strlen(f)] = 0;
data/multitime-1.4/multitime.c:276:30:  [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(r, buf1, strlen(buf1));
data/multitime-1.4/multitime.c:277:18:  [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).
            r += strlen(buf1);
data/multitime-1.4/multitime.c:278: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).
            f = fn + strlen(cmd->replace_str);
data/multitime-1.4/multitime.c:493: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).
            else if (strlen(argv[j]) > 0 && argv[j][0] == '-') {
data/multitime-1.4/multitime.c:494:21:  [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(argv[j]) == 1)
data/multitime-1.4/multitime.c:600: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 *ep = optarg + strlen(optarg);
data/multitime-1.4/multitime.c:625: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 *ep = optarg + strlen(optarg);
data/multitime-1.4/multitime.c:741:10:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	        usleep(RANDN(conf->sleep * 1000000));

ANALYSIS SUMMARY:

Hits = 34
Lines analyzed = 1188 in approximately 0.04 seconds (29744 lines/second)
Physical Source Lines of Code (SLOC) = 882
Hits@level = [0]  37 [1]  20 [2]   4 [3]   5 [4]   5 [5]   0
Hits@level+ = [0+]  71 [1+]  34 [2+]  14 [3+]  10 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 80.4989 [1+] 38.5488 [2+] 15.873 [3+] 11.3379 [4+] 5.66893 [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.