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/antennavis-0.3.1/ParseArgs.h
Examining data/antennavis-0.3.1/ant.c
Examining data/antennavis-0.3.1/togl.h
Examining data/antennavis-0.3.1/togl_ws.h
Examining data/antennavis-0.3.1/togl.c
Examining data/antennavis-0.3.1/MyTypes.h
Examining data/antennavis-0.3.1/pcard.h
Examining data/antennavis-0.3.1/VisWires.h
Examining data/antennavis-0.3.1/color.c
Examining data/antennavis-0.3.1/ParseArgs.c
Examining data/antennavis-0.3.1/ant.h
Examining data/antennavis-0.3.1/VisWires.c
Examining data/antennavis-0.3.1/pcard.c
Examining data/antennavis-0.3.1/VisField.h
Examining data/antennavis-0.3.1/TkAntenna.c
Examining data/antennavis-0.3.1/TkAntenna.h
Examining data/antennavis-0.3.1/AntennaWidget.c
Examining data/antennavis-0.3.1/VisField.c

FINAL RESULTS:

data/antennavis-0.3.1/AntennaWidget.c:759:5:  [4] (buffer) scanf:
  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.
    scanf("%s", file_name);
data/antennavis-0.3.1/AntennaWidget.c:1174:7:  [4] (buffer) scanf:
  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.
      scanf("%s", file_name);
data/antennavis-0.3.1/AntennaWidget.c:1206:7:  [4] (buffer) scanf:
  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.
      scanf("%s", file_name);
data/antennavis-0.3.1/ant.c:1174:9:  [4] (shell) execlp:
  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.
        execlp("nec2", "nec2", "input.nec", "output.nec", NULL);  
data/antennavis-0.3.1/pcard.c:776:7:  [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(line, "%lf%lf%lf%lf%lf%lf%lf%s%lf%lf%lf%lf", 
data/antennavis-0.3.1/pcard.c:895:7:  [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(line, "%lf%lf%lf%lf%lf%lf%lf%s%lf%lf%lf%lf", 
data/antennavis-0.3.1/AntennaWidget.c:285:3:  [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(time(NULL));
data/antennavis-0.3.1/AntennaWidget.c:750: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   file_name[256];  /**  Name of file  **/
data/antennavis-0.3.1/AntennaWidget.c:840:12:  [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).
    func = atoi(argv[2]);
data/antennavis-0.3.1/AntennaWidget.c:873:12:  [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).
    func = atoi(argv[2]);
data/antennavis-0.3.1/AntennaWidget.c:937: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).
    ChangeCurrentAnt(atoi(argv[2]));
data/antennavis-0.3.1/AntennaWidget.c:960: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).
    ChangeCurrentTube(atoi(argv[2]));
data/antennavis-0.3.1/AntennaWidget.c:1033:17:  [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).
    FreqSteps = atoi(argv[3]) ;
data/antennavis-0.3.1/AntennaWidget.c:1037: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).
    ShowRadPat = atoi(argv[3]);
data/antennavis-0.3.1/AntennaWidget.c:1041:20:  [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).
    ShowPolSense = atoi(argv[3]);
data/antennavis-0.3.1/AntennaWidget.c:1045: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).
    ShowPolTilt = atoi(argv[3]);
data/antennavis-0.3.1/AntennaWidget.c:1049: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).
    ShowAxialRatio = atoi(argv[3]);
data/antennavis-0.3.1/AntennaWidget.c:1053:17:  [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).
    ShowNulls = atoi(argv[3]);
data/antennavis-0.3.1/AntennaWidget.c:1078:20:  [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).
    WireDrawMode = atoi(argv[3]);
data/antennavis-0.3.1/AntennaWidget.c:1082:20:  [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).
    WireDrawMode = atoi(argv[3]);
data/antennavis-0.3.1/AntennaWidget.c:1086:20:  [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).
    WireDrawMode = atoi(argv[3]);
data/antennavis-0.3.1/AntennaWidget.c:1112: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).
    MultipleAntMode = atoi(argv[3]);
data/antennavis-0.3.1/AntennaWidget.c:1116: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).
    MultipleAntMode = atoi(argv[3]);
data/antennavis-0.3.1/AntennaWidget.c:1165: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    file_name[255];  /**  File name  **/
data/antennavis-0.3.1/AntennaWidget.c:1198: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    file_name[255];  /**  File name  **/
data/antennavis-0.3.1/AntennaWidget.c:1269:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(togl->Interp->result, "%lf", SCALE_FACTOR);
data/antennavis-0.3.1/AntennaWidget.c:1271:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(togl->Interp->result, "NO_VARIABLE");
data/antennavis-0.3.1/AntennaWidget.c:1399:10:  [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).
  type = atoi(argv[2]);
data/antennavis-0.3.1/AntennaWidget.c:1439: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).
  n = atoi(argv[2]);
data/antennavis-0.3.1/ParseArgs.c:55: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 buffer[40];  /**  Input buffer           **/
data/antennavis-0.3.1/ParseArgs.c:70:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	      sprintf(buffer, "%f", 
data/antennavis-0.3.1/ParseArgs.c:99: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).
              n = atoi(argv[i] );
data/antennavis-0.3.1/ParseArgs.c:103:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	      sprintf(buffer, "%d", 
data/antennavis-0.3.1/ParseArgs.c:127:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	      sprintf(buffer, "%f %f %f", 
data/antennavis-0.3.1/ant.c:1185: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).
      fin  = fopen("output.nec", "rt");
data/antennavis-0.3.1/ant.h:129: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      *cards[1000];            /**  The .nec file                  **/
data/antennavis-0.3.1/pcard.c:302: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).
  fout = fopen(file_name, "wt");
data/antennavis-0.3.1/pcard.c:363: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).
  fout = fopen(file_name, "wt");
data/antennavis-0.3.1/pcard.c:500: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    line[256];    /**  Input buffer           **/
data/antennavis-0.3.1/pcard.c:518:9:  [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).
  fin = fopen(file_name, "rt");
data/antennavis-0.3.1/pcard.c:649: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         line[256];        /**  A line in the nec_out file         **/
data/antennavis-0.3.1/pcard.c:652: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         sense[10];        /**  Buffer                             **/
data/antennavis-0.3.1/pcard.c:852: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         line[256];        /**  A line in the nec_out file         **/
data/antennavis-0.3.1/pcard.c:855: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         sense[10];        /**  Buffer                             **/
data/antennavis-0.3.1/togl.c:645:17:  [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 unsigned char threeto8[8] = {
data/antennavis-0.3.1/togl.c:649:17:  [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 unsigned char twoto8[4] = {
data/antennavis-0.3.1/togl.c:653:17:  [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 unsigned char oneto8[2] = {
data/antennavis-0.3.1/togl.c:1376:41:  [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).
            Togl_UnloadBitmapFont(togl, atoi(argv[2]));
data/antennavis-0.3.1/togl.c:3553: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, "w");
data/antennavis-0.3.1/pcard.c:775:38:  [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).
    while((end_of_file == false) && (strlen(line) > 1)) {
data/antennavis-0.3.1/pcard.c:894:38:  [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).
    while((end_of_file == false) && (strlen(line) > 1)) {
data/antennavis-0.3.1/togl.c:1322:47:  [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(argv[1], "configure", MAX(1, strlen(argv[1])))) {
data/antennavis-0.3.1/togl.c:1345:51:  [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 (!strncmp(argv[1], "render", MAX(1, strlen(argv[1])))) {
data/antennavis-0.3.1/togl.c:1348:56:  [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 (!strncmp(argv[1], "swapbuffers", MAX(1, strlen(argv[1])))) {
data/antennavis-0.3.1/togl.c:1351:56:  [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 (!strncmp(argv[1], "makecurrent", MAX(1, strlen(argv[1])))) {
data/antennavis-0.3.1/togl.c:1356:57:  [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 (!strncmp(argv[1], "loadbitmapfont", MAX(1, strlen(argv[1])))) {
data/antennavis-0.3.1/togl.c:1374:61:  [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 (!strncmp(argv[1], "unloadbitmapfont", MAX(1, strlen(argv[1])))) {

ANALYSIS SUMMARY:

Hits = 57
Lines analyzed = 11379 in approximately 1.10 seconds (10362 lines/second)
Physical Source Lines of Code (SLOC) = 7212
Hits@level = [0] 116 [1]   8 [2]  42 [3]   1 [4]   6 [5]   0
Hits@level+ = [0+] 173 [1+]  57 [2+]  49 [3+]   7 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 23.9878 [1+] 7.90349 [2+] 6.79423 [3+] 0.970605 [4+] 0.831947 [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.