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/astropy-healpix-0.5/astropy_healpix/_compiler.c
Examining data/astropy-healpix-0.5/astropy_healpix/_core.c
Examining data/astropy-healpix-0.5/astropy_healpix/interpolation.c
Examining data/astropy-healpix-0.5/astropy_healpix/interpolation.h
Examining data/astropy-healpix-0.5/astropy_helpers/astropy_helpers/commands/src/compiler.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/an-bool.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/bl-nl.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/bl-nl.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/bl.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/bl.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/example.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/healpix-utils.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/healpix-utils.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/healpix.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/healpix.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/keywords.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/mathutil.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/mathutil.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/os-features.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/permutedsort.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/permutedsort.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/qsort_reentrant.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/starutil.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/starutil.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/stdint_msc.h
Examining data/astropy-healpix-0.5/cextern/astrometry.net/test_healpix-main.c
Examining data/astropy-healpix-0.5/cextern/astrometry.net/test_healpix.c
Examining data/astropy-healpix-0.5/cextern/numpy/ieee754.h

FINAL RESULTS:

data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:24:2:  [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(newStr, old);
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:75:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(str->buffer, text);
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:91:2:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	vsprintf(buf, format, argp);
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:152:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf, "%s:%d: ", file, line);
data/astropy-healpix-0.5/cextern/astrometry.net/bl-nl.h:53:28:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
InlineDeclare number*  NLF(access)(nl* list, size_t n);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.h:221:15:  [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.
ATTRIB_FORMAT(printf,2,3)
data/astropy-healpix-0.5/cextern/astrometry.net/bl.h:279:15:  [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.
ATTRIB_FORMAT(printf,2,3)
data/astropy-healpix-0.5/cextern/astrometry.net/bl.h:289:15:  [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.
ATTRIB_FORMAT(printf,3,4)
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:80: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 text[2];
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:89: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 buf[HUGE_STRING_LEN];
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:105:2:  [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(str->buffer + pos, text, length);
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:150: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 buf[HUGE_STRING_LEN];
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:208: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 buf[STRING_MAX];
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:210:2:  [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(buf, "expected <%d> but was <%d>", expected, actual);
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:217: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 buf[STRING_MAX];
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:220:2:  [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(buf, "expected <%f> but was <%f>", expected, actual); 
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:228: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 buf[STRING_MAX];
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:230:2:  [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(buf, "expected pointer <0x%p> but was <0x%p>", expected, actual);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:121: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(NODE_CHARDATA(newnode),
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:444: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(dest, data, list->datasize);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:481: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(dest, src, list->datasize);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:588: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(dataloc, data, list->datasize);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:643:13:  [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(NODE_CHARDATA(destnode), data, list->datasize);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:646:13:  [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(NODE_CHARDATA(destnode), NODE_CHARDATA(node) + (node->N-1)*list->datasize, list->datasize);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:653:13:  [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(NODE_CHARDATA(node) + localindex * list->datasize, data, list->datasize);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:668: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(NODE_CHARDATA(node) + localindex * list->datasize,
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:704: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(dest, src, take * list->datasize);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:1185:13:  [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(rtn + offset, join, JL);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:1188: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(rtn + offset, str, L);
data/astropy-healpix-0.5/cextern/astrometry.net/healpix.c:1255:13:  [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(closestxyz, xyz, 3*sizeof(double));
data/astropy-healpix-0.5/cextern/astrometry.net/healpix.c:1322: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(closestxyz, midxyz, 3*sizeof(double));
data/astropy-healpix-0.5/cextern/astrometry.net/permutedsort.c:66: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(coutput + i * elemsize, cinput + perm[i] * elemsize, elemsize);
data/astropy-healpix-0.5/cextern/astrometry.net/permutedsort.c:69: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(outarray, temparr, elemsize * Nperm);
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:22: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).
	int len = strlen(old);
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:71: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).
	length = strlen(text);
data/astropy-healpix-0.5/cextern/astrometry.net/CuTest.c:98: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).
	int length = strlen(text);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:944:14:  [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).
    seplen = strlen(sepstring);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:1172:10:  [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).
    JL = strlen(join);
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:1175: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).
        len += strlen(sl_get(list, i));
data/astropy-healpix-0.5/cextern/astrometry.net/bl.c:1183:20:  [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).
        size_t L = strlen(str);

ANALYSIS SUMMARY:

Hits = 40
Lines analyzed = 7969 in approximately 0.26 seconds (31208 lines/second)
Physical Source Lines of Code (SLOC) = 5398
Hits@level = [0]  95 [1]   7 [2]  25 [3]   0 [4]   8 [5]   0
Hits@level+ = [0+] 135 [1+]  40 [2+]  33 [3+]   8 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 25.0093 [1+] 7.41015 [2+] 6.11338 [3+] 1.48203 [4+] 1.48203 [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.