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/aiscm-0.21.1/aiscm/util.c
Examining data/aiscm-0.21.1/aiscm/tests.c
Examining data/aiscm-0.21.1/aiscm/ringbuffer.h
Examining data/aiscm-0.21.1/aiscm/magick.c
Examining data/aiscm-0.21.1/aiscm/xorg.c
Examining data/aiscm-0.21.1/aiscm/samples-helpers-tests.c
Examining data/aiscm-0.21.1/aiscm/image.c
Examining data/aiscm-0.21.1/aiscm/ringbuffer-tests.c
Examining data/aiscm-0.21.1/aiscm/util-helpers-tests.c
Examining data/aiscm-0.21.1/aiscm/pulse.c
Examining data/aiscm-0.21.1/aiscm/ffmpeg-helpers-tests.c
Examining data/aiscm-0.21.1/aiscm/samples-helpers.c
Examining data/aiscm-0.21.1/aiscm/samples-helpers.h
Examining data/aiscm-0.21.1/aiscm/core.c
Examining data/aiscm-0.21.1/aiscm/ffmpeg-helpers.c
Examining data/aiscm-0.21.1/aiscm/samples.c
Examining data/aiscm-0.21.1/aiscm/ffmpeg-helpers.h
Examining data/aiscm-0.21.1/aiscm/ringbuffer.c
Examining data/aiscm-0.21.1/aiscm/ffmpeg.c
Examining data/aiscm-0.21.1/aiscm/util-helpers.c
Examining data/aiscm-0.21.1/aiscm/util-helpers.h
Examining data/aiscm-0.21.1/aiscm/v4l2.c
Examining data/aiscm-0.21.1/bench/cbench.c

FINAL RESULTS:

data/aiscm-0.21.1/aiscm/ffmpeg.c:81: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[255];
data/aiscm-0.21.1/aiscm/ffmpeg.c:965: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((char *)userdata + offset, data, count);
data/aiscm-0.21.1/aiscm/pulse.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((char *)userdata + offset, data, count);
data/aiscm-0.21.1/aiscm/ringbuffer-tests.c:51: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 data[100];
data/aiscm-0.21.1/aiscm/ringbuffer-tests.c:144: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((char *)userdata + offset, data, count);
data/aiscm-0.21.1/aiscm/ringbuffer-tests.c:151: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[5];
data/aiscm-0.21.1/aiscm/ringbuffer.c:62: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(ringbuffer, &resize, sizeof(struct ringbuffer_t));
data/aiscm-0.21.1/aiscm/ringbuffer.c:73: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(ringbuffer->buffer + ringbuffer->write_offset, data, boundary);
data/aiscm-0.21.1/aiscm/ringbuffer.c:74: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(ringbuffer->buffer, data + boundary, count - boundary);
data/aiscm-0.21.1/aiscm/ringbuffer.c:77: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(ringbuffer->buffer + ringbuffer->write_offset, data, count);
data/aiscm-0.21.1/aiscm/v4l2.c:113:14:  [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).
  self->fd = open(name, O_RDWR, 0);
data/aiscm-0.21.1/aiscm/ffmpeg.c:580:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(self->fmt_ctx->filename, file_name, sizeof(self->fmt_ctx->filename));
data/aiscm-0.21.1/aiscm/pulse.c:244:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep(usecs_remaining);
data/aiscm-0.21.1/aiscm/v4l2.c:197:23:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
      self->user[0] = memalign(page_size, buffer_size);
data/aiscm-0.21.1/aiscm/v4l2.c:198:23:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
      self->user[1] = memalign(page_size, buffer_size);
data/aiscm-0.21.1/aiscm/v4l2.c:290:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read(self->fd, buf, size) == -1)

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 4540 in approximately 0.16 seconds (28460 lines/second)
Physical Source Lines of Code (SLOC) = 3619
Hits@level = [0]   0 [1]   5 [2]  11 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  16 [1+]  16 [2+]  11 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.42111 [1+] 4.42111 [2+] 3.03951 [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.