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/argtable2-13/src/arg_lit.c
Examining data/argtable2-13/src/arg_file.c
Examining data/argtable2-13/src/argtable2.h
Examining data/argtable2-13/src/arg_dbl.c
Examining data/argtable2-13/src/arg_end.c
Examining data/argtable2-13/src/arg_int.c
Examining data/argtable2-13/src/arg_date.c
Examining data/argtable2-13/src/getopt.h
Examining data/argtable2-13/src/getopt.c
Examining data/argtable2-13/src/arg_rex.c
Examining data/argtable2-13/src/argtable2.c
Examining data/argtable2-13/src/arg_rem.c
Examining data/argtable2-13/src/arg_str.c
Examining data/argtable2-13/src/getopt1.c
Examining data/argtable2-13/example/argxxx.h
Examining data/argtable2-13/example/rm.c
Examining data/argtable2-13/example/myprog_C89.c
Examining data/argtable2-13/example/myprog.c
Examining data/argtable2-13/example/uname.c
Examining data/argtable2-13/example/ls.c
Examining data/argtable2-13/example/echo.c
Examining data/argtable2-13/example/callbacks.c
Examining data/argtable2-13/example/hasoptvalue.c
Examining data/argtable2-13/example/argxxx.c
Examining data/argtable2-13/example/multisyntax.c
Examining data/argtable2-13/example/argcustom.c
Examining data/argtable2-13/example/mv.c
Examining data/argtable2-13/tests/test_int.c
Examining data/argtable2-13/tests/test_dbl.c
Examining data/argtable2-13/tests/test_lit.c
Examining data/argtable2-13/tests/test_file.c
Examining data/argtable2-13/tests/fntests.c
Examining data/argtable2-13/tests/test_rex.c
Examining data/argtable2-13/tests/test_date.c

FINAL RESULTS:

data/argtable2-13/src/argtable2.c:777:9:  [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.
        fprintf(fp,format1,table[tabindex]->shortopts[0]);
data/argtable2-13/src/argtable2.c:798:9:  [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.
        fprintf(fp,format2,table[tabindex]->shortopts[0]);
data/argtable2-13/src/argtable2.c:917:13:  [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.
            fprintf(fp,format,syntax,glossary);
data/argtable2-13/src/argtable2.c:287:18:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while( (copt=getopt_long(argc,argv,shortoptions,longoptions->options,NULL)) != -1)
data/argtable2-13/src/getopt.c:220: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.
char *getenv();
data/argtable2-13/src/getopt.c:375:20:  [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.
	posixly_correct = getenv("POSIXLY_CORRECT");
data/argtable2-13/src/getopt.c:405:21:  [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.
		nonoption_flags = getenv(var);
data/argtable2-13/src/getopt.c:930:5:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    getopt(argc, argv, optstring)
data/argtable2-13/src/getopt.c:960:7:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt(argc, argv, "abc:d:0123456789");
data/argtable2-13/src/getopt.h:107:13:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	extern int getopt(int argc, char *const *argv, const char *shortopts);
data/argtable2-13/src/getopt.h:109:13:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	extern int getopt();
data/argtable2-13/src/getopt.h:111:13:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	extern int getopt_long(int argc, char *const *argv, const char *shortopts,
data/argtable2-13/src/getopt.h:123:13:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	extern int getopt();
data/argtable2-13/src/getopt.h:124:13:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	extern int getopt_long();
data/argtable2-13/src/getopt1.c:67:5:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    getopt_long(argc, argv, options, long_options, opt_index)
data/argtable2-13/src/getopt1.c:122:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, "abc:d:0123456789",
data/argtable2-13/src/arg_date.c:112:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buff[200];           
data/argtable2-13/src/arg_rex.c:131:13:  [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 errbuff[256];
data/argtable2-13/src/arg_rex.c:228:13:  [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 errbuff[256];
data/argtable2-13/src/argtable2.c:603: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 option[3];
data/argtable2-13/src/argtable2.c:673:13:  [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 shortopt[3];
data/argtable2-13/src/argtable2.c:737: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 syntax[200]="";
data/argtable2-13/src/argtable2.c:818: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 syntax[200]="";
data/argtable2-13/src/argtable2.c:867: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 syntax[200]="";
data/argtable2-13/src/argtable2.c:911:13:  [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 syntax[200]="";
data/argtable2-13/src/argtable2.c:1032:13:  [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 syntax[200]="";
data/argtable2-13/src/getopt.c:402: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 var[100];
data/argtable2-13/src/getopt.c:404:3:  [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(var, "_%d_GNU_nonoption_argv_flags_", getpid());
data/argtable2-13/tests/test_date.c:75: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 buff[200];
data/argtable2-13/tests/test_date.c:81: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 buff[200];
data/argtable2-13/tests/test_date.c:87: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 buff[200];
data/argtable2-13/src/arg_file.c:78: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).
       result = filename + strlen(filename);
data/argtable2-13/src/arg_file.c:92: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).
        result = basename+strlen(basename);
data/argtable2-13/src/arg_file.c:96: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).
        result = basename+strlen(basename);
data/argtable2-13/src/arg_file.c:100: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).
        result = basename+strlen(basename);
data/argtable2-13/src/argtable2.c:135:33:  [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).
        longoptlen += (longopts?strlen(longopts):0) + 1;
data/argtable2-13/src/argtable2.c:212:35:  [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 += 3 * (hdr->shortopts?strlen(hdr->shortopts):0);
data/argtable2-13/src/argtable2.c:634:9:  [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(dest,longopts,(ncspn<ndest)?ncspn:ndest);
data/argtable2-13/src/argtable2.c:703:13:  [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(dest,c,(ncspn<ndest)?ncspn:ndest);
data/argtable2-13/src/argtable2.c:830:13:  [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(syntax)>0)
data/argtable2-13/src/argtable2.c:958:30:  [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).
    const unsigned textlen = strlen( text );
data/argtable2-13/src/argtable2.c:1048: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 ( strlen(syntax) > 25 ) 
data/argtable2-13/src/getopt.c:244:12:  [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).
extern int strlen(const char *);
data/argtable2-13/src/getopt.c:409: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).
			nonoption_flags_len = strlen(nonoption_flags);
data/argtable2-13/src/getopt.c:617: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).
				    == (unsigned int) strlen(p->name))
data/argtable2-13/src/getopt.c:641:16:  [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).
			nextchar += strlen(nextchar);
data/argtable2-13/src/getopt.c:673: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).
					nextchar += strlen(nextchar);
data/argtable2-13/src/getopt.c:689: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).
					nextchar += strlen(nextchar);
data/argtable2-13/src/getopt.c:694:16:  [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).
			nextchar += strlen(nextchar);
data/argtable2-13/src/getopt.c:805:49:  [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 ((unsigned int) (nameend - nextchar) == strlen(p->name))
data/argtable2-13/src/getopt.c:828:17:  [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).
				nextchar += strlen(nextchar);
data/argtable2-13/src/getopt.c:848:19:  [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).
						nextchar += strlen(nextchar);
data/argtable2-13/src/getopt.c:862:19:  [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).
						nextchar += strlen(nextchar);
data/argtable2-13/src/getopt.c:866:17:  [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).
				nextchar += strlen(nextchar);

ANALYSIS SUMMARY:

Hits = 54
Lines analyzed = 7436 in approximately 0.28 seconds (26197 lines/second)
Physical Source Lines of Code (SLOC) = 4562
Hits@level = [0] 371 [1]  23 [2]  15 [3]  13 [4]   3 [5]   0
Hits@level+ = [0+] 425 [1+]  54 [2+]  31 [3+]  16 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 93.1609 [1+] 11.8369 [2+] 6.79527 [3+] 3.50723 [4+] 0.657606 [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.