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/libtext-bidi-perl-2.15/private.c

FINAL RESULTS:

data/libtext-bidi-perl-2.15/private.c:666:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(r,name);
data/libtext-bidi-perl-2.15/private.c:1253:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(r,SWIG_Perl_TypeProxyName(type));
data/libtext-bidi-perl-2.15/private.c:1481:8:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
#ifdef access
data/libtext-bidi-perl-2.15/private.c:1482:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  #undef access
data/libtext-bidi-perl-2.15/private.c:617:16:  [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 const char hex[17] = "0123456789abcdef";
data/libtext-bidi-perl-2.15/private.c:1248: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 result[1024];
data/libtext-bidi-perl-2.15/private.c:1472: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).
#ifdef open
data/libtext-bidi-perl-2.15/private.c:1473: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).
  #undef open
data/libtext-bidi-perl-2.15/private.c:1579:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	  *cptr = (char *)memcpy(malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
data/libtext-bidi-perl-2.15/private.c:1977:63:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      fribidi_unicode_version = csize ? (char const *)(char *)memcpy(malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0;
data/libtext-bidi-perl-2.15/private.c:2003:60:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      fribidi_version_info = csize ? (char const *)(char *)memcpy(malloc((csize)*sizeof(char)), cptr, sizeof(char)*(csize)) : 0;
data/libtext-bidi-perl-2.15/private.c:2291:55:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    ST(argvi) = SWIG_NewPointerObj((fribidi_boolean *)memcpy((fribidi_boolean *)calloc(1,sizeof(fribidi_boolean)),&result,sizeof(fribidi_boolean)), SWIGTYPE_p_fribidi_boolean, SWIG_POINTER_OWN | 0); argvi++ ;
data/libtext-bidi-perl-2.15/private.c:2729:55:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    ST(argvi) = SWIG_NewPointerObj((fribidi_boolean *)memcpy((fribidi_boolean *)calloc(1,sizeof(fribidi_boolean)),&result,sizeof(fribidi_boolean)), SWIGTYPE_p_fribidi_boolean, SWIG_POINTER_OWN | 0); argvi++ ;
data/libtext-bidi-perl-2.15/private.c:2761:55:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    ST(argvi) = SWIG_NewPointerObj((fribidi_boolean *)memcpy((fribidi_boolean *)calloc(1,sizeof(fribidi_boolean)),&result,sizeof(fribidi_boolean)), SWIGTYPE_p_fribidi_boolean, SWIG_POINTER_OWN | 0); argvi++ ;
data/libtext-bidi-perl-2.15/private.c:2779:55:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    ST(argvi) = SWIG_NewPointerObj((fribidi_boolean *)memcpy((fribidi_boolean *)calloc(1,sizeof(fribidi_boolean)),&result,sizeof(fribidi_boolean)), SWIGTYPE_p_fribidi_boolean, SWIG_POINTER_OWN | 0); argvi++ ;
data/libtext-bidi-perl-2.15/private.c:2811:55:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    ST(argvi) = SWIG_NewPointerObj((fribidi_boolean *)memcpy((fribidi_boolean *)calloc(1,sizeof(fribidi_boolean)),&result,sizeof(fribidi_boolean)), SWIGTYPE_p_fribidi_boolean, SWIG_POINTER_OWN | 0); argvi++ ;
data/libtext-bidi-perl-2.15/private.c:3816:27:  [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.
      sv_setpv(sv, (const char *) swig_constants[i].pvalue);
data/libtext-bidi-perl-2.15/private.c:381:25:  [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).
  const char* te = tb + strlen(tb);
data/libtext-bidi-perl-2.15/private.c:665:7:  [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).
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
data/libtext-bidi-perl-2.15/private.c:686: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).
  size_t lname = (name ? strlen(name) : 0);
data/libtext-bidi-perl-2.15/private.c:691:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(r,name,lname+1);
data/libtext-bidi-perl-2.15/private.c:1250:19:  [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).
  if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
data/libtext-bidi-perl-2.15/private.c:1342:27:  [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).
  sv_magic(sv,sv,'U',name,strlen(name));
data/libtext-bidi-perl-2.15/private.c:1439:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#ifdef read
data/libtext-bidi-perl-2.15/private.c:1440:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  #undef read
data/libtext-bidi-perl-2.15/private.c:1594:30:  [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).
	if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
data/libtext-bidi-perl-2.15/private.c:1620:48:  [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).
  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));

ANALYSIS SUMMARY:

Hits = 27
Lines analyzed = 4573 in approximately 0.16 seconds (28153 lines/second)
Physical Source Lines of Code (SLOC) = 3500
Hits@level = [0]  14 [1]  10 [2]  13 [3]   0 [4]   4 [5]   0
Hits@level+ = [0+]  41 [1+]  27 [2+]  17 [3+]   4 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 11.7143 [1+] 7.71429 [2+] 4.85714 [3+] 1.14286 [4+] 1.14286 [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.