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/wmweather+-2.18/wmweather+.c
Examining data/wmweather+-2.18/warnings.c
Examining data/wmweather+-2.18/forecast.c
Examining data/wmweather+-2.18/animation.h
Examining data/wmweather+-2.18/avn.c
Examining data/wmweather+-2.18/wmweather+.h
Examining data/wmweather+-2.18/moon.h
Examining data/wmweather+-2.18/convert.c
Examining data/wmweather+-2.18/subst.h
Examining data/wmweather+-2.18/metar.c
Examining data/wmweather+-2.18/dock.c
Examining data/wmweather+-2.18/mrf.h
Examining data/wmweather+-2.18/dock.h
Examining data/wmweather+-2.18/eta.c
Examining data/wmweather+-2.18/sunzenith.h
Examining data/wmweather+-2.18/animation.c
Examining data/wmweather+-2.18/avn.h
Examining data/wmweather+-2.18/font.h
Examining data/wmweather+-2.18/convert.h
Examining data/wmweather+-2.18/subst.c
Examining data/wmweather+-2.18/forecast.h
Examining data/wmweather+-2.18/die.h
Examining data/wmweather+-2.18/download.c
Examining data/wmweather+-2.18/b0rken/vsnprintf.c
Examining data/wmweather+-2.18/b0rken/stat.c
Examining data/wmweather+-2.18/b0rken/mktime.c
Examining data/wmweather+-2.18/b0rken/strtod.c
Examining data/wmweather+-2.18/b0rken/memcmp.c
Examining data/wmweather+-2.18/b0rken/lstat.c
Examining data/wmweather+-2.18/b0rken/snprintf.c
Examining data/wmweather+-2.18/b0rken/malloc.c
Examining data/wmweather+-2.18/radar.c
Examining data/wmweather+-2.18/die.c
Examining data/wmweather+-2.18/font.c
Examining data/wmweather+-2.18/radar.h
Examining data/wmweather+-2.18/sunzenith.c
Examining data/wmweather+-2.18/mrf.c
Examining data/wmweather+-2.18/eta.h
Examining data/wmweather+-2.18/getLine.c
Examining data/wmweather+-2.18/getLine.h
Examining data/wmweather+-2.18/moon.c
Examining data/wmweather+-2.18/metar.h
Examining data/wmweather+-2.18/diff.c
Examining data/wmweather+-2.18/diff.h
Examining data/wmweather+-2.18/wmgeneral/rcfile.c
Examining data/wmweather+-2.18/wmgeneral/rcfile.h
Examining data/wmweather+-2.18/wmgeneral/xpm_trans.h
Examining data/wmweather+-2.18/wmgeneral/wmgeneral.c
Examining data/wmweather+-2.18/wmgeneral/wmgeneral-x11.h
Examining data/wmweather+-2.18/wmgeneral/mouse_regions.h
Examining data/wmweather+-2.18/wmgeneral/mouse_regions.c
Examining data/wmweather+-2.18/wmgeneral/wmgeneral-gtk.c
Examining data/wmweather+-2.18/wmgeneral/wmgeneral-gtk.h
Examining data/wmweather+-2.18/wmgeneral/xpm_trans.c
Examining data/wmweather+-2.18/wmgeneral/wmgeneral-x11.c
Examining data/wmweather+-2.18/warnings.h
Examining data/wmweather+-2.18/download.h

FINAL RESULTS:

data/wmweather+-2.18/b0rken/snprintf.c:38:7:  [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.
    r=vsnprintf(str, size, format, ap);
data/wmweather+-2.18/b0rken/vsnprintf.c:20:8:  [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.
#ifdef vsnprintf
data/wmweather+-2.18/b0rken/vsnprintf.c:21:9:  [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.
# undef vsnprintf
data/wmweather+-2.18/b0rken/vsnprintf.c:39:16:  [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.
        return vsnprintf(foo, 3, format, ap);
data/wmweather+-2.18/b0rken/vsnprintf.c:41:16:  [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.
        return vsnprintf(str, size, format, ap);
data/wmweather+-2.18/b0rken/vsnprintf.c:67: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(str, size, format, ap);
data/wmweather+-2.18/b0rken/vsnprintf.c:71:9:  [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(foo, 3, format, ap);
data/wmweather+-2.18/b0rken/vsnprintf.c:73:9:  [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(str, size, format, ap);
data/wmweather+-2.18/b0rken/vsnprintf.c:84:7:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    r=vfprintf(devnull, format, ap2);
data/wmweather+-2.18/die.c:31:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(stderr, fmt, ap);
data/wmweather+-2.18/subst.c:128:33:  [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.
#define PRINT(var) { while((k=j+snprintf(out+j, outlen-j, format, var))>=outlen) GROW(out, outlen); j=k; }
data/wmweather+-2.18/warnings.c:111: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(warning_filename1, e);
data/wmweather+-2.18/warnings.c:126:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(warning_endptr1, "%s.%s.txt", warning_zones[z], filenames[i]);
data/wmweather+-2.18/warnings.c:128:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(warning_endptr1, "%s.new-%s.txt", warning_zones[z], filenames[i]);
data/wmweather+-2.18/warnings.c:152:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(warning_endptr1, "%s.%s.txt", warning_zones[d->zone], filenames[d->warning]);
data/wmweather+-2.18/warnings.c:173:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(warning_endptr1, "%s.%s.txt", warning_zones[z], filenames[i]);
data/wmweather+-2.18/warnings.c:175:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(warning_endptr1, "%s.new-%s.txt", warning_zones[z], filenames[i]);
data/wmweather+-2.18/warnings.c:197:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(warning_endptr1, "%s.%s.txt", warning_zones[z], filenames[i]);
data/wmweather+-2.18/warnings.c:211:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(warning_endptr1, "%s.new-%s.txt", warning_zones[z], filenames[i]);
data/wmweather+-2.18/warnings.c:286:9:  [4] (shell) execl:
  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.
        execl("/bin/sh", "/bin/sh", "-c", viewer, NULL);
data/wmweather+-2.18/warnings.c:298:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(warning_endptr1, "%s.%s.txt", warning_zones[z], filenames[i]);
data/wmweather+-2.18/wmgeneral/wmgeneral-gtk.c:133:24:  [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.
#define die(args...) { fprintf(stderr, args); exit(1); }
data/wmweather+-2.18/wmweather+.c:69:14:  [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.
#define F(a) fprintf(stderr, a "\n");
data/wmweather+-2.18/wmweather+.c:805: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(f, c);
data/wmweather+-2.18/wmweather+.c:807:5:  [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(f, file);
data/wmweather+-2.18/wmweather+.c:819: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(f, c);
data/wmweather+-2.18/wmweather+.c:821:5:  [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(f, buf);
data/wmweather+-2.18/wmweather+.c:822:5:  [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(f, file);
data/wmweather+-2.18/wmweather+.c:803:7:  [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.
    c=getenv("HOME");
data/wmweather+-2.18/wmweather+.c:817:7:  [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.
    c=getenv("HOME");
data/wmweather+-2.18/animation.c:126: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 foo[5];
data/wmweather+-2.18/avn.c:44:8:  [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.
static char *avn_req[2]={ NULL, NULL };
data/wmweather+-2.18/avn.c:68:5:  [2] (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 string.
    strcpy(e, ".avn.txt");
data/wmweather+-2.18/avn.c:70:5:  [2] (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 string.
    strcpy(e, ".new-avn.txt");
data/wmweather+-2.18/avn.c:141:49:  [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).
    for(n=0; n<AVN_MAX; n++) forecasts[n].field=atoi(split[n]);
data/wmweather+-2.18/avn.c:145:11:  [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).
        i=atoi(split[n]); \
data/wmweather+-2.18/avn.c:155: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 ID[4];
data/wmweather+-2.18/avn.c:156: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 split[AVN_MAX][4];
data/wmweather+-2.18/avn.c:159: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((fp=fopen(file, "r"))==NULL) return 0;
data/wmweather+-2.18/avn.c:171:7:  [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).
    m=atoi(c-2);
data/wmweather+-2.18/avn.c:174:7:  [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).
    y=atoi(c+1)-1900;
data/wmweather+-2.18/avn.c:193:9:  [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).
    day=atoi(c+i);
data/wmweather+-2.18/avn.c:205:11:  [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).
        i=atoi(split[n]);
data/wmweather+-2.18/avn.c:234:19:  [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).
                i=atoi(split[n]);
data/wmweather+-2.18/avn.c:260:19:  [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).
                i=atoi(split[n]);
data/wmweather+-2.18/avn.c:273:19:  [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).
                i=atoi(split[m]);
data/wmweather+-2.18/avn.c:286:19:  [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).
                i=atoi(split[m]); if(i==999) i=0;
data/wmweather+-2.18/avn.c:287:19:  [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).
                j=atoi(split[m+1]+1); if(j==99) j=0;
data/wmweather+-2.18/avn.c:297:19:  [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).
                i=atoi(split[m]);
data/wmweather+-2.18/avn.c:310:19:  [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).
                i=atoi(split[m]);
data/wmweather+-2.18/b0rken/memcmp.c:9:22:  [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.
        j=((unsigned char *)s1)[i]-((unsigned char *)s2)[i];
data/wmweather+-2.18/b0rken/memcmp.c:9:47:  [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.
        j=((unsigned char *)s1)[i]-((unsigned char *)s2)[i];
data/wmweather+-2.18/b0rken/mktime.c:457:38:  [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).
      tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]);
data/wmweather+-2.18/b0rken/mktime.c:473:21:  [2] (integer) atol:
  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).
      time_t from = atol (argv[1]);
data/wmweather+-2.18/b0rken/mktime.c:474:19:  [2] (integer) atol:
  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).
      time_t by = atol (argv[2]);
data/wmweather+-2.18/b0rken/mktime.c:475:19:  [2] (integer) atol:
  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).
      time_t to = atol (argv[3]);
data/wmweather+-2.18/b0rken/vsnprintf.c:38: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 foo[3];
data/wmweather+-2.18/b0rken/vsnprintf.c:56:30:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define va_copy(dest, src) memcpy(&dest, &src, sizeof(va_list))
data/wmweather+-2.18/b0rken/vsnprintf.c:70: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 foo[3];
data/wmweather+-2.18/b0rken/vsnprintf.c:78:21:  [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((devnull=fopen("/dev/null", "w"))==NULL){
data/wmweather+-2.18/diff.c:35:13:  [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((fp1=fopen(file1, "r"))==NULL) return -1;
data/wmweather+-2.18/diff.c:36:13:  [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((fp2=fopen(file2, "r"))==NULL){ fclose(fp1); return -1; }
data/wmweather+-2.18/download.c:223:18:  [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((info->fp=fopen(info->filename, "wb"))==NULL){
data/wmweather+-2.18/eta.c:44:8:  [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.
static char *eta_req[2]={ NULL, NULL };
data/wmweather+-2.18/eta.c:68:5:  [2] (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 string.
    strcpy(e, ".eta.txt");
data/wmweather+-2.18/eta.c:70:5:  [2] (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 string.
    strcpy(e, ".new-eta.txt");
data/wmweather+-2.18/eta.c:142:53:  [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).
    for(n=0; n<ETA_MSG_MAX; n++) forecasts[n].field=atoi(split[n]);
data/wmweather+-2.18/eta.c:146:11:  [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).
        i=atoi(split[n]); \
data/wmweather+-2.18/eta.c:157: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 ID[4];
data/wmweather+-2.18/eta.c:158: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 split[ETA_MAX][4];
data/wmweather+-2.18/eta.c:161: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((fp=fopen(file, "r"))==NULL) return 0;
data/wmweather+-2.18/eta.c:173:7:  [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).
    m=atoi(c-2);
data/wmweather+-2.18/eta.c:176:7:  [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).
    y=atoi(c+1)-1900;
data/wmweather+-2.18/eta.c:196:9:  [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).
    day=atoi(c+i);
data/wmweather+-2.18/eta.c:212:11:  [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).
        i=atoi(split[n]);
data/wmweather+-2.18/eta.c:241:19:  [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).
                i=atoi(split[n]);
data/wmweather+-2.18/eta.c:267:19:  [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).
                i=atoi(split[n]);
data/wmweather+-2.18/eta.c:280:19:  [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).
                i=atoi(split[m]);
data/wmweather+-2.18/eta.c:293:19:  [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).
                i=atoi(split[m]); if(i==999) i=0;
data/wmweather+-2.18/eta.c:294:19:  [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).
                j=atoi(split[m+1]+1); if(j==99) j=0;
data/wmweather+-2.18/eta.c:304:19:  [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).
                i=atoi(split[m]);
data/wmweather+-2.18/font.c:36:8:  [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.
static char *colors[3][4]={
data/wmweather+-2.18/forecast.c:61: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((fp=fopen(file, "r"))==NULL) return mintime;
data/wmweather+-2.18/forecast.c:99: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).
    tm.tm_mon=atoi(e)-1;
data/wmweather+-2.18/forecast.c:102:16:  [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).
    tm.tm_mday=atoi(e);
data/wmweather+-2.18/forecast.c:105:16:  [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).
    tm.tm_year=atoi(e)-1900;
data/wmweather+-2.18/forecast.c:108:16:  [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).
    tm.tm_hour=atoi(e);
data/wmweather+-2.18/forecast.c:111: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).
    tm.tm_min=atoi(e);
data/wmweather+-2.18/forecast.c:228:8:  [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.
static char current_ID[4]={ '\0', '\0', '\0', '\0' };
data/wmweather+-2.18/forecast.c:243:9:  [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(current_ID, current->ID, 4);
data/wmweather+-2.18/forecast.c:255: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 target_ID[4];
data/wmweather+-2.18/forecast.c:263:5:  [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(target_ID, current_ID, 4);
data/wmweather+-2.18/forecast.h:9: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 ID[4];             /* Forecast type ("AVN", "MRF", etc) */
data/wmweather+-2.18/getLine.c:64:5:  [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(*s, p, l+1);
data/wmweather+-2.18/metar.c:59:8:  [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.
static char *metar_req[2]={ NULL, NULL };
data/wmweather+-2.18/metar.c:127:5:  [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.
    strcat(bigbuf, " ((?:\\d\\d)?)(\\d\\d\\d\\d)Z( .* )");
data/wmweather+-2.18/metar.c:193: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((fp=fopen(file, "r"))==NULL) return 0;
data/wmweather+-2.18/metar.c:218:33:  [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).
    if(c[0]!='\0') current.date=atoi(c);
data/wmweather+-2.18/metar.c:221:18:  [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).
    current.time=atoi(c);
data/wmweather+-2.18/metar.c:237:42:  [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).
            else current.winddir=((int)((atoi(c)+11.25)/22.5))%16+1;
data/wmweather+-2.18/metar.c:241:27:  [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).
        current.windspeed=atoi(c);
data/wmweather+-2.18/metar.c:261:11:  [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).
        i=atoi(c);
data/wmweather+-2.18/metar.c:264:11:  [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).
        j=atoi(c);
data/wmweather+-2.18/metar.c:267:11:  [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).
        f=atoi(c)+(float)i/j;
data/wmweather+-2.18/metar.c:274:11:  [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).
        i=atoi(c);
data/wmweather+-2.18/metar.c:277:18:  [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).
        f=(float)atoi(c)/i;
data/wmweather+-2.18/metar.c:284:11:  [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).
        f=atoi(c);
data/wmweather+-2.18/metar.c:297:16:  [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).
        f=m2mi(atoi(c));
data/wmweather+-2.18/metar.c:314:22:  [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).
        current.temp=atoi(c);
data/wmweather+-2.18/metar.c:319:43:  [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).
            current.rh=rh_C(current.temp, atoi(c));
data/wmweather+-2.18/metar.c:328:11:  [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).
        i=atoi(c);
data/wmweather+-2.18/mrf.c:43:8:  [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.
static char *mrf_req[2]={ NULL, NULL };
data/wmweather+-2.18/mrf.c:67:5:  [2] (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 string.
    strcpy(e, ".mrf.txt");
data/wmweather+-2.18/mrf.c:69:5:  [2] (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 string.
    strcpy(e, ".new-mrf.txt");
data/wmweather+-2.18/mrf.c:122:68:  [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 INT(c) (tmp[0]=*c, tmp[1]=*(c+1), tmp[2]=*(c+2), tmp[3]=0, atoi(tmp))
data/wmweather+-2.18/mrf.c:130: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 tmp[4]={0, 0, 0, 0};
data/wmweather+-2.18/mrf.c:133: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((fp=fopen(file, "r"))==NULL) return 0;
data/wmweather+-2.18/mrf.c:145:9:  [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).
    mon=atoi(c-2);
data/wmweather+-2.18/mrf.c:146:7:  [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).
    x=atoi(c+1);
data/wmweather+-2.18/mrf.c:150:7:  [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).
    y=atoi(c+1)-1900;
data/wmweather+-2.18/mrf.c:162:9:  [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).
    day=atoi(s+4);
data/wmweather+-2.18/mrf.c:220:19:  [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).
                i=atoi(c);
data/wmweather+-2.18/mrf.c:227:19:  [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).
                i=atoi(c);
data/wmweather+-2.18/mrf.c:234:19:  [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).
                i=atoi(c);
data/wmweather+-2.18/mrf.c:283:19:  [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).
                i=atoi(c);
data/wmweather+-2.18/radar.c:125:5:  [2] (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 string.
    strcpy(e, "radar-image");
data/wmweather+-2.18/radar.c:127:5:  [2] (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 string.
    strcpy(e, "new-radar-image");
data/wmweather+-2.18/subst.c:148:21:  [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.
            PRINT(*(char *)substitutes[m].val);
data/wmweather+-2.18/subst.c:154:27:  [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 *s=*(char **)substitutes[m].val;
data/wmweather+-2.18/warnings.c:59:8:  [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.
static char **reqs[sizeof(filenames)/sizeof(*filenames)-1][2];
data/wmweather+-2.18/warnings.c:235: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((fp=fopen(file, "r"))==NULL) return 0;
data/wmweather+-2.18/warnings.c:247: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).
    get_substr(1, c); i=atoi(c)-1900; pcre_free_substring(c);
data/wmweather+-2.18/warnings.c:250: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).
    get_substr(2, c); i=atoi(c)-1; pcre_free_substring(c);
data/wmweather+-2.18/warnings.c:253: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).
    get_substr(3, c); i=atoi(c); pcre_free_substring(c);
data/wmweather+-2.18/warnings.c:256: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).
    get_substr(4, c); i=atoi(c); pcre_free_substring(c);
data/wmweather+-2.18/warnings.c:259: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).
    get_substr(5, c); i=atoi(c); pcre_free_substring(c);
data/wmweather+-2.18/warnings.c:299:20:  [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(warning_filename1, "r"))==NULL) continue;
data/wmweather+-2.18/wmgeneral/rcfile.c:75: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    temp[128];
data/wmweather+-2.18/wmgeneral/rcfile.c:80:10:  [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(filename, "r");
data/wmweather+-2.18/wmgeneral/rcfile.c:110: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    temp[128];
data/wmweather+-2.18/wmgeneral/rcfile.c:116:10:  [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(filename, "r");
data/wmweather+-2.18/wmweather+.c:571: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((fp=fopen(file, "r"))==NULL){
data/wmweather+-2.18/wmweather+.c:657:13:  [2] (misc) open:
  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).
    devnull=open("/dev/null", O_RDWR);
data/wmweather+-2.18/wmweather+.c:806:5:  [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.
    strcat(f, "/.wmweather+/");
data/wmweather+-2.18/wmweather+.c:814: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 buf[15];
data/wmweather+-2.18/wmweather+.c:820:5:  [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.
    strcat(f, "/.wmweather+/");
data/wmweather+-2.18/avn.c:65:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(bigbuf, avn_station, BIGBUF_LEN-14);
data/wmweather+-2.18/download.c:129:13:  [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(sleeptime);
data/wmweather+-2.18/download.c:136:13:  [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(sleeptime);
data/wmweather+-2.18/download.c:160:13:  [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(sleeptime);
data/wmweather+-2.18/eta.c:65:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(bigbuf, eta_station, BIGBUF_LEN-14);
data/wmweather+-2.18/forecast.c:95: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).
    ovalue=pcre_exec(date, NULL, s, strlen(s), 0, 0, ovector, ovecsize);
data/wmweather+-2.18/forecast.c:125:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(f->ID, ID, 3);
data/wmweather+-2.18/getLine.c:41:4:  [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).
	l=strlen(ptr);
data/wmweather+-2.18/metar.c:125:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(bigbuf, metar_station, BIGBUF_LEN-25);
data/wmweather+-2.18/metar.c:208:9:  [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).
    len=strlen(bigbuf);
data/wmweather+-2.18/mrf.c:64:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(bigbuf, mrf_station, BIGBUF_LEN-14);
data/wmweather+-2.18/subst.c:156:32:  [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).
                    str_start+=strlen(s);
data/wmweather+-2.18/subst.c:158: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).
                } else if(str_start>strlen(s)){
data/wmweather+-2.18/warnings.c:91:11:  [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).
        j=strlen(warning_zones[i]);
data/wmweather+-2.18/warnings.c:106:7:  [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).
    i=strlen(e);
data/wmweather+-2.18/warnings.c:130:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(bigbuf, filenames[i], BIGBUF_LEN);
data/wmweather+-2.18/warnings.c:301:42:  [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).
            fwrite(bigbuf, sizeof(char), strlen(bigbuf), fp2);
data/wmweather+-2.18/wmgeneral/rcfile.c:89: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).
                    p += strlen(keys[key].label);
data/wmweather+-2.18/wmgeneral/rcfile.c:122: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).
                    p += strlen(keys[key].label);
data/wmweather+-2.18/wmweather+.c:582:15:  [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(i=strlen(bigbuf)-1; i>=0; i--){
data/wmweather+-2.18/wmweather+.c:804: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).
    if((f=malloc(strlen(c)+strlen(file)+14))==NULL) die("get_filename");
data/wmweather+-2.18/wmweather+.c:804:28:  [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((f=malloc(strlen(c)+strlen(file)+14))==NULL) die("get_filename");
data/wmweather+-2.18/wmweather+.c:818: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).
    if((f=malloc(strlen(c)+strlen(file)+14+14))==NULL) die("get_pid_filename");
data/wmweather+-2.18/wmweather+.c:818:28:  [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((f=malloc(strlen(c)+strlen(file)+14+14))==NULL) die("get_pid_filename");

ANALYSIS SUMMARY:

Hits = 170
Lines analyzed = 7859 in approximately 0.25 seconds (31763 lines/second)
Physical Source Lines of Code (SLOC) = 5839
Hits@level = [0]  61 [1]  24 [2] 116 [3]   2 [4]  28 [5]   0
Hits@level+ = [0+] 231 [1+] 170 [2+] 146 [3+]  30 [4+]  28 [5+]   0
Hits/KSLOC@level+ = [0+] 39.5616 [1+] 29.1146 [2+] 25.0043 [3+] 5.13787 [4+] 4.79534 [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.