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/chealpix-3.30.0/chealpix.h Examining data/chealpix-3.30.0/test_chealpix.c Examining data/chealpix-3.30.0/chealpix.c FINAL RESULTS: data/chealpix-3.30.0/chealpix.c:1044:3: [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(order, nest ? "NESTED " : "RING "); data/chealpix-3.30.0/test_chealpix.c:288:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fileforce, "!%s",file); /* leading ! to allow overwrite */ data/chealpix-3.30.0/chealpix.c:930:3: [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(coordsys9,"C "); data/chealpix-3.30.0/chealpix.c:932: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 (coordsys9,"G "); data/chealpix-3.30.0/chealpix.c:934: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 (coordsys9,"E "); data/chealpix-3.30.0/chealpix.c:1028: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 order[9]; /* HEALPix ordering */ data/chealpix-3.30.0/chealpix.c:1032: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 coordsys9[9]; data/chealpix-3.30.0/test_chealpix.c:270: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[180] = "test_output.fits" ; data/chealpix-3.30.0/test_chealpix.c:271: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 fileforce[180] ; data/chealpix-3.30.0/test_chealpix.c:272: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 order1[10] ; data/chealpix-3.30.0/test_chealpix.c:273: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 order2[10] ; data/chealpix-3.30.0/test_chealpix.c:274: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 coord[10] ; data/chealpix-3.30.0/chealpix.c:1050: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). UTIL_ASSERT(strlen(coordsys)>=1,"bad ccordsys value"); ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 1547 in approximately 0.08 seconds (19374 lines/second) Physical Source Lines of Code (SLOC) = 1175 Hits@level = [0] 42 [1] 1 [2] 10 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 55 [1+] 13 [2+] 12 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 46.8085 [1+] 11.0638 [2+] 10.2128 [3+] 1.70213 [4+] 1.70213 [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.