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/murasaki-1.68.6/src/align-and.cc Examining data/murasaki-1.68.6/src/align-coverage.cc Examining data/murasaki-1.68.6/src/scoring.cc Examining data/murasaki-1.68.6/src/hashing.h Examining data/murasaki-1.68.6/src/cgr-random.cc Examining data/murasaki-1.68.6/src/align-or.cc Examining data/murasaki-1.68.6/src/arrayhash.cc Examining data/murasaki-1.68.6/src/cgr-image.cc Examining data/murasaki-1.68.6/src/openhash.cc Examining data/murasaki-1.68.6/src/timing.h Examining data/murasaki-1.68.6/src/msethash.h Examining data/murasaki-1.68.6/src/options.h Examining data/murasaki-1.68.6/src/alignments.h Examining data/murasaki-1.68.6/src/cgr-image.h Examining data/murasaki-1.68.6/src/cgr.h Examining data/murasaki-1.68.6/src/seqread.h Examining data/murasaki-1.68.6/src/genopts.cc Examining data/murasaki-1.68.6/src/timing.cc Examining data/murasaki-1.68.6/src/geneparse.cc Examining data/murasaki-1.68.6/src/cgr-sample.cc Examining data/murasaki-1.68.6/src/arrayhash.h Examining data/murasaki-1.68.6/src/openhash.h Examining data/murasaki-1.68.6/src/wordsize.cc Examining data/murasaki-1.68.6/src/dinkymath.h Examining data/murasaki-1.68.6/src/testeco.cc Examining data/murasaki-1.68.6/src/dinkymath.cc Examining data/murasaki-1.68.6/src/revcomptable.cxx Examining data/murasaki-1.68.6/src/mbfa.cc Examining data/murasaki-1.68.6/src/mingw32compat.cc Examining data/murasaki-1.68.6/src/ecohash.h Examining data/murasaki-1.68.6/src/ecolist.h Examining data/murasaki-1.68.6/src/murasaki.h Examining data/murasaki-1.68.6/src/cgr.cc Examining data/murasaki-1.68.6/src/alignments.cc Examining data/murasaki-1.68.6/src/cmultiset.h Examining data/murasaki-1.68.6/src/itree.h Examining data/murasaki-1.68.6/src/align-best.cc Examining data/murasaki-1.68.6/src/ecohash.cc Examining data/murasaki-1.68.6/src/cgr-compare.cc Examining data/murasaki-1.68.6/src/scoring.h Examining data/murasaki-1.68.6/src/cryptohasher.h Examining data/murasaki-1.68.6/src/exceptions.h Examining data/murasaki-1.68.6/src/bitmap.h Examining data/murasaki-1.68.6/src/murasaki_mpi.h Examining data/murasaki-1.68.6/src/include/pstream.h Examining data/murasaki-1.68.6/src/ecolist.cc Examining data/murasaki-1.68.6/src/msethash.cc Examining data/murasaki-1.68.6/src/seqread.cc Examining data/murasaki-1.68.6/src/getsegments.cc Examining data/murasaki-1.68.6/src/sequence.h Examining data/murasaki-1.68.6/src/genopts.h Examining data/murasaki-1.68.6/src/align-compare.cc Examining data/murasaki-1.68.6/src/mingw32compat.h Examining data/murasaki-1.68.6/src/binseq.cc Examining data/murasaki-1.68.6/src/murasaki.cc Examining data/murasaki-1.68.6/src/options.cc Examining data/murasaki-1.68.6/src/globaltypes.h Examining data/murasaki-1.68.6/src/sequence.cc Examining data/murasaki-1.68.6/src/murasaki_mpi.cc FINAL RESULTS: data/murasaki-1.68.6/src/cgr.cc:289:7: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res=system(command.c_str()); data/murasaki-1.68.6/src/cgr.cc:292:7: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. res=system(command.c_str()); data/murasaki-1.68.6/src/include/pstream.h:986:13: [4] (shell) execlp: 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. ::execlp("sh", "sh", "-c", command.c_str(), (void*)NULL); data/murasaki-1.68.6/src/include/pstream.h:1102:17: [4] (shell) execvp: 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. ::execvp(file.c_str(), arg_v); data/murasaki-1.68.6/src/murasaki.cc:1071:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"Platform information:\nWordsize: %u bits\n\ data/murasaki-1.68.6/src/murasaki.cc:1217:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"Total Memory: %s\n\ data/murasaki-1.68.6/src/murasaki_mpi.cc:137:7: [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,nodename); data/murasaki-1.68.6/src/options.cc:66:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fmt,"Options: %s",infmt); data/murasaki-1.68.6/src/options.cc:67:3: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(buff,fmt,argp); data/murasaki-1.68.6/src/options.cc:813:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(argv.back(),tmp.c_str()); data/murasaki-1.68.6/src/sequence.cc:1741:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(leader,"w[%2d]%s%2d:",i->first,(i->second>0 ? ">>":"<<"),abs(i->second)); data/murasaki-1.68.6/src/timing.cc:127:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf,days==1 ? "%d day ":"%d days ",days); data/murasaki-1.68.6/src/timing.cc:131:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf,hours==1 ? "%d hour ":"%d hours ",hours); data/murasaki-1.68.6/src/timing.cc:135:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf,mins==1 ? "%d minute ":"%d minutes ",mins); data/murasaki-1.68.6/src/timing.cc:139:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(buf,dur==1 ? "%.3f second ":"%.3f seconds",dur); data/murasaki-1.68.6/src/align-and.cc:73:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"?vg:o:",long_options,&longindex); data/murasaki-1.68.6/src/align-best.cc:77:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"?vg:o:",long_options,&longindex); data/murasaki-1.68.6/src/align-compare.cc:76:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"?vr:K:k:j:J:",long_options,&longindex); data/murasaki-1.68.6/src/align-coverage.cc:80:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"?vg:o:",long_options,&longindex); data/murasaki-1.68.6/src/align-or.cc:70:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"?vg:o:",long_options,&longindex); data/murasaki-1.68.6/src/cgr-compare.cc:65:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"?vn:",long_options,&longindex); data/murasaki-1.68.6/src/cgr-image.cc:64:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"m:?pvris:1:b8",long_options,&longindex); data/murasaki-1.68.6/src/cgr-random.cc:69:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"?v",long_options,&longindex); data/murasaki-1.68.6/src/cgr-sample.cc:71:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"?vh:l:i:H:L:rs",long_options,&longindex); data/murasaki-1.68.6/src/dinkymath.cc:250: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(0)); data/murasaki-1.68.6/src/dinkymath.h:139:21: [3] (random) random: 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. double x=((double)random())/(double)RAND_MAX; data/murasaki-1.68.6/src/geneparse.cc:78:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"trlchvVo:UF",long_options,&longindex); data/murasaki-1.68.6/src/getsegments.cc:69:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"hVvc",long_options,&longindex); data/murasaki-1.68.6/src/include/pstream.h:1858:15: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/murasaki-1.68.6/src/include/pstream.h:1877:15: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/murasaki-1.68.6/src/include/pstream.h:1886:15: [3] (random) setstate: 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. this->setstate(std::ios_base::failbit); data/murasaki-1.68.6/src/mbfa.cc:65:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,"hVvf::i::F::A::",long_options,&longindex); data/murasaki-1.68.6/src/mingw32compat.cc:25:6: [3] (random) srandom: 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. void srandom(unsigned s){ data/murasaki-1.68.6/src/mingw32compat.cc:26: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(s); data/murasaki-1.68.6/src/mingw32compat.cc:29:6: [3] (random) random: 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. long random(){ data/murasaki-1.68.6/src/mingw32compat.h:47:6: [3] (random) srandom: 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. void srandom(unsigned); data/murasaki-1.68.6/src/mingw32compat.h:48:6: [3] (random) random: 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. long random(); data/murasaki-1.68.6/src/options.cc:136:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if(getenv("HOME")) data/murasaki-1.68.6/src/options.cc:137:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. config_file=string(getenv("HOME"))+"/.murasaki"; data/murasaki-1.68.6/src/options.cc:248:10: [3] (buffer) getopt_long: 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. optc=getopt_long(argc,argv,":>::<::%:/:1::A:B::C::F::G::H::I::J::L::M:P::Q::R::S:T::V?W::Y:Z:a::b:c::d:e::f:g:hi::j:k::l::m:n:o::p:q:r::s:t:u:vw::y::z::",long_options,&longindex); data/murasaki-1.68.6/src/seqread.cc:523:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if(getenv("MURASAKI_SR_IGNOREBOGUS")) data/murasaki-1.68.6/src/seqread.cc:524:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. getYesNo(getenv("MURASAKI_SR_IGNOREBOGUS"),ignoreBogusChars,"MURASAKI_SR_IGNOREBOGUS"); data/murasaki-1.68.6/src/sequence.cc:139:3: [3] (random) srandom: 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. srandom(opt.rand_seed); data/murasaki-1.68.6/src/sequence.cc:141:3: [3] (random) srandom: 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. srandom(0); data/murasaki-1.68.6/src/sequence.cc:144:16: [3] (random) random: 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. hash_padding=random()&hash_mask; data/murasaki-1.68.6/src/sequence.cc:194:3: [3] (random) srandom: 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. srandom(time(0)); data/murasaki-1.68.6/src/sequence.cc:1659:10: [3] (random) random: 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. if(random() & 1){ //actually mate with another hash function data/murasaki-1.68.6/src/sequence.cc:1858:33: [3] (random) random: 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. int shift=inputs[w].second+(random()&1) ? 1:-1; data/murasaki-1.68.6/src/sequence.cc:1927:5: [3] (random) random: 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. if(random() & 1) data/murasaki-1.68.6/src/testeco.cc:57: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(0); data/murasaki-1.68.6/src/alignments.cc:338: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 line[maxline]; data/murasaki-1.68.6/src/binseq.cc:107: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). if((fd=open(binaryFilename.c_str(),O_RDONLY))<0){ data/murasaki-1.68.6/src/binseq.cc:158:3: [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(&subSeqs.front(),regions[0],regionSizes[0]*sizeof(Region)); data/murasaki-1.68.6/src/binseq.cc:160:3: [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(&readableRegions.front(),regions[1],regionSizes[1]*sizeof(Region)); data/murasaki-1.68.6/src/binseq.cc:162:3: [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(&unmaskedRegions.front(),regions[2],regionSizes[2]*sizeof(Region)); data/murasaki-1.68.6/src/cgr-sample.cc:203:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/murasaki-1.68.6/src/cgr-sample.cc:204:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"Rank %3d:",rank); data/murasaki-1.68.6/src/cgr-sample.cc:219:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/murasaki-1.68.6/src/cgr-sample.cc:220:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"Rank %3d:",rank); data/murasaki-1.68.6/src/cgr.cc:335:3: [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(alt,data,size*sizeof(pix)); data/murasaki-1.68.6/src/cgr.cc:350:3: [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(alt,data,size*sizeof(pix)); data/murasaki-1.68.6/src/cgr.cc:381:3: [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(alt,data,size*sizeof(pix)); data/murasaki-1.68.6/src/cgr.cc:431: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 line[maxline]; data/murasaki-1.68.6/src/cgr.cc:499: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 line[maxline]; data/murasaki-1.68.6/src/dinkymath.cc:38: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 str[200]; data/murasaki-1.68.6/src/dinkymath.cc:51: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 str[200]; data/murasaki-1.68.6/src/dinkymath.cc:79: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 buf[50]; data/murasaki-1.68.6/src/dinkymath.cc:80:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%d",i); data/murasaki-1.68.6/src/dinkymath.cc:85: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 buf[50]; data/murasaki-1.68.6/src/dinkymath.cc:86:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%ld",i); data/murasaki-1.68.6/src/dinkymath.cc:91: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 buf[50]; data/murasaki-1.68.6/src/dinkymath.cc:92:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.2f",f); data/murasaki-1.68.6/src/dinkymath.cc:97: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 buf[50]; data/murasaki-1.68.6/src/dinkymath.cc:98:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%#08x",i); data/murasaki-1.68.6/src/dinkymath.cc:114: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 buf[64]; data/murasaki-1.68.6/src/dinkymath.cc:119:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%lu bytes",b); data/murasaki-1.68.6/src/dinkymath.cc:121:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.2lf KB",f/1024); data/murasaki-1.68.6/src/dinkymath.cc:123:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.2lf MB",f/1024/1024); data/murasaki-1.68.6/src/dinkymath.cc:125:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.2lf GB",f/1024/1024/1024); data/murasaki-1.68.6/src/dinkymath.cc:127:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.3lf TB",f/1024/1024/1024/1024); data/murasaki-1.68.6/src/dinkymath.cc:132: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 buf[64]; data/murasaki-1.68.6/src/dinkymath.cc:136:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%f bytes",f); data/murasaki-1.68.6/src/dinkymath.cc:138:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.1f KB",f/1024.0); data/murasaki-1.68.6/src/dinkymath.cc:140:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.1f MB",f/1024.0/1024.0); data/murasaki-1.68.6/src/dinkymath.cc:142:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.1f GB",f/1024./1024./1024.); data/murasaki-1.68.6/src/dinkymath.cc:144:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.3f TB",f/1024./1024./1024./1024.); data/murasaki-1.68.6/src/dinkymath.cc:146:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.3e bytes",f); data/murasaki-1.68.6/src/dinkymath.cc:151: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 buf[64]; data/murasaki-1.68.6/src/dinkymath.cc:155:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%f",f); data/murasaki-1.68.6/src/dinkymath.cc:157:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.1fK",f/1e3); data/murasaki-1.68.6/src/dinkymath.cc:159:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.1fM",f/1e6); data/murasaki-1.68.6/src/dinkymath.cc:161:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.1fG",f/1e9); data/murasaki-1.68.6/src/dinkymath.cc:163:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.3fT",f/1e12); data/murasaki-1.68.6/src/dinkymath.cc:165:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%.3e",f); data/murasaki-1.68.6/src/dinkymath.cc:194:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[50]; data/murasaki-1.68.6/src/dinkymath.cc:195:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%2d%%",percent); data/murasaki-1.68.6/src/dinkymath.cc:232:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[50]; data/murasaki-1.68.6/src/dinkymath.cc:233:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%2d%%",percent); data/murasaki-1.68.6/src/dinkymath.cc:300: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 buf[128]; data/murasaki-1.68.6/src/dinkymath.cc:301:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%f%%",a/b*100.0); data/murasaki-1.68.6/src/include/pstream.h:130:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const std::string& command, pmode mode); data/murasaki-1.68.6/src/include/pstream.h:134:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const std::string& file, const argv_type& argv, pmode mode); data/murasaki-1.68.6/src/include/pstream.h:163:7: [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). fopen(std::FILE*& in, std::FILE*& out, std::FILE*& err); data/murasaki-1.68.6/src/include/pstream.h:320:7: [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). fopen(std::FILE*& in, std::FILE*& out, std::FILE*& err); data/murasaki-1.68.6/src/include/pstream.h:411:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const std::string& command, pmode mode = pstdout) data/murasaki-1.68.6/src/include/pstream.h:427:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open( const std::string& file, data/murasaki-1.68.6/src/include/pstream.h:538:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const std::string& command, pmode mode = pstdin) data/murasaki-1.68.6/src/include/pstream.h:554:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open( const std::string& file, data/murasaki-1.68.6/src/include/pstream.h:647:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const std::string& command, pmode mode = pstdout|pstdin) data/murasaki-1.68.6/src/include/pstream.h:663:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open( const std::string& file, data/murasaki-1.68.6/src/include/pstream.h:784:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const std::string& command, pmode mode = pstdout|pstdin) data/murasaki-1.68.6/src/include/pstream.h:800:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open( const std::string& file, data/murasaki-1.68.6/src/include/pstream.h:911:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(command, mode); data/murasaki-1.68.6/src/include/pstream.h:936:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(file, argv, mode); data/murasaki-1.68.6/src/include/pstream.h:972:28: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). basic_pstreambuf<C,T>::open(const std::string& command, pmode mode) data/murasaki-1.68.6/src/include/pstream.h:976: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). return this->open("sh", std::vector<std::string>(argv, argv+3), mode); data/murasaki-1.68.6/src/include/pstream.h:1065:28: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). basic_pstreambuf<C,T>::open( const std::string& file, data/murasaki-1.68.6/src/include/pstream.h:1583:14: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(this->pptr(), s, n * sizeof(char_type)); data/murasaki-1.68.6/src/include/pstream.h:1857: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 (!buf_.open((command_=command), mode)) data/murasaki-1.68.6/src/include/pstream.h:1876: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 (!buf_.open((command_=file), argv, mode)) data/murasaki-1.68.6/src/include/pstream.h:1953:28: [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). basic_pstreambuf<C,T>::fopen(std::FILE*& in, std::FILE*& out, std::FILE*& err) data/murasaki-1.68.6/src/include/pstream.h:1993:26: [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). pstream_common<C,T>::fopen(std::FILE*& in, std::FILE*& out, std::FILE*& err) data/murasaki-1.68.6/src/include/pstream.h:1995: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). return buf_.fopen(in, out, err); data/murasaki-1.68.6/src/murasaki.cc:93:1: [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 nodename[81]; data/murasaki-1.68.6/src/murasaki.cc:159:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(mpi_tag,"<%d>",mpi_id); data/murasaki-1.68.6/src/murasaki.cc:191: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). stdoe = open(stdoename, O_WRONLY|O_CREAT|O_TRUNC, 0644); data/murasaki-1.68.6/src/murasaki.cc:574: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). cachef.open(cachename.c_str(), ios::binary); data/murasaki-1.68.6/src/murasaki.cc:599: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). cachef.open(cachename.c_str(), ios::trunc|ios::out|ios::binary); data/murasaki-1.68.6/src/murasaki.cc:613: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). cachef.open(cachename.c_str(), ios::binary); data/murasaki-1.68.6/src/murasaki.cc:1070: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 buf[1024]; data/murasaki-1.68.6/src/murasaki.cc:1216: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 buf[1024]; data/murasaki-1.68.6/src/murasaki.h:47:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. extern char nodename[81]; data/murasaki-1.68.6/src/murasaki.h:94: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 mpi_tag[81]; data/murasaki-1.68.6/src/murasaki.h:99: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 stdoename[101]; data/murasaki-1.68.6/src/murasaki_mpi.cc:135:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[81]; data/murasaki-1.68.6/src/options.cc:62: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 buff[2048]; data/murasaki-1.68.6/src/options.cc:63: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 fmt[1024]; data/murasaki-1.68.6/src/options.cc:241: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 msgbuf[80]; //hate to do this... data/murasaki-1.68.6/src/options.cc:578:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msgbuf,"Option -%c requires an argument",optopt); data/murasaki-1.68.6/src/options.cc:685:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mpi_id_str[81]; data/murasaki-1.68.6/src/options.cc:804: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 buf[2048]; data/murasaki-1.68.6/src/seqread.cc:94: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 buf[bufsize]; data/murasaki-1.68.6/src/seqread.cc:193: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 buf[bufsize]; data/murasaki-1.68.6/src/seqread.cc:373: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). ifs.open(filename.c_str()); data/murasaki-1.68.6/src/seqread.cc:421:14: [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. unsigned char magic_c[2]; data/murasaki-1.68.6/src/sequence.cc:489: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((fd=open(bitFile.string().c_str(),O_RDONLY))<0){ data/murasaki-1.68.6/src/sequence.cc:614: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[50]; data/murasaki-1.68.6/src/sequence.cc:616:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%4ld ",i+1); data/murasaki-1.68.6/src/sequence.cc:618:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%4d ",i+1); data/murasaki-1.68.6/src/sequence.cc:637: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[50]; data/murasaki-1.68.6/src/sequence.cc:638:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%4lu ",i*WORDSIZE/2+1); data/murasaki-1.68.6/src/sequence.cc:661:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[50]; data/murasaki-1.68.6/src/sequence.cc:662:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%4lu ",i*WORDSIZE/2+1); data/murasaki-1.68.6/src/sequence.cc:981: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). fd=open(bitFile.string().c_str(),O_RDWR | O_CREAT | O_TRUNC | O_NOCTTY,S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); //create and/or trunc data/murasaki-1.68.6/src/sequence.cc:1106:5: [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(_words,binseq.words(),binseq.getWordCount()*sizeof(word)); data/murasaki-1.68.6/src/sequence.cc:1113:3: [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(&matchRegions.front(),binseq.regions[srcMatchRegionsIdx],sizeof(SequenceBinary::Region)*binseq.regionSizes[srcMatchRegionsIdx]); data/murasaki-1.68.6/src/sequence.cc:1114:3: [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(&subSeqs.front(),binseq.regions[0],sizeof(SequenceBinary::Region)*binseq.regionSizes[0]); data/murasaki-1.68.6/src/sequence.cc:1313:9: [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. const char *forwardBases[4]={"A","C","G","T"}; data/murasaki-1.68.6/src/sequence.cc:1314:9: [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. const char *bases[4]={"A/T","C/G","G","T"}; data/murasaki-1.68.6/src/sequence.cc:1740:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char leader[50]; data/murasaki-1.68.6/src/timing.cc:117: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 buf[300]; data/murasaki-1.68.6/src/timing.cc:144:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%lf",dur); data/murasaki-1.68.6/src/align-coverage.cc:154:27: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(char c=reader.getc()){ data/murasaki-1.68.6/src/alignments.cc:344:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(inf.bad() || strlen(line)<1) data/murasaki-1.68.6/src/arrayhash.cc:133:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). is.read( (char*)&key, sizeof(HashKey) ); data/murasaki-1.68.6/src/arrayhash.cc:134:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). is.read( (char*)&s, sizeof(unsigned)); data/murasaki-1.68.6/src/arrayhash.cc:145:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). is.read( (char*)buf, sizeof(HashVal)*s ); data/murasaki-1.68.6/src/binseq.cc:201:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char c=reader.getc(); data/murasaki-1.68.6/src/cgr.cc:226:31: [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). return data[dnatoi(str,iter,strlen(str))]; data/murasaki-1.68.6/src/cgr.cc:444:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inf.read(line,2); data/murasaki-1.68.6/src/cgr.cc:506:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inf.read(line,2); data/murasaki-1.68.6/src/cgr.cc:544:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). inf.read(line,wordwidth); data/murasaki-1.68.6/src/geneparse.cc:114:41: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(char c=baseMorph(filereader.getc())){ data/murasaki-1.68.6/src/geneparse.cc:157:36: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(char c=baseMorph(filereader.getc())){ data/murasaki-1.68.6/src/getsegments.cc:167:16: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(reader.getc()){ data/murasaki-1.68.6/src/include/pstream.h:201:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(char_type* s, std::streamsize n); data/murasaki-1.68.6/src/include/pstream.h:1127:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch (::read(ck_exec[RD], &error_, sizeof(error_))) data/murasaki-1.68.6/src/include/pstream.h:1685:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const std::streamsize rc = read(rbuffer() + pbsz, bufsz - pbsz); data/murasaki-1.68.6/src/include/pstream.h:1728:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). basic_pstreambuf<C,T>::read(char_type* s, std::streamsize n) data/murasaki-1.68.6/src/include/pstream.h:1730:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return rpipe() >= 0 ? ::read(rpipe(), s, n * sizeof(char_type)) : 0; data/murasaki-1.68.6/src/murasaki.cc:195:7: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(stdoename,""); data/murasaki-1.68.6/src/seqread.cc:65:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c=reader.getc())){ data/murasaki-1.68.6/src/seqread.cc:74:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c=reader.getc())){ data/murasaki-1.68.6/src/seqread.cc:197:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). is.read(buf,bufsize); data/murasaki-1.68.6/src/seqread.cc:286:26: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char SequenceByteReader::getc(){ data/murasaki-1.68.6/src/seqread.cc:300:22: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char c=redirect->getc(); data/murasaki-1.68.6/src/seqread.cc:422:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). file.read((char*)magic_c,2); data/murasaki-1.68.6/src/seqread.cc:472:26: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char SequenceFileReader::getc(){ data/murasaki-1.68.6/src/seqread.cc:477:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). byteReader->getc(); data/murasaki-1.68.6/src/seqread.cc:483:22: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char c=byteReader->getc(); data/murasaki-1.68.6/src/seqread.cc:489:21: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(byteReader->getc()) data/murasaki-1.68.6/src/seqread.h:83:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char getc(); data/murasaki-1.68.6/src/seqread.h:123:8: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char getc(); data/murasaki-1.68.6/src/sequence.cc:1152:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). char c=reader.getc(); data/murasaki-1.68.6/src/sequence.cc:2019:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). is.read( (char*)&key, sizeof(HashKey) ); data/murasaki-1.68.6/src/sequence.cc:2020:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). is.read( (char*)&s, sizeof(unsigned) ); data/murasaki-1.68.6/src/sequence.cc:2024:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). is.read( (char*)buf, sizeof(Location) * s); data/murasaki-1.68.6/src/sequence.cc:3418:27: [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). for(unsigned int i=0; i<strlen(n); i++) data/murasaki-1.68.6/src/sequence.h:389:8: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. bool equal(const Location &a,BitSequence &patt) const; ANALYSIS SUMMARY: Hits = 199 Lines analyzed = 20441 in approximately 0.54 seconds (37963 lines/second) Physical Source Lines of Code (SLOC) = 15340 Hits@level = [0] 22 [1] 37 [2] 112 [3] 35 [4] 15 [5] 0 Hits@level+ = [0+] 221 [1+] 199 [2+] 162 [3+] 50 [4+] 15 [5+] 0 Hits/KSLOC@level+ = [0+] 14.4068 [1+] 12.9726 [2+] 10.5606 [3+] 3.25945 [4+] 0.977836 [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.