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-png-0.1-7/src/read.c
Examining data/r-cran-png-0.1-7/src/write.c

FINAL RESULTS:

data/r-cran-png-0.1-7/src/read.c:31: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(data, rj->data + rj->ptr, to_read);
data/r-cran-png-0.1-7/src/read.c:53: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 header[8];
data/r-cran-png-0.1-7/src/read.c:68: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-png-0.1-7/src/read.c:167: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 bo[4] = { 1, 0, 0, 0 };
data/r-cran-png-0.1-7/src/read.c:169:6:  [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(&bi, bo, 4);
data/r-cran-png-0.1-7/src/read.c:254: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(idata, row_pointers[y], width * sizeof(int));
data/r-cran-png-0.1-7/src/read.c:307:44:  [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 int)(((unsigned char *)row_pointers[y])[2 * (x * pln + p)])) << 8) |
data/r-cran-png-0.1-7/src/read.c:308:44:  [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 int)(((unsigned char *)row_pointers[y])[2 * (x * pln + p) + 1]))
data/r-cran-png-0.1-7/src/write.c:37:6:  [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, data, to_write);
data/r-cran-png-0.1-7/src/write.c:160: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, "wb");
data/r-cran-png-0.1-7/src/write.c:236: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(row_pointers[y], idata, width * sizeof(int));
data/r-cran-png-0.1-7/src/write.c:241: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 bo[4] = { 1, 0, 0, 0 };
data/r-cran-png-0.1-7/src/write.c:243: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(&bi, bo, 4);
data/r-cran-png-0.1-7/src/write.c:299:6:  [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(data, RAW(ve), this_len);

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 642 in approximately 0.03 seconds (19434 lines/second)
Physical Source Lines of Code (SLOC) = 546
Hits@level = [0]   1 [1]   0 [2]  14 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  15 [1+]  14 [2+]  14 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 27.4725 [1+] 25.641 [2+] 25.641 [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.