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/ruby-narray-0.6.1.2/src/narray.h
Examining data/ruby-narray-0.6.1.2/src/na_linalg.c
Examining data/ruby-narray-0.6.1.2/src/narray.c
Examining data/ruby-narray-0.6.1.2/src/na_func.c
Examining data/ruby-narray-0.6.1.2/src/na_random.c
Examining data/ruby-narray-0.6.1.2/src/narray_local.h
Examining data/ruby-narray-0.6.1.2/src/na_index.c
Examining data/ruby-narray-0.6.1.2/src/na_array.c

FINAL RESULTS:

data/ruby-narray-0.6.1.2/src/narray.c:806:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf, "%s.%s(): []", classname, na_typestring[ary->type]);
data/ruby-narray-0.6.1.2/src/narray.c:810:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(buf, (ary->ref==Qnil) ? org:ref,
data/ruby-narray-0.6.1.2/src/na_func.c:1537: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(a2->ptr, a1->ptr, a1->total*na_sizeof[a1->type]);
data/ruby-narray-0.6.1.2/src/na_linalg.c:20: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(tmp,a,sz); memcpy(a,b,sz); memcpy(b,tmp,sz); }
data/ruby-narray-0.6.1.2/src/na_linalg.c:20:21:  [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(tmp,a,sz); memcpy(a,b,sz); memcpy(b,tmp,sz); }
data/ruby-narray-0.6.1.2/src/na_linalg.c:20:37:  [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(tmp,a,sz); memcpy(a,b,sz); memcpy(b,tmp,sz); }
data/ruby-narray-0.6.1.2/src/na_linalg.c:356: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(xi, y+((int32_t*)idx)[i]*sz, sz);
data/ruby-narray-0.6.1.2/src/na_linalg.c:531: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(shape,a2->shape+1,sizeof(int)*(ndim-1));
data/ruby-narray-0.6.1.2/src/narray.c:458: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(cpy->ptr, org->ptr, na_sizeof[org->type] * org->total);
data/ruby-narray-0.6.1.2/src/narray.c:471: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(dst->ptr, src->ptr, src->total*na_sizeof[src->type]);
data/ruby-narray-0.6.1.2/src/narray.c:634: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( ary->ptr, RSTRING_PTR(str), ary->total*na_sizeof[type] );
data/ruby-narray-0.6.1.2/src/narray.c:796: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[256];
data/ruby-narray-0.6.1.2/src/narray.c:814:7:  [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,",%i",ary->shape[i]);
data/ruby-narray-0.6.1.2/src/narray.c:807:24:  [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).
    rb_str_cat(str,buf,strlen(buf));
data/ruby-narray-0.6.1.2/src/narray.c:812:24:  [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).
    rb_str_cat(str,buf,strlen(buf));
data/ruby-narray-0.6.1.2/src/narray.c:815:26:  [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).
      rb_str_cat(str,buf,strlen(buf));

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 6141 in approximately 0.15 seconds (41735 lines/second)
Physical Source Lines of Code (SLOC) = 4509
Hits@level = [0]   0 [1]   3 [2]  11 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]  16 [1+]  16 [2+]  13 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 3.54846 [1+] 3.54846 [2+] 2.88312 [3+] 0.443557 [4+] 0.443557 [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.