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/healpix-cxx-3.60.0/cxxsupport/sse_utils_cxx.h Examining data/healpix-cxx-3.60.0/cxxsupport/wigner.cc Examining data/healpix-cxx-3.60.0/cxxsupport/bstream.h Examining data/healpix-cxx-3.60.0/cxxsupport/xcomplex.h Examining data/healpix-cxx-3.60.0/cxxsupport/crangeset.h Examining data/healpix-cxx-3.60.0/cxxsupport/string_utils.h Examining data/healpix-cxx-3.60.0/cxxsupport/ls_image.h Examining data/healpix-cxx-3.60.0/cxxsupport/vec3.h Examining data/healpix-cxx-3.60.0/cxxsupport/compress_utils.h Examining data/healpix-cxx-3.60.0/cxxsupport/planck_rng.h Examining data/healpix-cxx-3.60.0/cxxsupport/ls_image.cc Examining data/healpix-cxx-3.60.0/cxxsupport/datatypes.h Examining data/healpix-cxx-3.60.0/cxxsupport/paramfile.cc Examining data/healpix-cxx-3.60.0/cxxsupport/error_handling.h Examining data/healpix-cxx-3.60.0/cxxsupport/openmp_support.h Examining data/healpix-cxx-3.60.0/cxxsupport/arr.h Examining data/healpix-cxx-3.60.0/cxxsupport/geom_utils.cc Examining data/healpix-cxx-3.60.0/cxxsupport/trafos.h Examining data/healpix-cxx-3.60.0/cxxsupport/alloc_utils.h Examining data/healpix-cxx-3.60.0/cxxsupport/safe_cast.h Examining data/healpix-cxx-3.60.0/cxxsupport/pointing.cc Examining data/healpix-cxx-3.60.0/cxxsupport/announce.cc Examining data/healpix-cxx-3.60.0/cxxsupport/trafos.cc Examining data/healpix-cxx-3.60.0/cxxsupport/linear_map.h Examining data/healpix-cxx-3.60.0/cxxsupport/fitshandle.h Examining data/healpix-cxx-3.60.0/cxxsupport/pointing.h Examining data/healpix-cxx-3.60.0/cxxsupport/rangeset.h Examining data/healpix-cxx-3.60.0/cxxsupport/geom_utils.h Examining data/healpix-cxx-3.60.0/cxxsupport/error_handling.cc Examining data/healpix-cxx-3.60.0/cxxsupport/rotmatrix.cc Examining data/healpix-cxx-3.60.0/cxxsupport/announce.h Examining data/healpix-cxx-3.60.0/cxxsupport/walltimer.h Examining data/healpix-cxx-3.60.0/cxxsupport/string_utils.cc Examining data/healpix-cxx-3.60.0/cxxsupport/rotmatrix.h Examining data/healpix-cxx-3.60.0/cxxsupport/colour.h Examining data/healpix-cxx-3.60.0/cxxsupport/walltimer.cc Examining data/healpix-cxx-3.60.0/cxxsupport/sort_utils.h Examining data/healpix-cxx-3.60.0/cxxsupport/paramfile.h Examining data/healpix-cxx-3.60.0/cxxsupport/math_utils.h Examining data/healpix-cxx-3.60.0/cxxsupport/lsconstants.h Examining data/healpix-cxx-3.60.0/cxxsupport/levels_facilities.h Examining data/healpix-cxx-3.60.0/cxxsupport/wigner.h Examining data/healpix-cxx-3.60.0/cxxsupport/share_utils.h Examining data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/hotspots_cxx_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/alice3.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/syn_alm_cxx.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/healpix_base.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/mask_tools.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/moc_query.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/compute_weights.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/mask_tools.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/powspec.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/udgrade_cxx.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/alm.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/needlet_tool_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/smoothing_cxx.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/map2tga.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/map2tga_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/mult_alm_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/compute_weights_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/alm2map_cxx.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/syn_alm_cxx_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/healpix_map_fitsio.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/moc.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/udgrade_harmonic_cxx_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/healpix_map.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/healpix_tables.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/mult_alm.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/alm.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/healpix_base.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/udgrade_harmonic_cxx.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/moc_fitsio.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/alm_fitsio.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/healpix_tables.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/anafast_cxx.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/alm2map_cxx_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/calc_powspec.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/alm_healpix_tools.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/alm_fitsio.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/smoothing_cxx_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/hpxtest.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/alm_powspec_tools.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/powspec.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/anafast_cxx_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/healpix_map.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/powspec_fitsio.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/healpix_map_fitsio.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/weight_utils.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/udgrade_cxx_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/alm_powspec_tools.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/rotalm_cxx.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/healpix_data_io.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/powspec_fitsio.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/median_filter_cxx.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/healpix_data_io.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/needlet_tool.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/moc_fitsio.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/alm_healpix_tools.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/calc_powspec_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/moc_query.h Examining data/healpix-cxx-3.60.0/Healpix_cxx/median_filter_cxx_module.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/hotspots_cxx.cc Examining data/healpix-cxx-3.60.0/Healpix_cxx/weight_utils.h FINAL RESULTS: data/healpix-cxx-3.60.0/Healpix_cxx/map2tga_module.cc:320:19: [4] (shell) system: 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. int retcode = system((viewer+" "+outfile).c_str()); data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:381:5: [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 (ttype[m], cols[m].name().c_str()); data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:382:5: [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 (tunit[m], cols[m].unit().c_str()); data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:385:5: [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 (tform[m], x.str().c_str()); data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:402:5: [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 (ttype[m], cols[m].name().c_str()); data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:403:5: [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 (tunit[m], cols[m].unit().c_str()); data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:414:5: [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 (tform[m], x.str().c_str()); data/healpix-cxx-3.60.0/Healpix_cxx/alm_fitsio.cc:74:7: [2] (misc) open: 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). inp.open (filename); data/healpix-cxx-3.60.0/Healpix_cxx/alm_fitsio.cc:83:7: [2] (misc) open: 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). inp.open (filename); data/healpix-cxx-3.60.0/Healpix_cxx/alm_fitsio.cc:139:7: [2] (misc) open: 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). inp.open (filename); data/healpix-cxx-3.60.0/Healpix_cxx/healpix_data_io.cc:45:7: [2] (misc) open: 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). inp.open(weightfile); data/healpix-cxx-3.60.0/Healpix_cxx/healpix_data_io.cc:77:7: [2] (misc) open: 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). inp.open(weightfile); data/healpix-cxx-3.60.0/Healpix_cxx/healpix_data_io.cc:89:7: [2] (misc) open: 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). inp.open(file); data/healpix-cxx-3.60.0/Healpix_cxx/healpix_data_io.cc:99:7: [2] (misc) open: 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). inp.open(file); data/healpix-cxx-3.60.0/Healpix_cxx/healpix_map_fitsio.cc:97:7: [2] (misc) open: 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). inp.open (filename); data/healpix-cxx-3.60.0/Healpix_cxx/healpix_map_fitsio.cc:161:7: [2] (misc) open: 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). inp.open(filename); data/healpix-cxx-3.60.0/Healpix_cxx/hotspots_cxx_module.cc:63:28: [2] (misc) open: 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 (have_minfile) minout.open(minfile.c_str()); data/healpix-cxx-3.60.0/Healpix_cxx/hotspots_cxx_module.cc:64:28: [2] (misc) open: 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 (have_maxfile) maxout.open(maxfile.c_str()); data/healpix-cxx-3.60.0/Healpix_cxx/moc_fitsio.cc:41:7: [2] (misc) open: 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). inp.open (filename); data/healpix-cxx-3.60.0/Healpix_cxx/powspec_fitsio.cc:81:7: [2] (misc) open: 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). inp.open(infile); data/healpix-cxx-3.60.0/cxxsupport/bstream.h:232:10: [2] (misc) open: 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). void open (const char *fname, bool doswap_) data/healpix-cxx-3.60.0/cxxsupport/bstream.h:235:22: [2] (misc) open: 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). std::ifstream::open(fname,std::ios::binary); data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:152: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 msg[81]; data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:210: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 ttype[81], tunit[81], tform[81]; data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:227: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 ttype[81], tunit[81], tform[81]; data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:303:18: [2] (misc) open: 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). void fitshandle::open (const string &fname) data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:334: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 msg[81]; data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:510: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 card[81]; data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:522:7: [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 keyname[80]; data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:630: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 card[81]; data/healpix-cxx-3.60.0/cxxsupport/fitshandle.h:118:10: [2] (misc) open: 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). void open (const std::string &fname); data/healpix-cxx-3.60.0/cxxsupport/bstream.h:153:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). s.read (reinterpret_cast<char *> (data), num*sizeof(T)); data/healpix-cxx-3.60.0/cxxsupport/bstream.h:240:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (reinterpret_cast<char *> (&data), sizeof(T)); data/healpix-cxx-3.60.0/cxxsupport/bstream.h:246:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (reinterpret_cast<char *> (data), num*sizeof(T)); data/healpix-cxx-3.60.0/cxxsupport/fitshandle.cc:705:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tdata[m],data2[m].c_str(),stringlen-1); ANALYSIS SUMMARY: Hits = 35 Lines analyzed = 20334 in approximately 0.65 seconds (31150 lines/second) Physical Source Lines of Code (SLOC) = 14223 Hits@level = [0] 6 [1] 4 [2] 24 [3] 0 [4] 7 [5] 0 Hits@level+ = [0+] 41 [1+] 35 [2+] 31 [3+] 7 [4+] 7 [5+] 0 Hits/KSLOC@level+ = [0+] 2.88265 [1+] 2.4608 [2+] 2.17957 [3+] 0.492161 [4+] 0.492161 [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.