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/tdc-1.9/tdc.c

FINAL RESULTS:

data/tdc-1.9/tdc.c:304:8:  [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.
  fp = popen(command, "r");
data/tdc-1.9/tdc.c:352:7:  [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(NULL) == 0) {
data/tdc-1.9/tdc.c:358:7:  [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("which ncal > /dev/null 2>&1")) {
data/tdc-1.9/tdc.c:95:16:  [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.
  char *home = getenv("HOME");
data/tdc-1.9/tdc.c:35:1:  [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 curr_cal[8][30];
data/tdc-1.9/tdc.c:296:19:  [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.
void get_calendar(char line[8][30], int month, int year) {
data/tdc-1.9/tdc.c:299: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 command[30];
data/tdc-1.9/tdc.c:300: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 buff[8][30];
data/tdc-1.9/tdc.c:316: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 needle[3];
data/tdc-1.9/tdc.c:344: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 buff[2];
data/tdc-1.9/tdc.c:424: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 strtime[50];
data/tdc-1.9/tdc.c:96: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).
  size_t xdef_len = strlen(home) + strlen("/.Xdefaults") + 1;
data/tdc-1.9/tdc.c:96: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).
  size_t xdef_len = strlen(home) + strlen("/.Xdefaults") + 1;
data/tdc-1.9/tdc.c:348:53:  [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).
  XftTextExtentsUtf8(display, font, (FcChar8*) "0", strlen("0"), &extents);
data/tdc-1.9/tdc.c:354:85:  [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).
    XftDrawStringUtf8(caldraw, xftcolor, font, glyph_w, glyph_h, (FcChar8*) errmsg, strlen(errmsg));
data/tdc-1.9/tdc.c:360:85:  [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).
    XftDrawStringUtf8(caldraw, xftcolor, font, glyph_w, glyph_h, (FcChar8*) errmsg, strlen(errmsg));
data/tdc-1.9/tdc.c:377:81:  [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).
          XftDrawStringUtf8(caldraw, xftcolor, font, p_x, p_y, (FcChar8*) buff, strlen(buff));
data/tdc-1.9/tdc.c:380:81:  [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).
          XftDrawStringUtf8(caldraw, xftcolor, font, p_x, p_y, (FcChar8*) buff, strlen(buff));
data/tdc-1.9/tdc.c:386:80:  [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).
  XftDrawStringUtf8(caldraw, xftcolor, font, 1, glyph_h, (FcChar8*) leftarrow, strlen(leftarrow));
data/tdc-1.9/tdc.c:387:91:  [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).
  XftDrawStringUtf8(caldraw, xftcolor, font, glyph_w *19, glyph_h, (FcChar8*) rightarrow, strlen(rightarrow));
data/tdc-1.9/tdc.c:480:58:  [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).
    XftTextExtentsUtf8(display, calfont, (FcChar8*) "0", strlen("0"), &extents);
data/tdc-1.9/tdc.c:485:59:  [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).
  XftTextExtents8(display, font, (unsigned char*)strtime, strlen(strtime), &extents);
data/tdc-1.9/tdc.c:562:78:  [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).
        XftDrawString8(draw, &xftcolor, font, x, y, (unsigned char*)strtime, strlen(strtime));
data/tdc-1.9/tdc.c:609:80:  [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).
          XftDrawString8(draw, &xftcolor, font, x, y, (unsigned char*)strtime, strlen(strtime));

ANALYSIS SUMMARY:

Hits = 24
Lines analyzed = 626 in approximately 0.03 seconds (21297 lines/second)
Physical Source Lines of Code (SLOC) = 513
Hits@level = [0]  36 [1]  13 [2]   7 [3]   1 [4]   3 [5]   0
Hits@level+ = [0+]  60 [1+]  24 [2+]  11 [3+]   4 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 116.959 [1+] 46.7836 [2+] 21.4425 [3+] 7.79727 [4+] 5.84795 [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.