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-bioc-hdf5array-1.18.0/src/H5DSetDescriptor.c Examining data/r-bioc-hdf5array-1.18.0/src/H5DSetDescriptor.h Examining data/r-bioc-hdf5array-1.18.0/src/R_init_HDF5Array.c Examining data/r-bioc-hdf5array-1.18.0/src/S4Vectors_stubs.c Examining data/r-bioc-hdf5array-1.18.0/src/global_errmsg_buf.c Examining data/r-bioc-hdf5array-1.18.0/src/global_errmsg_buf.h Examining data/r-bioc-hdf5array-1.18.0/src/h5dimscales.c Examining data/r-bioc-hdf5array-1.18.0/src/h5dimscales.h Examining data/r-bioc-hdf5array-1.18.0/src/h5mread.c Examining data/r-bioc-hdf5array-1.18.0/src/h5mread.h Examining data/r-bioc-hdf5array-1.18.0/src/h5mread_helpers.c Examining data/r-bioc-hdf5array-1.18.0/src/h5mread_helpers.h Examining data/r-bioc-hdf5array-1.18.0/src/h5mread_sparse.c Examining data/r-bioc-hdf5array-1.18.0/src/h5mread_sparse.h Examining data/r-bioc-hdf5array-1.18.0/src/h5mread_starts.c Examining data/r-bioc-hdf5array-1.18.0/src/h5mread_starts.h Examining data/r-bioc-hdf5array-1.18.0/src/h5mread_startscounts.c Examining data/r-bioc-hdf5array-1.18.0/src/h5mread_startscounts.h Examining data/r-bioc-hdf5array-1.18.0/src/uaselection.c Examining data/r-bioc-hdf5array-1.18.0/src/uaselection.h FINAL RESULTS: data/r-bioc-hdf5array-1.18.0/src/H5DSetDescriptor.c:395:3: [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(storage_mode_attr, buf->elts); data/r-bioc-hdf5array-1.18.0/src/global_errmsg_buf.h:9:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(_HDF5Array_global_errmsg_buf(), ERRMSG_BUF_LENGTH, __VA_ARGS__) data/r-bioc-hdf5array-1.18.0/src/H5DSetDescriptor.c:15: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. static char s[32]; data/r-bioc-hdf5array-1.18.0/src/H5DSetDescriptor.c:31: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(s, "unknown (%d)", H5class); data/r-bioc-hdf5array-1.18.0/src/H5DSetDescriptor.c:37: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. static char s[32]; data/r-bioc-hdf5array-1.18.0/src/H5DSetDescriptor.c:46: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(s, "unknown (%d)", H5layout); data/r-bioc-hdf5array-1.18.0/src/global_errmsg_buf.c:10: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. static char buf[ERRMSG_BUF_LENGTH]; data/r-bioc-hdf5array-1.18.0/src/h5mread_sparse.c:116:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ae->elts, s, s_len); data/r-bioc-hdf5array-1.18.0/src/h5mread_sparse.c:157: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(out_p, nzindex_bufs->elts[along]->elts, data/r-bioc-hdf5array-1.18.0/src/h5mread_sparse.c:256: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(out_p, buf->elts, sizeof(int) * buf_nelt); data/r-bioc-hdf5array-1.18.0/src/h5mread_sparse.c:389:16: [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 val = ((char *) in)[in_offset]; data/r-bioc-hdf5array-1.18.0/src/h5mread_starts.c:144:16: [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 val = ((char *) in)[in_offset]; ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 5755 in approximately 0.13 seconds (42664 lines/second) Physical Source Lines of Code (SLOC) = 4448 Hits@level = [0] 4 [1] 0 [2] 10 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 16 [1+] 12 [2+] 12 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 3.59712 [1+] 2.69784 [2+] 2.69784 [3+] 0.44964 [4+] 0.44964 [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.