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/pillow-sane-2.8.3/_sane.c

FINAL RESULTS:

data/pillow-sane-2.8.3/_sane.c:336: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(v, &wordval, sizeof(SANE_Word));
data/pillow-sane-2.8.3/_sane.c:346: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(v, &wordval, sizeof(SANE_Word));
data/pillow-sane-2.8.3/_sane.c:440:18:  [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 unsigned char bitMasks[8] = {128, 64, 32, 16, 8, 4, 2, 1};
data/pillow-sane-2.8.3/_sane.c:510:15:  [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(imgBuf + imgBufOffset, lineBuf, imgBytesPerLine);
data/pillow-sane-2.8.3/_sane.c:515:17:  [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(imgBuf + imgBufOffset, lineBuf, imgBytesPerLine);
data/pillow-sane-2.8.3/_sane.c:232:43:  [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).
                                          strlen(d->constraint.string_list[j]),
data/pillow-sane-2.8.3/_sane.c:291:36:  [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).
                                   strlen((const char *) v),
data/pillow-sane-2.8.3/_sane.c:363:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(v, PyBytes_AsString(strobj), d->size - 1);
data/pillow-sane-2.8.3/_sane.c:373:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(v, PyString_AsString(value), d->size - 1);

ANALYSIS SUMMARY:

Hits = 9
Lines analyzed = 880 in approximately 0.04 seconds (23705 lines/second)
Physical Source Lines of Code (SLOC) = 713
Hits@level = [0]   0 [1]   4 [2]   5 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]   9 [1+]   9 [2+]   5 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 12.6227 [1+] 12.6227 [2+] 7.01262 [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.