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/gkrellweather-2.0.8/gkrellweather.c

FINAL RESULTS:

data/gkrellweather-2.0.8/gkrellweather.c:213:21:  [4] (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).
                    strcat(str, line);
data/gkrellweather-2.0.8/gkrellweather.c:416:20:  [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.
    command_pipe = popen(options.command, "r");
data/gkrellweather-2.0.8/gkrellweather.c:677: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.
    n = sscanf(arg, "%s %[^\n]", config, item);
data/gkrellweather-2.0.8/gkrellweather.c:697:13:  [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.
            sscanf(item, "%s\n", options.station);
data/gkrellweather-2.0.8/gkrellweather.c:699:13:  [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(options.command, item);
data/gkrellweather-2.0.8/gkrellweather.c:701:13:  [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.
            sscanf(item, "%s\n", options.filename);
data/gkrellweather-2.0.8/gkrellweather.c:724:9:  [4] (format) snprintf:
  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.
        snprintf(options.command, 512, PREFIX "/share/gkrellm/GrabWeather %s", options.station);
data/gkrellweather-2.0.8/gkrellweather.c:988:5:  [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(options.station, DEFAULT_STATION_ID);
data/gkrellweather-2.0.8/gkrellweather.c:989:5:  [4] (format) snprintf:
  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.
    snprintf(options.command, 512, PREFIX "/share/gkrellm/GrabWeather %s", options.station);
data/gkrellweather-2.0.8/gkrellweather.c:200:60:  [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.
        snprintf(line, 512, "%s/.wmWeatherReports/%s.TXT", getenv("HOME"),
data/gkrellweather-2.0.8/gkrellweather.c:727:17:  [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.
                getenv("HOME"), options.station);
data/gkrellweather-2.0.8/gkrellweather.c:992:14:  [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.
             getenv("HOME"), options.station);
data/gkrellweather-2.0.8/gkrellweather.c:127:15:  [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 ((fp = fopen(options.filename, "r")) != NULL) {
data/gkrellweather-2.0.8/gkrellweather.c:203:19:  [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 ((fp = fopen(line, "r")) != NULL) {
data/gkrellweather-2.0.8/gkrellweather.c:109:48:  [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).
    gkrellm_text_extents(ext->ts.font, string, strlen(string),
data/gkrellweather-2.0.8/gkrellweather.c:153:26:  [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 (air.sky_cond[strlen(air.sky_cond)-1] == '\n') 
data/gkrellweather-2.0.8/gkrellweather.c:154:26:  [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).
            air.sky_cond[strlen(air.sky_cond)-1] = '\0';
data/gkrellweather-2.0.8/gkrellweather.c:206:13:  [1] (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). Risk is low because the source is a constant character.
            strcpy(str, "");
data/gkrellweather-2.0.8/gkrellweather.c:208: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).
                if (cursize + strlen(line) >= 1023) {
data/gkrellweather-2.0.8/gkrellweather.c:209:21:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
                    strncat(str, line, 1024 - cursize);
data/gkrellweather-2.0.8/gkrellweather.c:215:27:  [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).
               cursize += strlen(line);

ANALYSIS SUMMARY:

Hits = 21
Lines analyzed = 1011 in approximately 0.06 seconds (15806 lines/second)
Physical Source Lines of Code (SLOC) = 881
Hits@level = [0]  36 [1]   7 [2]   2 [3]   3 [4]   9 [5]   0
Hits@level+ = [0+]  57 [1+]  21 [2+]  14 [3+]  12 [4+]   9 [5+]   0
Hits/KSLOC@level+ = [0+] 64.6992 [1+] 23.8365 [2+] 15.891 [3+] 13.6209 [4+] 10.2157 [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.