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/clonalorigin-1.0/gui/colouredimpl.cpp Examining data/clonalorigin-1.0/gui/colouredimpl.h Examining data/clonalorigin-1.0/gui/densityontree.cpp Examining data/clonalorigin-1.0/gui/densityontree.h Examining data/clonalorigin-1.0/gui/gelmanrubinimpl.cpp Examining data/clonalorigin-1.0/gui/gelmanrubinimpl.h Examining data/clonalorigin-1.0/gui/gui.cpp Examining data/clonalorigin-1.0/gui/heatimpl.cpp Examining data/clonalorigin-1.0/gui/heatimpl.h Examining data/clonalorigin-1.0/gui/mainapplicationdbusadaptor.h Examining data/clonalorigin-1.0/gui/mainwindowimpl.cpp Examining data/clonalorigin-1.0/gui/mainwindowimpl.h Examining data/clonalorigin-1.0/gui/outputfile.cpp Examining data/clonalorigin-1.0/gui/outputfile.h Examining data/clonalorigin-1.0/gui/paramcons.cpp Examining data/clonalorigin-1.0/gui/paramcons.h Examining data/clonalorigin-1.0/gui/paramconsmult.cpp Examining data/clonalorigin-1.0/gui/paramconsmult.h Examining data/clonalorigin-1.0/gui/parammr.cpp Examining data/clonalorigin-1.0/gui/parammr.h Examining data/clonalorigin-1.0/gui/paramqt.cpp Examining data/clonalorigin-1.0/gui/paramqt.h Examining data/clonalorigin-1.0/gui/paramtreecons.cpp Examining data/clonalorigin-1.0/gui/paramtreecons.h Examining data/clonalorigin-1.0/gui/pdimpl.cpp Examining data/clonalorigin-1.0/gui/pdimpl.h Examining data/clonalorigin-1.0/gui/pheatimpl.cpp Examining data/clonalorigin-1.0/gui/pheatimpl.h Examining data/clonalorigin-1.0/gui/plotimpl.cpp Examining data/clonalorigin-1.0/gui/plotimpl.h Examining data/clonalorigin-1.0/warg/src/data.cpp Examining data/clonalorigin-1.0/warg/src/data.h Examining data/clonalorigin-1.0/warg/src/exponential.h Examining data/clonalorigin-1.0/warg/src/metropolis.cpp Examining data/clonalorigin-1.0/warg/src/metropolis.h Examining data/clonalorigin-1.0/warg/src/move.cpp Examining data/clonalorigin-1.0/warg/src/move.h Examining data/clonalorigin-1.0/warg/src/moveaddedge.cpp Examining data/clonalorigin-1.0/warg/src/moveaddedge.h Examining data/clonalorigin-1.0/warg/src/moveageclonal.cpp Examining data/clonalorigin-1.0/warg/src/moveageclonal.h Examining data/clonalorigin-1.0/warg/src/movedelta.cpp Examining data/clonalorigin-1.0/warg/src/movedelta.h Examining data/clonalorigin-1.0/warg/src/moveedgechange.cpp Examining data/clonalorigin-1.0/warg/src/moveedgechange.h Examining data/clonalorigin-1.0/warg/src/movegreedytree.cpp Examining data/clonalorigin-1.0/warg/src/movegreedytree.h Examining data/clonalorigin-1.0/warg/src/moveregraftclonal.cpp Examining data/clonalorigin-1.0/warg/src/moveregraftclonal.h Examining data/clonalorigin-1.0/warg/src/moveremedge.cpp Examining data/clonalorigin-1.0/warg/src/moveremedge.h Examining data/clonalorigin-1.0/warg/src/moverho.cpp Examining data/clonalorigin-1.0/warg/src/moverho.h Examining data/clonalorigin-1.0/warg/src/movescaletree.cpp Examining data/clonalorigin-1.0/warg/src/movescaletree.h Examining data/clonalorigin-1.0/warg/src/movesitechange.cpp Examining data/clonalorigin-1.0/warg/src/movesitechange.h Examining data/clonalorigin-1.0/warg/src/movetheta.cpp Examining data/clonalorigin-1.0/warg/src/movetheta.h Examining data/clonalorigin-1.0/warg/src/movetimechange.cpp Examining data/clonalorigin-1.0/warg/src/movetimechange.h Examining data/clonalorigin-1.0/warg/src/mpiutils.cpp Examining data/clonalorigin-1.0/warg/src/mpiutils.h Examining data/clonalorigin-1.0/warg/src/mydata.cpp Examining data/clonalorigin-1.0/warg/src/node.cpp Examining data/clonalorigin-1.0/warg/src/node.h Examining data/clonalorigin-1.0/warg/src/param.cpp Examining data/clonalorigin-1.0/warg/src/param.h Examining data/clonalorigin-1.0/warg/src/recedge.cpp Examining data/clonalorigin-1.0/warg/src/recedge.h Examining data/clonalorigin-1.0/warg/src/rectree.cpp Examining data/clonalorigin-1.0/warg/src/rectree.h Examining data/clonalorigin-1.0/warg/src/rng.cpp Examining data/clonalorigin-1.0/warg/src/rng.h Examining data/clonalorigin-1.0/warg/src/slotallocator.h Examining data/clonalorigin-1.0/warg/src/tree.cpp Examining data/clonalorigin-1.0/warg/src/tree.h Examining data/clonalorigin-1.0/warg/src/wargxml.cpp Examining data/clonalorigin-1.0/warg/src/wargxml.h Examining data/clonalorigin-1.0/warg/src/weakarg.cpp Examining data/clonalorigin-1.0/warg/src/weakarg.h FINAL RESULTS: data/clonalorigin-1.0/gui/outputfile.cpp:330:12: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. stream = popen(cmd.c_str(), "r"); data/clonalorigin-1.0/warg/src/mpiutils.cpp:66:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, ss.str().c_str()); data/clonalorigin-1.0/gui/gui.cpp:99: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/clonalorigin-1.0/gui/gui.cpp:120:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt (argc, argv, "c:o:s:d:C:S:T:t:g:be:E:H:hn")) != -1) data/clonalorigin-1.0/warg/src/weakarg.cpp:128:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt (argc, argv, "w:x:y:z:s:va:T:R:D:L:C:r:t:i:S:G:fUhV")) != -1) data/clonalorigin-1.0/gui/gelmanrubinimpl.cpp:217: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/gelmanrubinimpl.cpp:240: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/gui.cpp:129:15: [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). case('C'):if(atoi(optarg)<0) { mainwindowimpl.on_actionExtended_consensus_of_trees_activated(tof); }else { mainwindowimpl.on_actionMajority_rule_consensus_of_trees_activated(atoi(optarg),tof);}; break; data/clonalorigin-1.0/gui/gui.cpp:129:176: [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). case('C'):if(atoi(optarg)<0) { mainwindowimpl.on_actionExtended_consensus_of_trees_activated(tof); }else { mainwindowimpl.on_actionMajority_rule_consensus_of_trees_activated(atoi(optarg),tof);}; break; data/clonalorigin-1.0/gui/gui.cpp:136:27: [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). case('H'):priorcorrectHM=atoi(optarg); data/clonalorigin-1.0/gui/gui.cpp:138:27: [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). case('d'):priorcorrectPD=atoi(optarg); data/clonalorigin-1.0/gui/heatimpl.cpp:83: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/mainwindowimpl.cpp:108: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/mainwindowimpl.cpp:133: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/mainwindowimpl.cpp:260: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/mainwindowimpl.cpp:266: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). if ( !file2.open(QIODevice::ReadOnly)) return; data/clonalorigin-1.0/gui/mainwindowimpl.cpp:296: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/mainwindowimpl.cpp:299: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). if ( !filefrom.open(QIODevice::ReadOnly)) return; data/clonalorigin-1.0/gui/mainwindowimpl.cpp:327: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/mainwindowimpl.cpp:330: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). if ( !filefrom.open(QIODevice::ReadOnly)) return; data/clonalorigin-1.0/gui/mainwindowimpl.cpp:892: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/mainwindowimpl.cpp:903: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/outputfile.cpp:23:12: [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 ulim=atoi(ulims.c_str()); data/clonalorigin-1.0/gui/outputfile.cpp:60: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). if (!file[i]->open(QIODevice::ReadOnly)) {cerr<<"Unable to open file "<<file[i]->fileName().toStdString()<<endl;exit(1);} data/clonalorigin-1.0/gui/outputfile.cpp:79: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). if (!file[i]->open(QIODevice::ReadOnly)) {cerr<<"Unable to open file "<<file[i]->fileName().toStdString()<<endl;exit(1);} data/clonalorigin-1.0/gui/outputfile.cpp:151: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). file[0]->open(QIODevice::ReadOnly); data/clonalorigin-1.0/gui/outputfile.cpp:243: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). f.open(QIODevice::ReadOnly); data/clonalorigin-1.0/gui/outputfile.cpp:268: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). f.open(QIODevice::ReadOnly); data/clonalorigin-1.0/gui/outputfile.cpp:290: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). f.open(QIODevice::ReadOnly); data/clonalorigin-1.0/gui/outputfile.cpp:327:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MAX_BUFFER]; data/clonalorigin-1.0/gui/pdimpl.cpp:69: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/gui/pheatimpl.cpp:61: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). if ( !file.open(QIODevice::WriteOnly)) return; data/clonalorigin-1.0/warg/src/data.cpp:29: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). file.open(filename.data());//Open file data/clonalorigin-1.0/warg/src/data.cpp:223:11: [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 reg=atoi(sregions.substr(ppos+1,pos-ppos-1).c_str()); data/clonalorigin-1.0/warg/src/mpiutils.cpp:48:34: [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). dynamic_cast<ofstream*>(out)->open( pname.str().c_str() ); data/clonalorigin-1.0/warg/src/mpiutils.cpp:99:34: [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). dynamic_cast<ofstream*>(out)->open( pname.str().c_str() ); data/clonalorigin-1.0/warg/src/mydata.cpp:25: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). file.open(filename.data());//Open file data/clonalorigin-1.0/warg/src/rectree.cpp:390:12: [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). gstart=atoi(res.substr(f1,f2-f1).c_str())+sitesoffset; data/clonalorigin-1.0/warg/src/rectree.cpp:393:10: [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). gend=atoi(res.substr(f1,f2-f1).c_str())+sitesoffset; data/clonalorigin-1.0/warg/src/rectree.cpp:396:14: [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). edgefrom=atoi(res.substr(f1,f2-f1).c_str()); data/clonalorigin-1.0/warg/src/rectree.cpp:399:12: [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). edgeto=atoi(res.substr(f1,f2-f1).c_str()); data/clonalorigin-1.0/warg/src/rng.cpp:33:22: [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). if ((devrandom = fopen("/dev/random","r")) == NULL) data/clonalorigin-1.0/warg/src/rng.cpp:54:19: [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). if( (stream = fopen(fname.c_str(),"w")) == NULL) data/clonalorigin-1.0/warg/src/rng.cpp:73:19: [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). if( (stream = fopen(fname.c_str(),"r")) == NULL) data/clonalorigin-1.0/warg/src/tree.cpp:115: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). newickFile.open(newickfile.data()); data/clonalorigin-1.0/warg/src/wargxml.cpp:13: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). iterfile.open(fname.data()); data/clonalorigin-1.0/warg/src/weakarg.cpp:131:22: [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). case('w'):if(atoi(optarg)>=0)opt().preburnin=atoi(optarg);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:131:54: [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). case('w'):if(atoi(optarg)>=0)opt().preburnin=atoi(optarg);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:132:22: [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). case('x'):if(atoi(optarg)>=0)opt().burnin=atoi(optarg);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:132:51: [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). case('x'):if(atoi(optarg)>=0)opt().burnin=atoi(optarg);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:133:22: [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). case('y'):if(atoi(optarg)>=0)opt().additional=atoi(optarg);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:133:55: [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). case('y'):if(atoi(optarg)>=0)opt().additional=atoi(optarg);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:134:22: [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). case('z'):if(atoi(optarg)> 0)opt().thinin=atoi(optarg);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:134:51: [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). case('z'):if(atoi(optarg)> 0)opt().thinin=atoi(optarg);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:152:34: [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). case(0):simparN=atoi(pch);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:153:42: [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). case(1):simparnumblocks=atoi(pch);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:154:42: [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). case(2):simparblocksize=atoi(pch);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:162:29: [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). case('r'):opt().temperreps=atoi(optarg);break; data/clonalorigin-1.0/warg/src/weakarg.cpp:168:65: [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). if(pch!=NULL){pch = strtok (optarg,",");opt().subset.push_back(atoi(pch));pch = strtok (NULL,",");opt().subsetSeed=atoi(pch); data/clonalorigin-1.0/warg/src/weakarg.cpp:168:117: [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). if(pch!=NULL){pch = strtok (optarg,",");opt().subset.push_back(atoi(pch));pch = strtok (NULL,",");opt().subsetSeed=atoi(pch); data/clonalorigin-1.0/warg/src/weakarg.cpp:172:26: [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). opt().subset.push_back(atoi(pch)); data/clonalorigin-1.0/warg/src/weakarg.cpp:209: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). dat.open("simulatedData.xmfa"); data/clonalorigin-1.0/warg/src/weakarg.cpp:213: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). tru.open("truth.xml"); ANALYSIS SUMMARY: Hits = 63 Lines analyzed = 12336 in approximately 0.41 seconds (29995 lines/second) Physical Source Lines of Code (SLOC) = 10370 Hits@level = [0] 5 [1] 0 [2] 58 [3] 3 [4] 2 [5] 0 Hits@level+ = [0+] 68 [1+] 63 [2+] 63 [3+] 5 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 6.55738 [1+] 6.07522 [2+] 6.07522 [3+] 0.48216 [4+] 0.192864 [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.