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/gkrellm-mailwatch-2.4.3/mailwatch.c
Examining data/gkrellm-mailwatch-2.4.3/mailwatch.h

FINAL RESULTS:

data/gkrellm-mailwatch-2.4.3/mailwatch.c:62:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    if (sscanf(buf, "%*s %s %*s %*s %d", sender, &dayofmonth) != 2)
data/gkrellm-mailwatch-2.4.3/mailwatch.c:451:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(command, panel->command);
data/gkrellm-mailwatch-2.4.3/mailwatch.c:452:3:  [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.
  system(strcat(command, " &"));
data/gkrellm-mailwatch-2.4.3/mailwatch.c:510:34:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
          path = g_strjoin(NULL, g_get_home_dir(), mpath->path + 1, NULL);
data/gkrellm-mailwatch-2.4.3/mailwatch.c:148:12:  [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).
  if ((f = fopen(file, "rb")) == NULL)
data/gkrellm-mailwatch-2.4.3/mailwatch.c:194:7:  [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).
  f = fopen(path, "r");
data/gkrellm-mailwatch-2.4.3/mailwatch.c:347:14:  [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).
    if ((f = fopen(mbox->path, "r")) == NULL)
data/gkrellm-mailwatch-2.4.3/mailwatch.c:452:10:  [2] (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 string.
  system(strcat(command, " &"));
data/gkrellm-mailwatch-2.4.3/mailwatch.c:1418:3:  [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(command, arg, p - arg);
data/gkrellm-mailwatch-2.4.3/mailwatch.c:1424:15:  [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).
    toggles = atoi(p);
data/gkrellm-mailwatch-2.4.3/mailwatch.c:1436:36:  [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).
    change_ticks(last_panel->name, atoi(p));
data/gkrellm-mailwatch-2.4.3/mailwatch.c:1439:23:  [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).
    animation_steps = atoi(p);
data/gkrellm-mailwatch-2.4.3/mailwatch.c:319:50:  [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 (!strncmp(buf, "X-Mozilla-Status:", 17) && (strlen(buf) > 21)) {
data/gkrellm-mailwatch-2.4.3/mailwatch.c:328:45:  [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 (!strncmp(buf, "X-Evolution:", 12) && (strlen(buf) > 24)) {
data/gkrellm-mailwatch-2.4.3/mailwatch.c:450: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).
  command = malloc((strlen(panel->command) + 4) * sizeof(char));
data/gkrellm-mailwatch-2.4.3/mailwatch.c:851:8:  [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(buf[0])) {

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 1589 in approximately 0.05 seconds (29201 lines/second)
Physical Source Lines of Code (SLOC) = 1217
Hits@level = [0]  16 [1]   4 [2]   8 [3]   1 [4]   3 [5]   0
Hits@level+ = [0+]  32 [1+]  16 [2+]  12 [3+]   4 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 26.2942 [1+] 13.1471 [2+] 9.86031 [3+] 3.28677 [4+] 2.46508 [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.