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/octave-image-acquisition-0.2.2/src/cl_img_win.cc
Examining data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.h
Examining data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc
Examining data/octave-image-acquisition-0.2.2/src/cl_img_win.h
Examining data/octave-image-acquisition-0.2.2/src/__v4l2_handler__.cc

FINAL RESULTS:

data/octave-image-acquisition-0.2.2/src/__v4l2_handler__.cc:50:10:  [2] (misc) open:
  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).
      h->open (device.c_str ());
data/octave-image-acquisition-0.2.2/src/__v4l2_handler__.cc:577:9:  [2] (misc) open:
  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).
      h.open(iter->c_str());
data/octave-image-acquisition-0.2.2/src/cl_img_win.cc:72: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 (pixel, p, len);
data/octave-image-acquisition-0.2.2/src/cl_img_win.cc:82:10:  [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[BUF_LEN];
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:23:3:  [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 buf[10];
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:24:3:  [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(buf, "%08x", num);
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:110:10:  [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 name[5];
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:203:15:  [2] (misc) open:
  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).
v4l2_handler::open (string d)
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:235: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 tmp[15];
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:768: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(p, buffers[buf.index].start, buf.bytesused);
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:791: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(p, buffers[buf.index].start, buf.bytesused);
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:805: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(p, buffers[buf.index].start, buf.bytesused);
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:849: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(p, buffers[buf.index].start, y.numel ());
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:853: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(p, (unsigned char*)buffers[buf.index].start + y.numel (), c1.numel ());
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:857: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(p, (unsigned char*)buffers[buf.index].start + y.numel () + c1.numel (), c2.numel ());
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:887: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(p, buffers[buf.index].start, buf.bytesused);
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:976:16:  [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).
  FILE *fout = fopen (fn, "w");
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.h:76:8:  [2] (misc) open:
  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).
  void open (string d);       //!< open a v4l2 device e.g. /dev/video0
data/octave-image-acquisition-0.2.2/src/cl_v4l2_handler.cc:520:17:  [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).
      int len = strlen(n);

ANALYSIS SUMMARY:

Hits = 19
Lines analyzed = 2054 in approximately 0.07 seconds (30128 lines/second)
Physical Source Lines of Code (SLOC) = 1442
Hits@level = [0]   3 [1]   1 [2]  18 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  22 [1+]  19 [2+]  18 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 15.2566 [1+] 13.1761 [2+] 12.4827 [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.