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/ccfits-2.5+dfsg/Table.cxx Examining data/ccfits-2.5+dfsg/Table.h Examining data/ccfits-2.5+dfsg/ImageExt.h Examining data/ccfits-2.5+dfsg/ExtHDU.cxx Examining data/ccfits-2.5+dfsg/HDU.h Examining data/ccfits-2.5+dfsg/Column.cxx Examining data/ccfits-2.5+dfsg/HDUCreator.cxx Examining data/ccfits-2.5+dfsg/KeyData.cxx Examining data/ccfits-2.5+dfsg/FITS.h Examining data/ccfits-2.5+dfsg/Image.h Examining data/ccfits-2.5+dfsg/FITS.cxx Examining data/ccfits-2.5+dfsg/ColumnData.h Examining data/ccfits-2.5+dfsg/Keyword.cxx Examining data/ccfits-2.5+dfsg/cookbook.cxx Examining data/ccfits-2.5+dfsg/FITSUtilT.h Examining data/ccfits-2.5+dfsg/ColumnT.h Examining data/ccfits-2.5+dfsg/FITSUtil.cxx Examining data/ccfits-2.5+dfsg/ColumnData.cxx Examining data/ccfits-2.5+dfsg/NewKeyword.h Examining data/ccfits-2.5+dfsg/FITSUtil.h Examining data/ccfits-2.5+dfsg/CCfits.h Examining data/ccfits-2.5+dfsg/KeywordCreator.cxx Examining data/ccfits-2.5+dfsg/FITSBase.cxx Examining data/ccfits-2.5+dfsg/KeyData.h Examining data/ccfits-2.5+dfsg/AsciiTable.h Examining data/ccfits-2.5+dfsg/PHDU.h Examining data/ccfits-2.5+dfsg/KeywordCreator.h Examining data/ccfits-2.5+dfsg/ColumnCreator.h Examining data/ccfits-2.5+dfsg/FITSBase.h Examining data/ccfits-2.5+dfsg/BinTable.cxx Examining data/ccfits-2.5+dfsg/KeywordT.h Examining data/ccfits-2.5+dfsg/ColumnCreator.cxx Examining data/ccfits-2.5+dfsg/PHDUT.h Examining data/ccfits-2.5+dfsg/MSconfig.h Examining data/ccfits-2.5+dfsg/BinTable.h Examining data/ccfits-2.5+dfsg/PrimaryHDU.h Examining data/ccfits-2.5+dfsg/ColumnVectorData.h Examining data/ccfits-2.5+dfsg/HDU.cxx Examining data/ccfits-2.5+dfsg/HDUCreator.h Examining data/ccfits-2.5+dfsg/AsciiTable.cxx Examining data/ccfits-2.5+dfsg/FitsError.h Examining data/ccfits-2.5+dfsg/ColumnVectorData.cxx Examining data/ccfits-2.5+dfsg/ExtHDU.h Examining data/ccfits-2.5+dfsg/FitsError.cxx Examining data/ccfits-2.5+dfsg/Column.h Examining data/ccfits-2.5+dfsg/PHDU.cxx Examining data/ccfits-2.5+dfsg/ExtHDUT.h Examining data/ccfits-2.5+dfsg/Keyword.h FINAL RESULTS: data/ccfits-2.5+dfsg/ColumnCreator.cxx:328:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(keyname, "%s%d",Column::TSCAL().c_str(),index); data/ccfits-2.5+dfsg/ColumnCreator.cxx:334:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(keyname, "%s%d", Column::TZERO().c_str(),index); data/ccfits-2.5+dfsg/AsciiTable.cxx:89:4: [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 hduName[FLEN_KEYWORD]; data/ccfits-2.5+dfsg/BinTable.cxx:80:4: [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 hduName[FLEN_KEYWORD]; data/ccfits-2.5+dfsg/CCfits.h:38:11: [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. extern char BSCALE[7]; data/ccfits-2.5+dfsg/CCfits.h:39:11: [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. extern char BZERO[6]; data/ccfits-2.5+dfsg/Column.cxx:333:21: [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 unsigned char puc[4]; data/ccfits-2.5+dfsg/FITS.cxx:98: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). int hduIdx = open(mode); data/ccfits-2.5+dfsg/FITS.cxx:150: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). int extSyntHdu = open(mode); data/ccfits-2.5+dfsg/FITS.cxx:178:26: [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). int extSyntHdu = open(mode); data/ccfits-2.5+dfsg/FITS.cxx:240:23: [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). int extSyntHdu = open(mode); data/ccfits-2.5+dfsg/FITS.cxx:315:26: [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). int extSyntHdu = open(mode); data/ccfits-2.5+dfsg/FITS.cxx:336:6: [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). open(mode); data/ccfits-2.5+dfsg/FITS.cxx:666:13: [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). int FITS::open (RWmode mode) data/ccfits-2.5+dfsg/FITS.cxx:725:15: [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). open(Write); data/ccfits-2.5+dfsg/FITS.h:827:13: [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). int open (RWmode mode = Read); data/ccfits-2.5+dfsg/FitsError.cxx:34:6: [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 cMessage[FLEN_ERRMSG]; data/ccfits-2.5+dfsg/HDU.cxx:352:10: [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 searchKey[FLEN_KEYWORD]; data/ccfits-2.5+dfsg/HDU.cxx:775: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. char card[FLEN_CARD]; data/ccfits-2.5+dfsg/HDUCreator.cxx:51: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 BSCALE[7] = {"BSCALE"}; data/ccfits-2.5+dfsg/HDUCreator.cxx:52: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 BZERO[6] = {"BZERO"}; data/ccfits-2.5+dfsg/Column.cxx:868:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Column::read(std::vector<String>& vals, long first, long last) data/ccfits-2.5+dfsg/Column.cxx:887:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Column::read(std::vector< std::complex<float> >& vals , long first, long last) data/ccfits-2.5+dfsg/Column.cxx:936:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Column::read(std::vector< std::complex<double> >& vals, long first, long last) data/ccfits-2.5+dfsg/Column.cxx:986:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Column::read(std::valarray<std::complex<float> >& vals, long row) data/ccfits-2.5+dfsg/Column.cxx:1040:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Column::read(std::valarray<std::complex<double> >& vals, long row) data/ccfits-2.5+dfsg/Column.cxx:1092:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Column::read(std::vector<std::complex<float> >& vals, long row) data/ccfits-2.5+dfsg/Column.cxx:1138:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Column::read(std::vector<std::complex<double> >& vals, long row) data/ccfits-2.5+dfsg/Column.h:1129:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::vector<S>& vals, long first, long last) ; data/ccfits-2.5+dfsg/Column.h:1132:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::vector< std::complex<float> >& , long first, long last); data/ccfits-2.5+dfsg/Column.h:1134:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::vector< std::complex<double> >& , long first, long last); data/ccfits-2.5+dfsg/Column.h:1136:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::vector<String>& vals, long first, long last); data/ccfits-2.5+dfsg/Column.h:1140:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::valarray<S>& vals, long first, long last) ; data/ccfits-2.5+dfsg/Column.h:1142:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::valarray<std::complex<float> >& vals, long first, long last) ; data/ccfits-2.5+dfsg/Column.h:1144:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::valarray<std::complex<double> >& vals, long first, long last) ; data/ccfits-2.5+dfsg/Column.h:1148:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::valarray<S>& vals, long rows) ; data/ccfits-2.5+dfsg/Column.h:1150:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::vector<S>& vals, long rows); data/ccfits-2.5+dfsg/Column.h:1151:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::valarray<std::complex<float> >& vals, long rows) ; data/ccfits-2.5+dfsg/Column.h:1152:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::valarray<std::complex<double> >& vals, long rows) ; data/ccfits-2.5+dfsg/Column.h:1153:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::vector<std::complex<float> >& vals, long rows) ; data/ccfits-2.5+dfsg/Column.h:1154:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::vector<std::complex<double> >& vals, long rows) ; data/ccfits-2.5+dfsg/Column.h:1169:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::vector<S>& vals, long first, long last, S* nullValue) ; data/ccfits-2.5+dfsg/Column.h:1173:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::valarray<S>& vals, long first, long last, S* nullValue); data/ccfits-2.5+dfsg/Column.h:1177:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::valarray<S>& vals, long rows, S* nullValue) ; data/ccfits-2.5+dfsg/Column.h:1180:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::vector<S>& vals, long rows, S* nullValue) ; data/ccfits-2.5+dfsg/ColumnT.h:42:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Column::read(std::vector<S>& vals, long first, long last) data/ccfits-2.5+dfsg/ColumnT.h:44:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(vals,first,last,static_cast<S*>(0)); data/ccfits-2.5+dfsg/ColumnT.h:49:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Column::read(std::vector<S>& vals, long first, long last, S* nullValue) data/ccfits-2.5+dfsg/ColumnT.h:196:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Column::read(std::valarray<S>& vals, long first, long last) data/ccfits-2.5+dfsg/ColumnT.h:198:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(vals,first,last,static_cast<S*>(0)); data/ccfits-2.5+dfsg/ColumnT.h:203:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Column::read(std::valarray<S>& vals, long first, long last, S* nullValue) data/ccfits-2.5+dfsg/ColumnT.h:354:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Column::read(std::valarray<S>& vals, long row) data/ccfits-2.5+dfsg/ColumnT.h:356:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(vals,row,static_cast<S*>(0)); data/ccfits-2.5+dfsg/ColumnT.h:359:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Column::read(std::vector<S>& vals, long row) data/ccfits-2.5+dfsg/ColumnT.h:361:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(vals,row,static_cast<S*>(0)); data/ccfits-2.5+dfsg/ColumnT.h:365:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Column::read(std::vector<S>& vals, long row, S* nullValue) data/ccfits-2.5+dfsg/ColumnT.h:519:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void Column::read(std::valarray<S>& vals, long row, S* nullValue) data/ccfits-2.5+dfsg/ExtHDU.cxx:174:7: [1] (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 character. strcpy(hduCstr,""); data/ccfits-2.5+dfsg/ExtHDU.cxx:183:8: [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(hduCstr) > 0) data/ccfits-2.5+dfsg/ExtHDU.h:534:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image) ; data/ccfits-2.5+dfsg/ExtHDU.h:537:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, data/ccfits-2.5+dfsg/ExtHDU.h:543:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, data/ccfits-2.5+dfsg/ExtHDU.h:549:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, data/ccfits-2.5+dfsg/ExtHDU.h:555:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, data/ccfits-2.5+dfsg/ExtHDU.h:560:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, data/ccfits-2.5+dfsg/ExtHDU.h:565:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, data/ccfits-2.5+dfsg/ExtHDUT.h:18:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void ExtHDU::read (std::valarray<S>& image) data/ccfits-2.5+dfsg/ExtHDUT.h:24:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(image,1,nElements,static_cast<S*>(0)); data/ccfits-2.5+dfsg/ExtHDUT.h:32:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void ExtHDU::read (std::valarray<S>& image, long first,long nElements) data/ccfits-2.5+dfsg/ExtHDUT.h:35:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(image, first,nElements,static_cast<S*>(0)); data/ccfits-2.5+dfsg/ExtHDUT.h:39:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void ExtHDU::read (std::valarray<S>& image, long first, long nElements, S* nulValue) data/ccfits-2.5+dfsg/ExtHDUT.h:134:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void ExtHDU::read (std::valarray<S>& image, const std::vector<long>& first, data/ccfits-2.5+dfsg/ExtHDUT.h:154:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(image, firstElement,nElements,nulValue); data/ccfits-2.5+dfsg/ExtHDUT.h:161:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void ExtHDU::read (std::valarray<S>& image, const std::vector<long>& first, data/ccfits-2.5+dfsg/ExtHDUT.h:165:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(image, first,nElements,static_cast<S*>(0)); data/ccfits-2.5+dfsg/ExtHDUT.h:170:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void ExtHDU::read (std::valarray<S>& image, const std::vector<long>& firstVertex, data/ccfits-2.5+dfsg/ExtHDUT.h:263:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void ExtHDU::read (std::valarray<S>& image, const std::vector<long>& firstVertex, data/ccfits-2.5+dfsg/ExtHDUT.h:268:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(image, firstVertex,lastVertex,stride,static_cast<S*>(0)); data/ccfits-2.5+dfsg/FITS.cxx:102:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(readDataFlag,primaryKeys); data/ccfits-2.5+dfsg/FITS.cxx:133:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(readDataFlag,primaryKeys); data/ccfits-2.5+dfsg/FITS.cxx:156:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(false,primaryKey); data/ccfits-2.5+dfsg/FITS.cxx:158:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(hduName, readDataFlag, hduKeys,version); data/ccfits-2.5+dfsg/FITS.cxx:180:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(readDataFlag,primaryKey); data/ccfits-2.5+dfsg/FITS.cxx:181:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(hduNames,readDataFlag); data/ccfits-2.5+dfsg/FITS.cxx:243:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(readDataFlag,primaryKeys); data/ccfits-2.5+dfsg/FITS.cxx:245:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(hduNames, hduKeys, readDataFlag, hduVersions); data/ccfits-2.5+dfsg/FITS.cxx:324:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(readDataFlag,primaryKey); data/ccfits-2.5+dfsg/FITS.cxx:326:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(hduIndex,readDataFlag,hduKeys); data/ccfits-2.5+dfsg/FITS.cxx:341:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(false,primaryKey); data/ccfits-2.5+dfsg/FITS.cxx:347:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(searchKeys, searchValues, readDataFlag, hduKeys, version); data/ccfits-2.5+dfsg/FITS.cxx:432:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void FITS::read (bool readDataFlag, const std::vector<String>& keys) data/ccfits-2.5+dfsg/FITS.cxx:443:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void FITS::read (const String &hduName, bool readDataFlag, const std::vector<String> &keys, int version) data/ccfits-2.5+dfsg/FITS.cxx:476:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void FITS::read (const std::vector<String> &hduNames, bool readDataFlag) data/ccfits-2.5+dfsg/FITS.cxx:484:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(hduNames[i], readDataFlag, dummy, 1); data/ccfits-2.5+dfsg/FITS.cxx:494:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void FITS::read (const std::vector<String> &hduNames, const std::vector<std::vector<String> > &keys, bool readDataFlag, const std::vector<int>& hduVersions) data/ccfits-2.5+dfsg/FITS.cxx:507:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(hduNames[i], readDataFlag, hduKeys, version); data/ccfits-2.5+dfsg/FITS.cxx:516:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void FITS::read (int hduIndex, bool readDataFlag, const std::vector<String> &keys) data/ccfits-2.5+dfsg/FITS.cxx:551:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void FITS::read (const std::vector<String>& searchKeys, const std::vector<String> &searchValues, bool readDataFlag, const std::vector<String>& hduKeys, int version) data/ccfits-2.5+dfsg/FITS.cxx:643:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(extname,readDataFlag,hduKeys,extver); data/ccfits-2.5+dfsg/FITS.h:755:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (const String &hduName, bool readDataFlag = false, const std::vector<String> &keys = std::vector<String>(), int version = 1); data/ccfits-2.5+dfsg/FITS.h:758:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (const std::vector<String> &hduNames, bool readDataFlag = false); data/ccfits-2.5+dfsg/FITS.h:760:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (const std::vector<String> &hduNames, const std::vector<std::vector<String> > &keys, bool readDataFlag = false, const std::vector<int>& hduVersions = std::vector<int>()); data/ccfits-2.5+dfsg/FITS.h:762:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (int hduIndex, // Construct and Read HDU specified by number. One can add further HDUs by number using data/ccfits-2.5+dfsg/FITS.h:771:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (const std::vector<String>& searchKeys, const std::vector<String> &searchValues, bool readDataFlag = false, const std::vector<String>& hduKeys = std::vector<String>(), int version = 1); data/ccfits-2.5+dfsg/FITS.h:824:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (bool readDataFlag = false, const std::vector<String>& keys = std::vector<String>()); data/ccfits-2.5+dfsg/FITSUtil.cxx:44:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(c[i],inArray[i].c_str(),m + 1); data/ccfits-2.5+dfsg/PHDU.h:336:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(std::valarray<S>& image) ; data/ccfits-2.5+dfsg/PHDU.h:339:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, long first,long nElements); data/ccfits-2.5+dfsg/PHDU.h:342:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, long first,long nElements, S* nullValue) ; data/ccfits-2.5+dfsg/PHDU.h:345:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, const std::vector<long>& first,long nElements) ; data/ccfits-2.5+dfsg/PHDU.h:348:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, const std::vector<long>& first, long nElements, data/ccfits-2.5+dfsg/PHDU.h:352:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, const std::vector<long>& firstVertex, data/ccfits-2.5+dfsg/PHDU.h:357:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read (std::valarray<S>& image, const std::vector<long>& firstVertex, data/ccfits-2.5+dfsg/PHDUT.h:20:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PHDU::read (std::valarray<S>& image) data/ccfits-2.5+dfsg/PHDUT.h:26:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(image,1,nElements,static_cast<S*>(0)); data/ccfits-2.5+dfsg/PHDUT.h:31:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PHDU::read (std::valarray<S>& image, long first,long nElements) data/ccfits-2.5+dfsg/PHDUT.h:33:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(image, first,nElements,static_cast<S*>(0)); data/ccfits-2.5+dfsg/PHDUT.h:37:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PHDU::read (std::valarray<S>& image, long first, long nElements, S* nullValue) data/ccfits-2.5+dfsg/PHDUT.h:132:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PHDU::read (std::valarray<S>& image, const std::vector<long>& first, data/ccfits-2.5+dfsg/PHDUT.h:152:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(image, firstElement,nElements,nullValue); data/ccfits-2.5+dfsg/PHDUT.h:159:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PHDU::read (std::valarray<S>& image, const std::vector<long>& first, data/ccfits-2.5+dfsg/PHDUT.h:162:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(image, first,nElements,static_cast<S*>(0)); data/ccfits-2.5+dfsg/PHDUT.h:167:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PHDU::read (std::valarray<S>& image, const std::vector<long>& firstVertex, data/ccfits-2.5+dfsg/PHDUT.h:261:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void PHDU::read (std::valarray<S>& image, const std::vector<long>& firstVertex, data/ccfits-2.5+dfsg/PHDUT.h:265:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(image, firstVertex,lastVertex,stride,static_cast<S*>(0)); data/ccfits-2.5+dfsg/cookbook.cxx:674:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image.read(contents); data/ccfits-2.5+dfsg/cookbook.cxx:716:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). table.column("fcomplex-roots").read( ff, 7 ); data/ccfits-2.5+dfsg/cookbook.cxx:719:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). table.column("scalar-complex").read(sf, 10, 15); data/ccfits-2.5+dfsg/cookbook.cxx:740:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). col.read(densities, 1, nRows); ANALYSIS SUMMARY: Hits = 129 Lines analyzed = 23980 in approximately 0.65 seconds (37089 lines/second) Physical Source Lines of Code (SLOC) = 15148 Hits@level = [0] 0 [1] 108 [2] 19 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 129 [1+] 129 [2+] 21 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 8.51598 [1+] 8.51598 [2+] 1.38632 [3+] 0.132031 [4+] 0.132031 [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.