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-tiff-0.1-5/src/common.h Examining data/r-cran-tiff-0.1-5/src/common.c Examining data/r-cran-tiff-0.1-5/src/read.c Examining data/r-cran-tiff-0.1-5/src/write.c FINAL RESULTS: data/r-cran-tiff-0.1-5/src/common.c:15:5: [4] (format) vsnprintf: 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. vsnprintf(txtbuf, sizeof(txtbuf), fmt, ap); data/r-cran-tiff-0.1-5/src/common.c:26:5: [4] (format) vsnprintf: 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. vsnprintf(txtbuf, sizeof(txtbuf), fmt, ap); data/r-cran-tiff-0.1-5/src/common.c:9: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. static char txtbuf[2048]; data/r-cran-tiff-0.1-5/src/common.c:55: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(buf, rj->data + rj->ptr, to_read); data/r-cran-tiff-0.1-5/src/common.c:85: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(rj->data + rj->ptr, buf, length); data/r-cran-tiff-0.1-5/src/read.c:31: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 uv[24]; data/r-cran-tiff-0.1-5/src/read.c:53:6: [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 uv[24]; data/r-cran-tiff-0.1-5/src/read.c:59: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 uv[24]; data/r-cran-tiff-0.1-5/src/read.c:125: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 uv[24]; data/r-cran-tiff-0.1-5/src/read.c:167:6: [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). f = fopen(fn, "rb"); data/r-cran-tiff-0.1-5/src/read.c:224: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(line, src, ls); data/r-cran-tiff-0.1-5/src/read.c:225: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(src, dst, ls); data/r-cran-tiff-0.1-5/src/read.c:226: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(dst, line, ls); data/r-cran-tiff-0.1-5/src/write.c:60:6: [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). f = fopen(fn, "w+b"); data/r-cran-tiff-0.1-5/src/write.c:233: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(RAW(res), rj.data, rj.len); ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 935 in approximately 0.05 seconds (17072 lines/second) Physical Source Lines of Code (SLOC) = 853 Hits@level = [0] 5 [1] 0 [2] 13 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 20 [1+] 15 [2+] 15 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 23.4467 [1+] 17.585 [2+] 17.585 [3+] 2.34467 [4+] 2.34467 [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.