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/r-cran-xts-0.12.1/src/isOrdered.c Examining data/r-cran-xts-0.12.1/src/period_arithmetic.c Examining data/r-cran-xts-0.12.1/src/subset.old.c Examining data/r-cran-xts-0.12.1/src/unique.time.c Examining data/r-cran-xts-0.12.1/src/isXts.c Examining data/r-cran-xts-0.12.1/src/toperiod.c Examining data/r-cran-xts-0.12.1/src/period_quantile.c Examining data/r-cran-xts-0.12.1/src/subset.c Examining data/r-cran-xts-0.12.1/src/dimnames.c Examining data/r-cran-xts-0.12.1/src/init.c Examining data/r-cran-xts-0.12.1/src/attr.c Examining data/r-cran-xts-0.12.1/src/rollfun.c Examining data/r-cran-xts-0.12.1/src/runSum.c Examining data/r-cran-xts-0.12.1/src/na.c Examining data/r-cran-xts-0.12.1/src/add_class.c Examining data/r-cran-xts-0.12.1/src/binsearch.c Examining data/r-cran-xts-0.12.1/src/rbind.c Examining data/r-cran-xts-0.12.1/src/coredata.c Examining data/r-cran-xts-0.12.1/src/startofyear.c Examining data/r-cran-xts-0.12.1/src/tryXts.c Examining data/r-cran-xts-0.12.1/src/endpoints.c Examining data/r-cran-xts-0.12.1/src/any.c Examining data/r-cran-xts-0.12.1/src/totalcols.c Examining data/r-cran-xts-0.12.1/src/period_apply.c Examining data/r-cran-xts-0.12.1/src/extract_col.c Examining data/r-cran-xts-0.12.1/src/merge.c Examining data/r-cran-xts-0.12.1/src/diff.c Examining data/r-cran-xts-0.12.1/inst/include/xts_stubs.c Examining data/r-cran-xts-0.12.1/inst/include/xts.h Examining data/r-cran-xts-0.12.1/inst/include/xtsAPI.h Examining data/r-cran-xts-0.12.1/inst/api_example/src/checkOrder.c FINAL RESULTS: data/r-cran-xts-0.12.1/src/coredata.c:41:7: [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(REAL(result), REAL(x), length(result) * sizeof(double)); data/r-cran-xts-0.12.1/src/coredata.c:44:7: [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(INTEGER(result), INTEGER(x), length(result) * sizeof(int)); data/r-cran-xts-0.12.1/src/coredata.c:47:7: [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(LOGICAL(result), LOGICAL(x), length(result) * sizeof(int)); data/r-cran-xts-0.12.1/src/coredata.c:50:7: [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(COMPLEX(result), COMPLEX(x), length(result) * sizeof(Rcomplex)); data/r-cran-xts-0.12.1/src/coredata.c:59:7: [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(RAW(result), RAW(x), length(result) * sizeof(unsigned char)); data/r-cran-xts-0.12.1/src/extract_col.c:67:11: [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(&(REAL(result)[i*nrs]), data/r-cran-xts-0.12.1/src/extract_col.c:80:11: [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(&(INTEGER(result)[i*nrs]), data/r-cran-xts-0.12.1/src/extract_col.c:93:11: [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(&(LOGICAL(result)[i*nrs]), data/r-cran-xts-0.12.1/src/extract_col.c:107:11: [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(&(COMPLEX(result)[i*nrs]), data/r-cran-xts-0.12.1/src/extract_col.c:120:11: [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(&(RAW(result)[i*nrs]), data/r-cran-xts-0.12.1/src/extract_col.c:147:7: [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(REAL(new_index), &(REAL(index)[first]), nrs*sizeof(double)); data/r-cran-xts-0.12.1/src/extract_col.c:149:7: [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(INTEGER(new_index), &(INTEGER(index)[first]), nrs*sizeof(int)); data/r-cran-xts-0.12.1/src/rbind.c:568:9: [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(&(REAL(result)[i*nr]), data/r-cran-xts-0.12.1/src/rbind.c:571:9: [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(&(REAL(result)[i*nr + nrs_x]), data/r-cran-xts-0.12.1/src/rbind.c:578:9: [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(&(INTEGER(result)[i*nr]), data/r-cran-xts-0.12.1/src/rbind.c:581:9: [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(&(INTEGER(result)[i*nr + nrs_x]), data/r-cran-xts-0.12.1/src/rbind.c:588:9: [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(&(LOGICAL(result)[i*nr]), data/r-cran-xts-0.12.1/src/rbind.c:591:9: [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(&(LOGICAL(result)[i*nr + nrs_x]), data/r-cran-xts-0.12.1/src/rbind.c:598:9: [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(&(COMPLEX(result)[i*nr]), data/r-cran-xts-0.12.1/src/rbind.c:601:9: [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(&(COMPLEX(result)[i*nr + nrs_x]), data/r-cran-xts-0.12.1/src/rbind.c:608:9: [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(&(RAW(result)[i*nr]), data/r-cran-xts-0.12.1/src/rbind.c:611:9: [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(&(RAW(result)[i*nr + nrs_x]), data/r-cran-xts-0.12.1/src/rbind.c:634:7: [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(REAL(index), REAL(xindex), nrs_x * sizeof(double)); data/r-cran-xts-0.12.1/src/rbind.c:635:7: [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(&(REAL(index)[nrs_x]), REAL(yindex), nrs_y * sizeof(double)); data/r-cran-xts-0.12.1/src/rbind.c:638:7: [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(INTEGER(index), INTEGER(xindex), nrs_x * sizeof(int)); data/r-cran-xts-0.12.1/src/rbind.c:639:7: [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(&(INTEGER(index)[nrs_x]), INTEGER(yindex), nrs_y * sizeof(int)); data/r-cran-xts-0.12.1/src/unique.time.c:38: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(REAL(newindex_), REAL(index_), len * sizeof(double)); ANALYSIS SUMMARY: Hits = 27 Lines analyzed = 6612 in approximately 0.18 seconds (36638 lines/second) Physical Source Lines of Code (SLOC) = 5291 Hits@level = [0] 0 [1] 0 [2] 27 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 27 [1+] 27 [2+] 27 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 5.10301 [1+] 5.10301 [2+] 5.10301 [3+] 0 [4+] 0 [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.