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/astronomical-almanac-5.6/altaz.c
Examining data/astronomical-almanac-5.6/angles.c
Examining data/astronomical-almanac-5.6/annuab.c
Examining data/astronomical-almanac-5.6/arcdot.c
Examining data/astronomical-almanac-5.6/constel.c
Examining data/astronomical-almanac-5.6/deflec.c
Examining data/astronomical-almanac-5.6/deltat.c
Examining data/astronomical-almanac-5.6/diurab.c
Examining data/astronomical-almanac-5.6/diurpx.c
Examining data/astronomical-almanac-5.6/domoon.c
Examining data/astronomical-almanac-5.6/epsiln.c
Examining data/astronomical-almanac-5.6/fk4fk5.c
Examining data/astronomical-almanac-5.6/gplan.c
Examining data/astronomical-almanac-5.6/kep.h
Examining data/astronomical-almanac-5.6/kepler.c
Examining data/astronomical-almanac-5.6/lightt.c
Examining data/astronomical-almanac-5.6/lonlat.c
Examining data/astronomical-almanac-5.6/nutate.c
Examining data/astronomical-almanac-5.6/precess.c
Examining data/astronomical-almanac-5.6/protos.h
Examining data/astronomical-almanac-5.6/refrac.c
Examining data/astronomical-almanac-5.6/rstar.c
Examining data/astronomical-almanac-5.6/sidrlt.c
Examining data/astronomical-almanac-5.6/sun.c
Examining data/astronomical-almanac-5.6/tdb.c
Examining data/astronomical-almanac-5.6/trnsit.c
Examining data/astronomical-almanac-5.6/vearth.c
Examining data/astronomical-almanac-5.6/zatan2.c
Examining data/astronomical-almanac-5.6/aa.c
Examining data/astronomical-almanac-5.6/conjunct.c
Examining data/astronomical-almanac-5.6/dms.c
Examining data/astronomical-almanac-5.6/ear404.c
Examining data/astronomical-almanac-5.6/jup404.c
Examining data/astronomical-almanac-5.6/kfiles.c
Examining data/astronomical-almanac-5.6/mar404.c
Examining data/astronomical-almanac-5.6/mer404.c
Examining data/astronomical-almanac-5.6/mlat404.c
Examining data/astronomical-almanac-5.6/mlr404.c
Examining data/astronomical-almanac-5.6/moonrise.c
Examining data/astronomical-almanac-5.6/nep404.c
Examining data/astronomical-almanac-5.6/plantbl.h
Examining data/astronomical-almanac-5.6/plu404.c
Examining data/astronomical-almanac-5.6/rplanet.c
Examining data/astronomical-almanac-5.6/sat404.c
Examining data/astronomical-almanac-5.6/ura404.c
Examining data/astronomical-almanac-5.6/ven404.c

FINAL RESULTS:

data/astronomical-almanac-5.6/deltat.c:339:1:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
gets(s);
data/astronomical-almanac-5.6/dms.c:480:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf( format, (char *) num );
data/astronomical-almanac-5.6/dms.c:482:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf( format, *(double *)num );
data/astronomical-almanac-5.6/dms.c:484:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf( format, *(int *)num );
data/astronomical-almanac-5.6/dms.c:486:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf( format, *(long *)num );
data/astronomical-almanac-5.6/dms.c:498:2:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	sscanf( s, format, num );
data/astronomical-almanac-5.6/kfiles.c:81:8:  [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(s,t);
data/astronomical-almanac-5.6/kfiles.c:242:1:  [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( s, "%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %s",
data/astronomical-almanac-5.6/conjunct.c:162:9:  [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, "s:e:VSAWNFh",
data/astronomical-almanac-5.6/kfiles.c:77:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
   char *t = getenv("HOME");
data/astronomical-almanac-5.6/constel.c:25:1:  [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 *constel[NCON] = {
data/astronomical-almanac-5.6/constel.c:123:1:  [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 *greek[NGREEK] = {
data/astronomical-almanac-5.6/constel.c:154:1:  [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 ans[80];
data/astronomical-almanac-5.6/deltat.c:334:1:  [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[20];
data/astronomical-almanac-5.6/dms.c:179:1:  [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 *months[12] = {
data/astronomical-almanac-5.6/dms.c:194:1:  [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 *days[7] = {
data/astronomical-almanac-5.6/dms.c:476:1:  [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[40];
data/astronomical-almanac-5.6/kep.h:8:2:  [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 obname[16]; /* name of the object */
data/astronomical-almanac-5.6/kep.h:29:2:  [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 obname[32];	/* Object name (31 chars) */
data/astronomical-almanac-5.6/kfiles.c:29: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 starnam[80] = "/usr/share/aa/star.cat";
data/astronomical-almanac-5.6/kfiles.c:30: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 orbnam[80] = "/usr/share/aa/orbit.cat";
data/astronomical-almanac-5.6/kfiles.c:70:11:  [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).
FILE *f, *fopen();
data/astronomical-almanac-5.6/kfiles.c:71:1:  [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[84];
data/astronomical-almanac-5.6/kfiles.c:78:4:  [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(s, "aa.ini");
data/astronomical-almanac-5.6/kfiles.c:82:8:  [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(s,"/.aa.ini");
data/astronomical-almanac-5.6/kfiles.c:86:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
if( (f=fopen("aa.ini","r")) ||
data/astronomical-almanac-5.6/kfiles.c:87:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    (f=fopen(s,"r")) ||
data/astronomical-almanac-5.6/kfiles.c:88:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    (f=fopen("/etc/aa.ini","r")) )
data/astronomical-almanac-5.6/kfiles.c:177:1:  [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 s1[128], s2[128], *u, *v;
data/astronomical-almanac-5.6/kfiles.c:227:1:  [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[128];
data/astronomical-almanac-5.6/kfiles.c:325:11:  [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).
FILE *f, *fopen();
data/astronomical-almanac-5.6/kfiles.c:327:5:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
f = fopen( name, "r" );
data/astronomical-almanac-5.6/plantbl.h:44: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 max_harmonic[NARGS];
data/astronomical-almanac-5.6/kfiles.c:79: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 (t && strlen(t)<70) 
data/astronomical-almanac-5.6/kfiles.c:195:1:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
sscanf( s2, "%lf %lf %lf %lf %lf %15s", &el->ecc, &el->M,

ANALYSIS SUMMARY:

Hits = 35
Lines analyzed = 23268 in approximately 0.61 seconds (37972 lines/second)
Physical Source Lines of Code (SLOC) = 14727
Hits@level = [0] 136 [1]   2 [2]  23 [3]   2 [4]   7 [5]   1
Hits@level+ = [0+] 171 [1+]  35 [2+]  33 [3+]  10 [4+]   8 [5+]   1
Hits/KSLOC@level+ = [0+] 11.6113 [1+] 2.37659 [2+] 2.24078 [3+] 0.679025 [4+] 0.54322 [5+] 0.0679025
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.