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/pktools-2.6.7.6+ds/src/algorithms/StatFactory.h Examining data/pktools-2.6.7.6+ds/src/algorithms/Filter.h Examining data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp Examining data/pktools-2.6.7.6+ds/src/algorithms/ImgRegression.h Examining data/pktools-2.6.7.6+ds/src/algorithms/CostFactorySVM.cc Examining data/pktools-2.6.7.6+ds/src/algorithms/svm.h Examining data/pktools-2.6.7.6+ds/src/algorithms/FeatureSelector.h Examining data/pktools-2.6.7.6+ds/src/algorithms/ImgRegression.cc Examining data/pktools-2.6.7.6+ds/src/algorithms/Egcs.cc Examining data/pktools-2.6.7.6+ds/src/algorithms/Egcs.h Examining data/pktools-2.6.7.6+ds/src/algorithms/ConfusionMatrix.h Examining data/pktools-2.6.7.6+ds/src/algorithms/Filter.cc Examining data/pktools-2.6.7.6+ds/src/algorithms/myfann_cpp.h Examining data/pktools-2.6.7.6+ds/src/algorithms/Filter2d.h Examining data/pktools-2.6.7.6+ds/src/algorithms/ConfusionMatrix.cc Examining data/pktools-2.6.7.6+ds/src/algorithms/CostFactorySVM.h Examining data/pktools-2.6.7.6+ds/src/algorithms/OptFactory.h Examining data/pktools-2.6.7.6+ds/src/algorithms/CostFactory.h Examining data/pktools-2.6.7.6+ds/src/algorithms/Filter2d.cc Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderGdal.cc Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgRasterGdal.h Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgRasterGdal.cc Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderGdal.h Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterGdal.h Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.h Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgUpdaterGdal.cc Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterGdal.cc Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgUpdaterGdal.h Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgGdal.h Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderOgr.cc Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.cc Examining data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderOgr.h Examining data/pktools-2.6.7.6+ds/src/base/IndexValue.h Examining data/pktools-2.6.7.6+ds/src/base/Optionpk.h Examining data/pktools-2.6.7.6+ds/src/base/Vector2d.cc Examining data/pktools-2.6.7.6+ds/src/base/PosValue.h Examining data/pktools-2.6.7.6+ds/src/base/pktestOption.cc Examining data/pktools-2.6.7.6+ds/src/base/Vector2d.h Examining data/pktools-2.6.7.6+ds/src/fileclasses/FileReaderAscii.cc Examining data/pktools-2.6.7.6+ds/src/fileclasses/FileReaderAscii.h Examining data/pktools-2.6.7.6+ds/src/apps/pkdsm2shadow.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkcomposite.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkreclassogr.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkfillnodata.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkgetmask.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkstat.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkinfo.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkpolygonize.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkascii2ogr.cc Examining data/pktools-2.6.7.6+ds/src/apps/pklas2img.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkegcs.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkcrop.cc Examining data/pktools-2.6.7.6+ds/src/apps/pksieve.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkstatascii.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkcreatect.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkstatprofile.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkannogr.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkextractimg.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkfssvm.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkfsann.h Examining data/pktools-2.6.7.6+ds/src/apps/pkdumpogr.h Examining data/pktools-2.6.7.6+ds/src/apps/pkreclass.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkoptsvm.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkfilterascii.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkdumpimg.cc Examining data/pktools-2.6.7.6+ds/src/apps/pksvmogr.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkfilterdem.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkfsann.cc Examining data/pktools-2.6.7.6+ds/src/apps/pksensormodel.h Examining data/pktools-2.6.7.6+ds/src/apps/pkdumpogr.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkfilter.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkstatogr.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkann.cc Examining data/pktools-2.6.7.6+ds/src/apps/pksetmask.cc Examining data/pktools-2.6.7.6+ds/src/apps/pksvm.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkregann.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkascii2img.cc Examining data/pktools-2.6.7.6+ds/src/apps/pkextractogr.cc Examining data/pktools-2.6.7.6+ds/src/lasclasses/FileReaderLas.h Examining data/pktools-2.6.7.6+ds/src/lasclasses/FileReaderLas.cc Examining data/pktools-2.6.7.6+ds/config.h FINAL RESULTS: data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:55:2: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(buf,fmt,ap); data/pktools-2.6.7.6+ds/src/algorithms/ImgRegression.cc:41:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/algorithms/ImgRegression.cc:102:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/algorithms/ImgRegression.cc:163:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/algorithms/ImgRegression.cc:238:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/algorithms/ImgRegression.cc:289:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/algorithms/ImgRegression.cc:340:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pkann.cc:426:11: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pkann.cc:552:9: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pkannogr.cc:414:11: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pkannogr.cc:540:9: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pkextractimg.cc:292:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pkextractogr.cc:328:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pkfsann.cc:509:7: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pkfssvm.cc:554:7: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pkoptsvm.cc:463:7: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pkstat.cc:214:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:489:11: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:623:9: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pksvmogr.cc:477:11: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/apps/pksvmogr.cc:611:9: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/pktools-2.6.7.6+ds/src/algorithms/Filter.h:122:33: [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). m_filterMap["open"]=filter::open; data/pktools-2.6.7.6+ds/src/algorithms/Filter2d.cc:220:9: [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). input.open(inputFilename); data/pktools-2.6.7.6+ds/src/algorithms/Filter2d.cc:221: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). output.open(outputFilename,input); data/pktools-2.6.7.6+ds/src/algorithms/Filter2d.cc:338:9: [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). input.open(inputFilename); data/pktools-2.6.7.6+ds/src/algorithms/Filter2d.cc:339: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). output.open(outputFilename,input); data/pktools-2.6.7.6+ds/src/algorithms/Filter2d.cc:347:9: [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). input.open(inputFilename); data/pktools-2.6.7.6+ds/src/algorithms/Filter2d.cc:348: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). output.open(outputFilename,input); data/pktools-2.6.7.6+ds/src/algorithms/Filter2d.h:145:35: [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). m_filterMap["open"]=filter2d::open; data/pktools-2.6.7.6+ds/src/algorithms/StatFactory.h:961:16: [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). outputfile.open(filename.c_str()); data/pktools-2.6.7.6+ds/src/algorithms/StatFactory.h:1065:16: [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). outputfile.open(filename.c_str()); data/pktools-2.6.7.6+ds/src/algorithms/StatFactory.h:1141:16: [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). outputfile.open(filename.c_str()); data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:26: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((void *)dst,(void *)src,sizeof(T)*n); data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:52: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[BUFSIZ]; data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:2615:13: [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 *fp = fopen(model_file_name,"w"); data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:2730:13: [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 *fp = fopen(model_file_name,"rb"); data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:2746: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 cmd[81]; data/pktools-2.6.7.6+ds/src/apps/pkann.cc:275:20: [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). extentReader.open(mask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkann.cc:291: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). activeWriter.open(active_opt[0],ogrformat_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkann.cc:747:17: [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). testImage.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkann.cc:758:21: [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). priorReader.open(priorimg_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkann.cc:795: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). classImageBag.open(classBag_opt[0],ncol,nrow,nbag,GDT_Byte,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkann.cc:800:21: [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). classImageOut.open(output_opt[0],ncol,nrow,1,GDT_Byte,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkann.cc:807:19: [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). probImage.open(prob_opt[0],ncol,nrow,nclass,GDT_Byte,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkann.cc:813: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). entropyImage.open(entropy_opt[0],ncol,nrow,1,GDT_Byte,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkann.cc: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). maskWriter.open("/vsimem/mask.tif",ncol,nrow,1,GDT_Float32,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkann.cc:852:20: [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). maskReader.open(mask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkannogr.cc:263:20: [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). extentReader.open(mask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkannogr.cc:279: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). activeWriter.open(active_opt[0],ogrformat_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkannogr.cc:730: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). imgReaderOgr.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkannogr.cc:744:20: [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). imgReaderOgr.open(input_opt[ivalidation]); data/pktools-2.6.7.6+ds/src/apps/pkannogr.cc:750: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). imgWriterOgr.open(output_opt[ivalidation],imgReaderOgr); data/pktools-2.6.7.6+ds/src/apps/pkascii2img.cc:183: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). imgWriter.open(output_opt[0],ncol,nrow,1,dataType,imageType_opt[0],option_opt); data/pktools-2.6.7.6+ds/src/apps/pkascii2ogr.cc:149: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). imgWriter.open(output_opt[0],ogrformat_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkcomposite.cc:347:20: [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). extentReader.open(extent_opt[iextent]); data/pktools-2.6.7.6+ds/src/apps/pkcomposite.cc:379:20: [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). extentReader.open(extent_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkcomposite.cc:393:24: [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). imgReader[ifile].open(input_opt[ifile],GA_ReadOnly); data/pktools-2.6.7.6+ds/src/apps/pkcomposite.cc:607: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). imgWriter.open(output_opt[0],ncol,nrow,nwriteBand,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkcomposite.cc:646: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). maskWriter.open("/vsimem/mask.tif",ncol,nrow,1,GDT_Float32,"GTiff",option_opt); data/pktools-2.6.7.6+ds/src/apps/pkcomposite.cc:683: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). maskReader.open(mask_opt[0],GA_ReadOnly); data/pktools-2.6.7.6+ds/src/apps/pkcreatect.cc:172: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). legendWriter.open(legend_opt[0],ncol,nrow,1,GDT_Byte,oformat_opt[0],option_opt); data/pktools-2.6.7.6+ds/src/apps/pkcreatect.cc:203: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). imgWriter.open(output_opt[0],imgReader.nrOfCol(),imgReader.nrOfRow(),1,GDT_Byte,oformat_opt[0],option_opt); data/pktools-2.6.7.6+ds/src/apps/pkcrop.cc:283:17: [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). imgReader.open(input_opt[iimg],GA_ReadOnly); data/pktools-2.6.7.6+ds/src/apps/pkcrop.cc:342: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). extentReader.open(extent_opt[iextent]); data/pktools-2.6.7.6+ds/src/apps/pkcrop.cc:380:20: [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). extentReader.open(extent_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkcrop.cc:427: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). maskWriter.open("/vsimem/mask.tif",ncropcol,ncroprow,1,GDT_Float32,"GTiff",option_opt); data/pktools-2.6.7.6+ds/src/apps/pkcrop.cc:456: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). maskReader.open(mask_opt[0],GA_ReadOnly); data/pktools-2.6.7.6+ds/src/apps/pkcrop.cc:491:17: [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). imgReader.open(input_opt[iimg],GA_ReadOnly); data/pktools-2.6.7.6+ds/src/apps/pkcrop.cc:624:19: [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). imgWriter.open(output_opt[0],ncropcol,ncroprow,ncropband,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:232:21: [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). inputReader.open(input_opt[0]);//,imagicX_opt[0],imagicY_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:290:24: [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). referenceReaderOgr.open(reference_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:319: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). inputReader.open(input_opt[iinput]);//,imagicX_opt[0],imagicY_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:321:24: [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). maskReader.open(mask_opt[iinput]); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:325:30: [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). referenceReaderOgr.open(reference_opt[iref]); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:337: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). ogrWriter.open(output_opt[iref],ogrformat_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:678:19: [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). inputReader.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:680:20: [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). maskReader.open(mask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:689:20: [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). gdalWriter.open(output_opt[0],inputReader.nrOfCol(),inputReader.nrOfRow(),1,inputReader.getDataType(),oformat_opt[0],option_opt); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:724:27: [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). referenceReaderGdal.open(reference_opt[0]);//,rmagicX_opt[0],rmagicY_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkdiff.cc:944: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). outputFile.open(cmoutput_opt[0].c_str(),ios::out); data/pktools-2.6.7.6+ds/src/apps/pkdsm2shadow.cc:132:9: [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). input.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkdsm2shadow.cc:166:12: [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). output.open(output_opt[0],input.nrOfCol(),input.nrOfRow(),input.nrOfBand(),theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkdumpimg.cc:142: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). outputStream.open(output_opt[0].c_str()); data/pktools-2.6.7.6+ds/src/apps/pkdumpimg.cc:195:20: [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). extentReader.open(extent_opt[iextent]); data/pktools-2.6.7.6+ds/src/apps/pkdumpogr.cc:116:17: [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). inputReader.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkdumpogr.cc:123:16: [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). outputFile.open(output_opt[0].c_str(),ios::out); data/pktools-2.6.7.6+ds/src/apps/pkdumpogr.h:56:20: [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). imgReaderShape.open(filename); data/pktools-2.6.7.6+ds/src/apps/pkdumpogr.h:76:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int iband=atoi(fieldname.c_str()); data/pktools-2.6.7.6+ds/src/apps/pkegcs.cc:107: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). imgReader.open(image_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkextractimg.cc:194: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). imgReader.open(image_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkextractimg.cc:301:19: [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). classReader.open(sample_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkextractimg.cc:317:19: [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). classReader.open(sample_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkextractimg.cc:439:19: [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). ogrWriter.open(output_opt[0],ogrformat_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkextractimg.cc:546:19: [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). classReader.open(sample_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkextractimg.cc:669:19: [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). ogrWriter.open(output_opt[0],ogrformat_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkextractogr.cc:248: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). imgReader.open(image_opt[0],GA_ReadOnly); data/pktools-2.6.7.6+ds/src/apps/pkextractogr.cc:338: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). sampleReaderOgr.open(sample_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkextractogr.cc:347: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). sampleWriterOgr.open("/vsimem/virtual",ogrformat_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkextractogr.cc:421: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). sampleReaderOgr.open("/vsimem/virtual"); data/pktools-2.6.7.6+ds/src/apps/pkextractogr.cc:451:17: [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). ogrWriter.open(output_opt[0],ogrformat_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkfilter.cc:365:9: [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). input.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkfilter.cc:412: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). case(filter2d::open): data/pktools-2.6.7.6+ds/src/apps/pkfilter.cc:499:12: [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). output.open(output_opt[0],(input.nrOfCol()+down_opt[0]-1)/down_opt[0],(input.nrOfRow()+down_opt[0]-1)/down_opt[0],nband,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkfilter.cc:640: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). srfFile.open(srf_opt[isrf].c_str()); data/pktools-2.6.7.6+ds/src/apps/pkfilter.cc:740:14: [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). tmpout.open("/vsimem/dilation.tif",input.nrOfCol(),input.nrOfRow(),input.nrOfBand(),input.getDataType(),input.getImageType()); data/pktools-2.6.7.6+ds/src/apps/pkfilter.cc:755: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). tmpin.open("/vsimem/dilation.tif"); data/pktools-2.6.7.6+ds/src/apps/pkfilter.cc:770:20: [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). case(filter2d::open):{//opening data/pktools-2.6.7.6+ds/src/apps/pkfilter.cc:776:14: [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). tmpout.open("/vsimem/erosion.tif",input.nrOfCol(),input.nrOfRow(),input.nrOfBand(),input.getDataType(),input.getImageType()); data/pktools-2.6.7.6+ds/src/apps/pkfilter.cc:792:8: [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). tmpin.open("/vsimem/erosion.tif"); data/pktools-2.6.7.6+ds/src/apps/pkfilterascii.cc:187: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). srfFile.open(srf_opt[isrf].c_str()); data/pktools-2.6.7.6+ds/src/apps/pkfilterascii.cc:270: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). outputStream.open(output_opt[0].c_str(),ios::out); data/pktools-2.6.7.6+ds/src/apps/pkfilterdem.cc:145:9: [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). input.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkfilterdem.cc:175:16: [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). outputWriter.open(output_opt[0],input.nrOfCol(),input.nrOfRow(),1,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkgetmask.cc:199: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). imgWriter.open(output_opt[0],imgReader.nrOfCol(),imgReader.nrOfRow(),1,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkinfo.cc:193: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). extentReader.open(extent_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkinfo.cc:212: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). imgReader.open(input_opt[ifile]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:270:19: [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). imgReaderModel1.open(model_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:272:16: [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). imgReaderObs.open(observation_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:277:25: [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). imgReaderModel1Mask.open(modelmask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:281: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). imgReaderObsMask.open(observationmask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:412:20: [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). imgWriterEst.open(outputfw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:416: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). imgWriterUncert.open(uncertfw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:423:19: [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). imgWriterGain.open(gain_opt[0],ncol,nrow,nmodel,GDT_Float64,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:439:21: [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). imgReaderModel1.open(model_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:443:25: [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). imgReaderModel1Mask.open(modelmask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:566: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). imgReaderObs.open(observation_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:570: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). imgReaderObsMask.open(observationmask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:756:17: [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). imgUpdaterEst.open(outputfw_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:758:20: [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). imgUpdaterUncert.open(uncertfw_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:769:21: [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). imgReaderModel1.open(model_opt[modindex-1]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:771:21: [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). imgReaderModel2.open(model_opt[modindex]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:775:25: [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). imgReaderModel1Mask.open(modelmask_opt[modindex-1]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:777:25: [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). imgReaderModel2Mask.open(modelmask_opt[modindex]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:791:20: [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). imgReaderObs.open(observation_opt[obsindex]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:796:24: [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). imgReaderObsMask.open(observationmask_opt[obsindex]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1143:20: [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). imgWriterEst.open(outputbw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1147: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). imgWriterUncert.open(uncertbw_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1170:21: [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). imgReaderModel1.open(model_opt.back()); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1174:25: [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). imgReaderModel1Mask.open(modelmask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1296: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). imgReaderObs.open(observation_opt.back()); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1300: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). imgReaderObsMask.open(observationmask_opt.back()); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1486:17: [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). imgUpdaterEst.open(outputbw_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1488:20: [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). imgUpdaterUncert.open(uncertbw_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1499:21: [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). imgReaderModel1.open(model_opt[modindex+1]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1501:21: [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). imgReaderModel2.open(model_opt[modindex]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1505:25: [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). imgReaderModel1Mask.open(modelmask_opt[modindex-1]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1507:25: [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). imgReaderModel2Mask.open(modelmask_opt[modindex]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1521:20: [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). imgReaderObs.open(observation_opt[obsindex]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1526:24: [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). imgReaderObsMask.open(observationmask_opt[obsindex]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1883: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). imgWriterEst.open(outputfb_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1888:21: [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). imgWriterUncert.open(uncertfb_opt[0],ncol,nrow,nmodel,theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1919: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). imgReaderObs.open(observation_opt[obsindex]); data/pktools-2.6.7.6+ds/src/apps/pkkalman.cc:1924: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). imgReaderObsMask.open(observationmask_opt[obsindex]); data/pktools-2.6.7.6+ds/src/apps/pklas2img.cc:211:17: [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). lasReader.open(input_opt[iinput]); data/pktools-2.6.7.6+ds/src/apps/pklas2img.cc:278:16: [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). outputWriter.open(output_opt[0],ncol,nrow,nband,theType,oformat_opt[0],option_opt); data/pktools-2.6.7.6+ds/src/apps/pklas2img.cc:309:17: [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). lasReader.open(input_opt[iinput]); data/pktools-2.6.7.6+ds/src/apps/pkpolygonize.cc:133:16: [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). maskReader.open(mask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkreclass.cc:137:14: [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). codefile.open(code_opt[0].c_str()); data/pktools-2.6.7.6+ds/src/apps/pkreclass.cc:171:17: [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). inputReader.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkreclass.cc:175:25: [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). maskReader[imask].open(mask_opt[imask]); data/pktools-2.6.7.6+ds/src/apps/pkreclass.cc:202: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). outputWriter.open(output_opt[0],inputReader.nrOfCol(),inputReader.nrOfRow(),inputReader.nrOfBand(),theType,oformat_opt[0],option_opt); data/pktools-2.6.7.6+ds/src/apps/pkreclassogr.cc:111:14: [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). codefile.open(code_opt[0].c_str()); data/pktools-2.6.7.6+ds/src/apps/pkreclassogr.cc:140: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). ogrReader.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkregann.cc:139: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). inputFile.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkregann.cc:371: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). outputStream.open(output_opt[0].c_str(),ios::out); data/pktools-2.6.7.6+ds/src/apps/pksetmask.cc:133: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). maskReader[imask].open(mask_opt[imask]); data/pktools-2.6.7.6+ds/src/apps/pksetmask.cc:139: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). inputReader.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pksetmask.cc:171: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). outputWriter.open(output_opt[0],inputReader.nrOfCol(),inputReader.nrOfRow(),inputReader.nrOfBand(),theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pksieve.cc:124:16: [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). maskReader.open(mask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pksieve.cc:138:16: [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). outputWriter.open(output_opt[0],inputReader); data/pktools-2.6.7.6+ds/src/apps/pkstat.cc:237:17: [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). imgReader.open(input_opt[ifile]); data/pktools-2.6.7.6+ds/src/apps/pkstatogr.cc:133: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). imgReader.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkstatprofile.cc:165:11: [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). input.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pkstatprofile.cc:201:12: [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). output.open(output_opt[0],input.nrOfCol(),input.nrOfRow(),function_opt.size(),theType,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:326:20: [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). extentReader.open(mask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:343: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). activeWriter.open(active_opt[0],ogrformat_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:761:17: [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). testImage.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:772:21: [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). priorReader.open(priorimg_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:809: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). classImageBag.open(classBag_opt[0],ncol,nrow,nbag,GDT_Byte,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:814:21: [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). classImageOut.open(output_opt[0],ncol,nrow,1,GDT_Byte,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:821:19: [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). probImage.open(prob_opt[0],ncol,nrow,nclass,GDT_Byte,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:827: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). entropyImage.open(entropy_opt[0],ncol,nrow,1,GDT_Byte,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:841: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). maskWriter.open("/vsimem/mask.tif",ncol,nrow,1,GDT_Float32,imageType,option_opt); data/pktools-2.6.7.6+ds/src/apps/pksvm.cc:866:20: [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). maskReader.open(mask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pksvmogr.cc:314:20: [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). extentReader.open(mask_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pksvmogr.cc:331: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). activeWriter.open(active_opt[0],ogrformat_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pksvmogr.cc:745: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). imgReaderOgr.open(input_opt[0]); data/pktools-2.6.7.6+ds/src/apps/pksvmogr.cc:759:20: [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). imgReaderOgr.open(input_opt[ivalidation]); data/pktools-2.6.7.6+ds/src/apps/pksvmogr.cc:765: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). imgWriterOgr.open(output_opt[ivalidation],imgReaderOgr); data/pktools-2.6.7.6+ds/src/fileclasses/FileReaderAscii.cc:30:3: [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(filename); data/pktools-2.6.7.6+ds/src/fileclasses/FileReaderAscii.cc:35:3: [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(filename); data/pktools-2.6.7.6+ds/src/fileclasses/FileReaderAscii.cc:42: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). void FileReaderAscii::open(const std::string& filename){ data/pktools-2.6.7.6+ds/src/fileclasses/FileReaderAscii.cc:44:14: [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). m_ifstream.open(filename.c_str(),std::ios_base::in); data/pktools-2.6.7.6+ds/src/fileclasses/FileReaderAscii.h:38:8: [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& filename); data/pktools-2.6.7.6+ds/src/imageclasses/ImgGdal.h:31:47: [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). ImgUpdaterGdal(const std::string& filename){open(filename);}; data/pktools-2.6.7.6+ds/src/imageclasses/ImgGdal.h:33:8: [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& filename); data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderGdal.cc:36:21: [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 ImgReaderGdal::open(const std::string& filename, const GDALAccess& readMode) data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderGdal.h:42:86: [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). ImgReaderGdal(const std::string& filename, const GDALAccess& readMode=GA_ReadOnly){open(filename, readMode);}; data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderGdal.h:46:8: [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& filename, const GDALAccess& readMode=GA_ReadOnly); data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderOgr.cc:32:3: [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(filename); data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderOgr.cc:41:20: [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 ImgReaderOgr::open(const std::string& filename) data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderOgr.cc:310:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int theBand=atoi(digitString.c_str()); data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderOgr.cc:399:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int iband=atoi(digitString.c_str()); data/pktools-2.6.7.6+ds/src/imageclasses/ImgReaderOgr.h:41:8: [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& filename); data/pktools-2.6.7.6+ds/src/imageclasses/ImgUpdaterGdal.cc:30:3: [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(filename,readMode); data/pktools-2.6.7.6+ds/src/imageclasses/ImgUpdaterGdal.cc:46: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). void ImgUpdaterGdal::open(const std::string& filename, const GDALAccess& readMode) data/pktools-2.6.7.6+ds/src/imageclasses/ImgUpdaterGdal.cc:48: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). ImgReaderGdal::open(filename,readMode); data/pktools-2.6.7.6+ds/src/imageclasses/ImgUpdaterGdal.h:37:8: [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& filename, const GDALAccess& readMode=GA_Update); data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterGdal.cc:43:21: [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 ImgWriterGdal::open(const std::string& filename, const ImgReaderGdal& imgSrc, const std::vector<std::string>& options) data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterGdal.cc:63:21: [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 ImgWriterGdal::open(const std::string& filename, int ncol, int nrow, int nband, const GDALDataType& dataType, const std::string& imageType, const std::vector<std::string>& options) data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterGdal.h:43:143: [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). ImgWriterGdal(const std::string& filename, const ImgReaderGdal& imgSrc, const std::vector<std::string>& options=std::vector<std::string>()){open(filename, imgSrc, options);}; data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterGdal.h:45:205: [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). ImgWriterGdal(const std::string& filename, int ncol, int nrow, int nband, const GDALDataType& dataType, const std::string& imageType, const std::vector<std::string>& options=std::vector<std::string>()){open(filename, ncol, nrow, nband, dataType, imageType, options);}; data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterGdal.h:50:8: [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& filename, const ImgReaderGdal& imgSrc, const std::vector<std::string>& options=std::vector<std::string>()); data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterGdal.h:52:8: [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& filename, int ncol, int nrow, int nband, const GDALDataType& dataType, const std::string& imageType, const std::vector<std::string>& options=std::vector<std::string>()); data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.cc:37:3: [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(filename,imageType); data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.cc:107:20: [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 ImgWriterOgr::open(const std::string& filename, ImgReaderOgr& imgReaderOgr) data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.cc:119:20: [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 ImgWriterOgr::open(const std::string& filename, const std::string& imageType) data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.cc:558:46: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pointFeature->SetField(fieldId,atoi(value.c_str())); data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.cc:560:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). polyFeature->SetField(fieldId,atoi(value.c_str())); data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.cc:622:46: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pointFeature->SetField(fieldId,atoi(value.c_str())); data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.cc:624:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). polyFeature->SetField(fieldId,atoi(value.c_str())); data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.h:43:8: [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& filename, ImgReaderOgr& imgReaderOgr); data/pktools-2.6.7.6+ds/src/imageclasses/ImgWriterOgr.h:44:8: [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& filename, const std::string& imageType="ESRI Shapefile"); data/pktools-2.6.7.6+ds/src/lasclasses/FileReaderLas.cc:57:3: [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(filename); data/pktools-2.6.7.6+ds/src/lasclasses/FileReaderLas.cc:68:21: [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 FileReaderLas::open(const std::string& filename) data/pktools-2.6.7.6+ds/src/lasclasses/FileReaderLas.cc:85: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). m_ifstream->open(m_filename.c_str(),std::ios::in|std::ios::binary); data/pktools-2.6.7.6+ds/src/lasclasses/FileReaderLas.h:45:8: [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& filename); data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:2721: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). len = (int) strlen(line); data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:2749:3: [1] (buffer) fscanf: 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. fscanf(fp,"%80s",cmd); data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:2753:4: [1] (buffer) fscanf: 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. fscanf(fp,"%80s",cmd); data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:2778:4: [1] (buffer) fscanf: 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. fscanf(fp,"%80s",cmd); data/pktools-2.6.7.6+ds/src/algorithms/svm.cpp:2850:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = getc(fp); ANALYSIS SUMMARY: Hits = 232 Lines analyzed = 45024 in approximately 1.41 seconds (31831 lines/second) Physical Source Lines of Code (SLOC) = 33497 Hits@level = [0] 43 [1] 5 [2] 206 [3] 20 [4] 1 [5] 0 Hits@level+ = [0+] 275 [1+] 232 [2+] 227 [3+] 21 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 8.20969 [1+] 6.92599 [2+] 6.77673 [3+] 0.626922 [4+] 0.0298534 [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.