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/libr3-1.3.4/3rdparty/zmalloc.c
Examining data/libr3-1.3.4/3rdparty/zmalloc.h
Examining data/libr3-1.3.4/examples/simple.c
Examining data/libr3-1.3.4/examples/simple_cpp.cpp
Examining data/libr3-1.3.4/include/r3.h
Examining data/libr3-1.3.4/include/r3.hpp
Examining data/libr3-1.3.4/include/r3_define.h
Examining data/libr3-1.3.4/include/r3_gvc.h
Examining data/libr3-1.3.4/include/r3_json.h
Examining data/libr3-1.3.4/include/r3_list.h
Examining data/libr3-1.3.4/include/r3_str.h
Examining data/libr3-1.3.4/include/str_array.h
Examining data/libr3-1.3.4/php/r3/annotation/annot.h
Examining data/libr3-1.3.4/php/r3/annotation/base.c
Examining data/libr3-1.3.4/php/r3/annotation/lemon.c
Examining data/libr3-1.3.4/php/r3/annotation/lempar.c
Examining data/libr3-1.3.4/php/r3/annotation/parser.c
Examining data/libr3-1.3.4/php/r3/annotation/parser.h
Examining data/libr3-1.3.4/php/r3/annotation/scanner.c
Examining data/libr3-1.3.4/php/r3/annotation/scanner.h
Examining data/libr3-1.3.4/php/r3/ct_helper.c
Examining data/libr3-1.3.4/php/r3/ct_helper.h
Examining data/libr3-1.3.4/php/r3/hash.c
Examining data/libr3-1.3.4/php/r3/hash.h
Examining data/libr3-1.3.4/php/r3/php_expandable_mux.c
Examining data/libr3-1.3.4/php/r3/php_expandable_mux.h
Examining data/libr3-1.3.4/php/r3/php_r3.c
Examining data/libr3-1.3.4/php/r3/php_r3.h
Examining data/libr3-1.3.4/php/r3/r3_controller.c
Examining data/libr3-1.3.4/php/r3/r3_controller.h
Examining data/libr3-1.3.4/php/r3/r3_functions.c
Examining data/libr3-1.3.4/php/r3/r3_functions.h
Examining data/libr3-1.3.4/php/r3/r3_mux.c
Examining data/libr3-1.3.4/php/r3/r3_mux.h
Examining data/libr3-1.3.4/php/r3/r3_persistent.c
Examining data/libr3-1.3.4/php/r3/r3_persistent.h
Examining data/libr3-1.3.4/src/edge.c
Examining data/libr3-1.3.4/src/gvc.c
Examining data/libr3-1.3.4/src/json.c
Examining data/libr3-1.3.4/src/list.c
Examining data/libr3-1.3.4/src/match_entry.c
Examining data/libr3-1.3.4/src/node.c
Examining data/libr3-1.3.4/src/slug.c
Examining data/libr3-1.3.4/src/slug.h
Examining data/libr3-1.3.4/src/str.c
Examining data/libr3-1.3.4/src/token.c
Examining data/libr3-1.3.4/tests/bench.c
Examining data/libr3-1.3.4/tests/bench.h
Examining data/libr3-1.3.4/tests/check_gvc.c
Examining data/libr3-1.3.4/tests/check_json.c
Examining data/libr3-1.3.4/tests/check_routes.c
Examining data/libr3-1.3.4/tests/check_slug.c
Examining data/libr3-1.3.4/tests/check_str_array.c
Examining data/libr3-1.3.4/tests/check_tree.c

FINAL RESULTS:

data/libr3-1.3.4/include/r3_define.h:26:18:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            do { fprintf(stderr, fmt, ##__VA_ARGS__); } while (0)
data/libr3-1.3.4/include/r3_define.h:29:14:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        do { fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \
data/libr3-1.3.4/php/r3/annotation/lemon.c:1285:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(errmsg,format,ap);
data/libr3-1.3.4/php/r3/annotation/lemon.c:1336: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(*paz, z);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2590: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(name,lemp->filename);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2593:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat(name,suffix);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2798:14:  [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.
  extern int access();
data/libr3-1.3.4/php/r3/annotation/lemon.c:2809:16:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    if( path ) sprintf(path,"%s/%s",argv0,name);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2822:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(path,"%s/%s",pathlist,name);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2826:13:  [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.
        if( access(path,modemask)==0 ) break;
data/libr3-1.3.4/php/r3/annotation/lemon.c:2904:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(buf,"%s.lt",lemp->filename);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2906:7:  [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.
  if( access(buf,004)==0 ){
data/libr3-1.3.4/php/r3/annotation/lemon.c:2908:13:  [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.
  }else if( access(templatename,004)==0 ){
data/libr3-1.3.4/php/r3/annotation/lemon.c:3044:7:  [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(&z[used], zInt);
data/libr3-1.3.4/php/r3/annotation/lemon.c:3246:7:  [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(types[hash],stddt);
data/libr3-1.3.4/php/r3/annotation/lemon.c:3608:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(line,"\"%s\",",lemp->symbols[i]->name);
data/libr3-1.3.4/php/r3/annotation/lemon.c:3746:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i);
data/libr3-1.3.4/php/r3/annotation/lemon.c:3914:5:  [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(z,y);
data/libr3-1.3.4/php/r3/annotation/parser.c:1005:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(status->syntax_error, "Syntax error, unexpected EOF in %s", Z_STRVAL_P(status->scanner_state->active_file));
data/libr3-1.3.4/src/node.c:196:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(p, slug_pat);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2812:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    extern char *getenv();
data/libr3-1.3.4/php/r3/annotation/lemon.c:2813:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    pathlist = getenv("PATH");
data/libr3-1.3.4/php/r3/r3_functions.c:333:10:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    char realpath[MAXPATHLEN];
data/libr3-1.3.4/php/r3/r3_functions.c:335:30:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    if (!VCWD_REALPATH(path, realpath)) {
data/libr3-1.3.4/3rdparty/zmalloc.c:215: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(p,s,l);
data/libr3-1.3.4/3rdparty/zmalloc.c:232:19:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  return (char *) memcpy (result, s, len);
data/libr3-1.3.4/3rdparty/zmalloc.c:281:5:  [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[4096];
data/libr3-1.3.4/3rdparty/zmalloc.c:282:5:  [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 filename[256];
data/libr3-1.3.4/3rdparty/zmalloc.c:287: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).
    if ((fd = open(filename,O_RDONLY)) == -1) return 0;
data/libr3-1.3.4/3rdparty/zmalloc.c:347:5:  [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 line[1024];
data/libr3-1.3.4/3rdparty/zmalloc.c:349: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 *fp = fopen("/proc/self/smaps","r");
data/libr3-1.3.4/php/r3/annotation/lemon.c:1266: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 errmsg[ERRMSGSIZE];
data/libr3-1.3.4/php/r3/annotation/lemon.c:1267: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 prefix[PREFIXLIMIT+10];
data/libr3-1.3.4/php/r3/annotation/lemon.c:1277:5:  [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(prefix,"%.*s:%d: ",PREFIXLIMIT-10,filename,lineno);
data/libr3-1.3.4/php/r3/annotation/lemon.c:1279:5:  [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(prefix,"%.*s: ",PREFIXLIMIT-10,filename);
data/libr3-1.3.4/php/r3/annotation/lemon.c:1576: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 *set[LISTSIZE];
data/libr3-1.3.4/php/r3/annotation/lemon.c:1919: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 *alias[MAXRHS];       /* Aliases for each RHS symbol (or NULL) */
data/libr3-1.3.4/php/r3/annotation/lemon.c:2379:8:  [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).
  fp = fopen(ps.filename,"rb");
data/libr3-1.3.4/php/r3/annotation/lemon.c:2609:8:  [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).
  fp = fopen(lemp->outname,mode);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2761: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 buf[20];
data/libr3-1.3.4/php/r3/annotation/lemon.c:2763:9:  [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,"(%d)",cfp->rp->index);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2869: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 line[LINESIZE];
data/libr3-1.3.4/php/r3/annotation/lemon.c:2895: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[1000];
data/libr3-1.3.4/php/r3/annotation/lemon.c:2902:5:  [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,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2919:8:  [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).
  in = fopen(tpltname,"r");
data/libr3-1.3.4/php/r3/annotation/lemon.c:3021: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 zInt[40];
data/libr3-1.3.4/php/r3/annotation/lemon.c:3042: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(zInt, "%d", p1);
data/libr3-1.3.4/php/r3/annotation/lemon.c:3065: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 used[MAXRHS];   /* True for each RHS element which is used */
data/libr3-1.3.4/php/r3/annotation/lemon.c:3320: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 line[LINESIZE];
data/libr3-1.3.4/php/r3/annotation/lemon.c:3373:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if( atoi(lemp->stacksize)<=0 ){
data/libr3-1.3.4/php/r3/annotation/lemon.c:3737: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 line[LINESIZE];
data/libr3-1.3.4/php/r3/annotation/lemon.c:3738: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 pattern[LINESIZE];
data/libr3-1.3.4/php/r3/ct_helper.c:109:5:  [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  needle_char[2] = { ':', 0 };
data/libr3-1.3.4/php/r3/hash.c:34: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(target, source, sizeof(source[0]));
data/libr3-1.3.4/php/r3/hash.c:58:13:  [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(newp, curr, sizeof(Bucket));
data/libr3-1.3.4/php/r3/hash.c:61:13:  [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(newp, curr, sizeof(Bucket));
data/libr3-1.3.4/php/r3/hash.c:65:13:  [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(newp, curr, sizeof(Bucket) + curr->nKeyLength );
data/libr3-1.3.4/php/r3/hash.c:70:9:  [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(newp, curr, sizeof(Bucket) + curr->nKeyLength - 1);
data/libr3-1.3.4/php/r3/hash.c:86:9:  [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(&newp->pDataPtr, newp->pData, sizeof(void*));
data/libr3-1.3.4/php/r3/r3_functions.c:56: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, src, sizeof(zval));
data/libr3-1.3.4/php/r3/r3_functions.c:333:5:  [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 realpath[MAXPATHLEN];
data/libr3-1.3.4/php/r3/r3_mux.c:502:17:  [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 new_pattern[120] = { 0 };
data/libr3-1.3.4/php/r3/r3_mux.c:554:17:  [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 new_pattern[120] = { 0 };
data/libr3-1.3.4/src/str.c:212:9:  [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(o, "([^%c]+)", sep);
data/libr3-1.3.4/tests/bench.c:72: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 *fp = fopen(filename, "a+");
data/libr3-1.3.4/3rdparty/zmalloc.c:212:16:  [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 l = strlen(s)+1;
data/libr3-1.3.4/3rdparty/zmalloc.c:222:16:  [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 len = strlen (s);
data/libr3-1.3.4/3rdparty/zmalloc.c:288:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd,buf,4096) <= 0) {
data/libr3-1.3.4/examples/simple.c:51:65:  [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).
    match_entry * e = match_entry_createl("/garply/baz/grault", strlen("/garply/baz/grault") );
data/libr3-1.3.4/examples/simple_cpp.cpp:17:31:  [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).
    tree.insert_pathl("/zoo", strlen("/zoo"), &route_data_2);
data/libr3-1.3.4/examples/simple_cpp.cpp:19:35:  [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).
    tree.insert_pathl("/foo/bar", strlen("/foo/bar"), &route_data_3);
data/libr3-1.3.4/examples/simple_cpp.cpp:22:37:  [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).
    tree.insert_pathl("/post/{id}", strlen("/post/{id}") , &route_data_4);
data/libr3-1.3.4/examples/simple_cpp.cpp:25:42:  [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).
    tree.insert_pathl("/user/{id:\\d+}", strlen("/user/{id:\\d+}"),
data/libr3-1.3.4/examples/simple_cpp.cpp:32:9:  [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("/foo/{name:\\d{5}"), &data, &errstr);
data/libr3-1.3.4/examples/simple_cpp.cpp:50:53:  [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).
    r3::Node matched_node = tree.matchl("/foo/bar", strlen("/foo/bar"));
data/libr3-1.3.4/include/r3.h:122:65:  [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).
#define r3_node_connect(n, pat, child) r3_node_connectl(n, pat, strlen(pat), 0, child)
data/libr3-1.3.4/include/r3.h:143:64:  [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).
#define r3_tree_insert_path(n,p,d) r3_tree_insert_pathl_ex(n,p,strlen(p), NULL, d, NULL)
data/libr3-1.3.4/include/r3.h:145:89:  [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).
#define r3_tree_insert_route(n,method,path,data) r3_tree_insert_routel(n, method, path, strlen(path), data)
data/libr3-1.3.4/include/r3.h:165:51:  [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).
#define r3_tree_match(n,p,e)  r3_tree_matchl(n,p, strlen(p), e)
data/libr3-1.3.4/include/r3.h:195: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).
#define r3_route_create(p) r3_route_createl(p, strlen(p))
data/libr3-1.3.4/include/r3.h:218:59:  [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).
#define match_entry_create(path) match_entry_createl(path,strlen(path))
data/libr3-1.3.4/include/r3.hpp:93:62:  [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 r3_tree_insert_pathl_ex(get(), path, std::strlen(path), NULL,
data/libr3-1.3.4/include/r3.hpp:106:22:  [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).
                std::strlen(path), data, errstr);
data/libr3-1.3.4/php/r3/annotation/lemon.c:1281:16:  [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).
  prefixsize = strlen(prefix);
data/libr3-1.3.4/php/r3/annotation/lemon.c:1287:16:  [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).
  errmsgsize = strlen(errmsg);
data/libr3-1.3.4/php/r3/annotation/lemon.c:1331:18:  [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).
  *paz = malloc( strlen(z)+1 );
data/libr3-1.3.4/php/r3/annotation/lemon.c:1613:11:  [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).
  spcnt = strlen(argv[0]) + 1;
data/libr3-1.3.4/php/r3/annotation/lemon.c:1616:14:  [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).
    spcnt += strlen(argv[i]+1);
data/libr3-1.3.4/php/r3/annotation/lemon.c:1661:41:  [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( strncmp(&argv[i][1],op[j].label,strlen(op[j].label))==0 ) break;
data/libr3-1.3.4/php/r3/annotation/lemon.c:1837:11:  [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).
    len = strlen(op[i].label) + 1;
data/libr3-1.3.4/php/r3/annotation/lemon.c:1866:21:  [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)(max-strlen(op[i].label)-9),"",op[i].message);
data/libr3-1.3.4/php/r3/annotation/lemon.c:1871:21:  [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)(max-strlen(op[i].label)-6),"",op[i].message);
data/libr3-1.3.4/php/r3/annotation/lemon.c:1876:21:  [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)(max-strlen(op[i].label)-8),"",op[i].message);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2336:50:  [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( strncmp(azDefine[k],&z[j],n)==0 && strlen(azDefine[k])==n ){
data/libr3-1.3.4/php/r3/annotation/lemon.c:2585:18:  [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).
  name = malloc( strlen(lemp->filename) + strlen(suffix) + 5 );
data/libr3-1.3.4/php/r3/annotation/lemon.c:2585: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).
  name = malloc( strlen(lemp->filename) + strlen(suffix) + 5 );
data/libr3-1.3.4/php/r3/annotation/lemon.c:2630:11:  [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).
    len = strlen(sp->name);
data/libr3-1.3.4/php/r3/annotation/lemon.c:2808:28:  [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).
    path = (char *)malloc( strlen(argv0) + strlen(name) + 2 );
data/libr3-1.3.4/php/r3/annotation/lemon.c:2808:44:  [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).
    path = (char *)malloc( strlen(argv0) + strlen(name) + 2 );
data/libr3-1.3.4/php/r3/annotation/lemon.c:2815:28:  [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).
    path = (char *)malloc( strlen(pathlist)+strlen(name)+2 );
data/libr3-1.3.4/php/r3/annotation/lemon.c:2815:45:  [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).
    path = (char *)malloc( strlen(pathlist)+strlen(name)+2 );
data/libr3-1.3.4/php/r3/annotation/lemon.c:2819: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).
        if( cp==0 ) cp = &pathlist[strlen(pathlist)];
data/libr3-1.3.4/php/r3/annotation/lemon.c:3032:9:  [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).
    n = strlen(zText);
data/libr3-1.3.4/php/r3/annotation/lemon.c:3045:15:  [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).
      used += strlen(&z[used]);
data/libr3-1.3.4/php/r3/annotation/lemon.c:3187: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).
    maxdtlength = strlen(lemp->vartype);
data/libr3-1.3.4/php/r3/annotation/lemon.c:3193:11:  [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).
    len = strlen(sp->datatype);
data/libr3-1.3.4/php/r3/annotation/lemon.c:3241: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).
      types[hash] = (char*)malloc( strlen(stddt)+1 );
data/libr3-1.3.4/php/r3/annotation/lemon.c:3390:9:  [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).
    i = strlen(lemp->arg);
data/libr3-1.3.4/php/r3/annotation/lemon.c:3913: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).
  if( z==0 && (z=malloc( strlen(y)+1 ))!=0 ){
data/libr3-1.3.4/php/r3/annotation/parser.c:971:38:  [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).
				token_name = estrndup("UNKNOWN", strlen("UNKNOWN"));
data/libr3-1.3.4/php/r3/annotation/parser.c:974:37:  [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).
			status->syntax_error_len = 128 + strlen(token_name) + Z_STRLEN_P(status->scanner_state->active_file);
data/libr3-1.3.4/php/r3/r3_controller.c:99:18:  [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).
        fn_len = strlen(mptr->common.function_name);
data/libr3-1.3.4/php/r3/r3_controller.c:102: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).
        if ( p == -1 || (size_t)p != (fn_len - strlen("Action"))  ) {
data/libr3-1.3.4/php/r3/r3_controller.c:240:46:  [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 ( strncmp(method_name, "indexAction", strlen("indexAction") ) == 0 ) {
data/libr3-1.3.4/php/r3/r3_controller.c:390:74:  [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).
        zend_call_method_with_3_params(&new_mux, ce_r3_mux, NULL, "add", strlen("add"), &rv, 3, *z_path, z_callback, *z_options TSRMLS_CC);
data/libr3-1.3.4/php/r3/r3_functions.c:355:69:  [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).
        zend_hash_add(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1, (void *)&dummy, sizeof(int), NULL);
data/libr3-1.3.4/php/r3/r3_functions.c:560:68:  [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).
        zend_hash_quick_find( Z_ARRVAL_PP(a_options) , "compiled", strlen("compiled"), zend_inline_hash_func(ZEND_STRS("compiled")), (void**)&a_compiled_pattern);
data/libr3-1.3.4/php/r3/r3_functions.c:561:68:  [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).
        zend_hash_quick_find( Z_ARRVAL_PP(b_options) , "compiled", strlen("compiled"), zend_inline_hash_func(ZEND_STRS("compiled")), (void**)&b_compiled_pattern);
data/libr3-1.3.4/php/r3/r3_mux.c:62:49:  [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).
    zend_declare_property_null(ce_r3_mux, "id", strlen("id"), ZEND_ACC_PUBLIC TSRMLS_CC);
data/libr3-1.3.4/php/r3/r3_mux.c:63:53:  [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).
    zend_declare_property_null(ce_r3_mux, "routes", strlen("routes"), ZEND_ACC_PUBLIC TSRMLS_CC);
data/libr3-1.3.4/php/r3/r3_mux.c:64:57:  [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).
    zend_declare_property_null(ce_r3_mux, "routesById", strlen("routesById"), ZEND_ACC_PUBLIC TSRMLS_CC);
data/libr3-1.3.4/php/r3/r3_mux.c:65:59:  [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).
    zend_declare_property_null(ce_r3_mux, "staticRoutes", strlen("staticRoutes"), ZEND_ACC_PUBLIC TSRMLS_CC);
data/libr3-1.3.4/php/r3/r3_mux.c:66:53:  [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).
    zend_declare_property_null(ce_r3_mux, "submux", strlen("submux"), ZEND_ACC_PUBLIC TSRMLS_CC);
data/libr3-1.3.4/php/r3/r3_mux.c:67:53:  [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).
    zend_declare_property_bool(ce_r3_mux, "expand", strlen("expand"), 1, ZEND_ACC_PUBLIC TSRMLS_CC);
data/libr3-1.3.4/php/r3/r3_mux.c:68:57:  [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).
    zend_declare_property_long(ce_r3_mux, "id_counter", strlen("id_counter"), 0, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC TSRMLS_CC);
data/libr3-1.3.4/php/r3/r3_mux.c:73:52:  [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 ( zend_lookup_class( "R3\\PatternCompiler", strlen("R3\\PatternCompiler") , &ce_pattern_compiler TSRMLS_CC) == FAILURE ) {
data/libr3-1.3.4/php/r3/r3_mux.c:96:68:  [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).
    zend_call_method( NULL, *ce_pattern_compiler, NULL, "compile", strlen("compile"), &z_compiled_route, 2, z_pattern, z_options TSRMLS_CC );
data/libr3-1.3.4/php/r3/r3_mux.c:156:68:  [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).
    z_counter = zend_read_static_property(ce_r3_mux, "id_counter", strlen("id_counter") , 0 TSRMLS_CC);
data/libr3-1.3.4/php/r3/r3_mux.c:419:72:  [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).
            zend_call_method(&z_mux, ce_r3_controller, NULL, "expand", strlen("expand"), &rv, 0, NULL, NULL TSRMLS_CC );
data/libr3-1.3.4/php/r3/r3_mux.c:504:17:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
                strncat( new_pattern, pattern , pattern_len );
data/libr3-1.3.4/php/r3/r3_mux.c:505:17:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
                strncat( new_pattern, Z_STRVAL_PP(z_route_original_pattern) , Z_STRLEN_PP(z_route_original_pattern) );
data/libr3-1.3.4/php/r3/r3_mux.c:555:17:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
                strncat(new_pattern, pattern, pattern_len);
data/libr3-1.3.4/php/r3/r3_mux.c:557:17:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
                strncat(new_pattern, Z_STRVAL_PP(z_route_pattern), Z_STRLEN_PP(z_route_pattern) );
data/libr3-1.3.4/php/r3/r3_mux.c:600:66:  [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).
        zend_call_method( &z_mux, ce_r3_mux, &fe_getid, "getid", strlen("getid"), &z_mux_id, 0, NULL, NULL TSRMLS_CC );
data/libr3-1.3.4/php/r3/r3_mux.c:613: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).
                strlen("add"), &z_retval, 3, z_pattern, z_mux_id, z_options TSRMLS_CC);
data/libr3-1.3.4/php/r3/r3_mux.c:650:45:  [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).
        mthit = mthp = estrndup(req_method, strlen(req_method));
data/libr3-1.3.4/php/r3/r3_mux.c:730:61:  [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).
    zend_call_method( NULL, ce_r3_mux, NULL, "generate_id", strlen("generate_id"), &rv, 0, NULL, NULL TSRMLS_CC );
data/libr3-1.3.4/php/r3/r3_mux.c:760:50:  [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).
    zend_call_method( NULL, NULL, NULL, "usort", strlen("usort"), &retval_ptr, 2, 
data/libr3-1.3.4/php/r3/r3_mux.c:788:54:  [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).
        zend_call_method( NULL, NULL, NULL, "usort", strlen("usort"), &rv, 2, 
data/libr3-1.3.4/php/r3/r3_mux.c:805:78:  [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).
    zend_call_method( &this_ptr, Z_OBJCE_P(this_ptr) , &fe_export, "export", strlen("export"), &compiled_code, 0, NULL, NULL TSRMLS_CC );
data/libr3-1.3.4/php/r3/r3_mux.c:812: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).
    int  buf_len = Z_STRLEN_P(compiled_code) + strlen("<?php return ;") + 1;
data/libr3-1.3.4/php/r3/r3_mux.c:814:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
    strncat(buf, "<?php return ", strlen("<?php return ") );
data/libr3-1.3.4/php/r3/r3_mux.c:814:35:  [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).
    strncat(buf, "<?php return ", strlen("<?php return ") );
data/libr3-1.3.4/php/r3/r3_mux.c:815:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(buf, Z_STRVAL_P(compiled_code), Z_STRLEN_P(compiled_code));
data/libr3-1.3.4/php/r3/r3_mux.c:816:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
    strncat(buf, ";", 1);
data/libr3-1.3.4/php/r3/r3_mux.c:830:62:  [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).
    zend_call_method( NULL, NULL, NULL, "file_put_contents", strlen("file_put_contents"), &retval, 2, z_filename, z_code TSRMLS_CC );
data/libr3-1.3.4/php/r3/r3_mux.c:857:59:  [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).
    zend_call_method( &this_ptr, ce_r3_mux, &fe, "match", strlen("match"), &z_return_route, 1, z_path, NULL TSRMLS_CC );
data/libr3-1.3.4/php/r3/r3_mux.c:1058:68:  [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).
    zend_call_method( NULL, *ce_pattern_compiler, NULL, "compile", strlen("compile"), &rv, 1, z_pattern, NULL TSRMLS_CC );
data/libr3-1.3.4/src/node.c:198:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
            strncat(p,"^(", 2);
data/libr3-1.3.4/src/node.c:201:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
            strncat(p, e->pattern, e->pattern_len);
data/libr3-1.3.4/src/node.c:204:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
            strncat(p++,")", 1);
data/libr3-1.3.4/src/node.c:208:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
            strncat(p++,"|",1);
data/libr3-1.3.4/src/node.c:667:61:  [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).
                    opcode = r3_pattern_to_opcode(cpattern, strlen(cpattern));
data/libr3-1.3.4/src/str.c:194:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
    strncat(o, "^", 1);
data/libr3-1.3.4/src/str.c:197:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(o, str, s1 - str); // string before slug
data/libr3-1.3.4/src/str.c:207:9:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        strncat(o, pat, pat_len );
data/libr3-1.3.4/src/str.c:213:13:  [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).
        o+= strlen("([^*]+)");
data/libr3-1.3.4/src/str.c:216:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(o, s1, strlen(s1));
data/libr3-1.3.4/src/str.c:216:20:  [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).
    strncat(o, s1, strlen(s1));
data/libr3-1.3.4/tests/bench.c:452:42:  [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).
    r3_tree_matchl(n , "/qux/bar/corge", strlen("/qux/bar/corge"), NULL);
data/libr3-1.3.4/tests/bench.c:457:61:  [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).
    match_entry * e = match_entry_createl("/qux/bar/corge", strlen("/qux/bar/corge") );
data/libr3-1.3.4/tests/bench.c:469:44:  [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).
    r3_tree_matchl(tree2, "/post/2014/12", strlen("/post/2014/12"), NULL);
data/libr3-1.3.4/tests/check_slug.c:18:45:  [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).
    ck_assert( r3_pattern_to_opcode("\\w+", strlen("\\w+")) == OP_EXPECT_MORE_WORDS );
data/libr3-1.3.4/tests/check_slug.c:19:45:  [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).
    ck_assert( r3_pattern_to_opcode("\\d+", strlen("\\d+")) == OP_EXPECT_MORE_DIGITS );
data/libr3-1.3.4/tests/check_slug.c:20:45:  [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).
    ck_assert( r3_pattern_to_opcode("[^/]+",strlen("[^/]+")) == OP_EXPECT_NOSLASH );
data/libr3-1.3.4/tests/check_slug.c:21:45:  [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).
    ck_assert( r3_pattern_to_opcode("[^-]+",strlen("[^-]+")) == OP_EXPECT_NODASH );
data/libr3-1.3.4/tests/check_slug.c:29:49:  [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).
    ck_assert_str_eq( c = r3_slug_compile(path, strlen(path) ) , "^/user/([^/]+)" );
data/libr3-1.3.4/tests/check_slug.c:33:50:  [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).
    ck_assert_str_eq( c = r3_slug_compile(path2, strlen(path2) ) , "^/what/([^/]+)-foo" );
data/libr3-1.3.4/tests/check_slug.c:37:50:  [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).
    ck_assert_str_eq( c = r3_slug_compile(path3, strlen(path3)), "^-([^/]+)" );
data/libr3-1.3.4/tests/check_slug.c:41:50:  [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).
    ck_assert_str_eq( c = r3_slug_compile(path4, strlen(path4)), "^-(\\d{3})" );
data/libr3-1.3.4/tests/check_slug.c:93:28:  [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).
    ck_assert( slug_len == strlen("{idx:\\d{3}}") );
data/libr3-1.3.4/tests/check_slug.c:102:45:  [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).
    ck_assert( (int)r3_inside_slug(pattern, strlen(pattern), offset, NULL) );
data/libr3-1.3.4/tests/check_slug.c:103:42:  [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).
    ck_assert( *(r3_inside_slug(pattern, strlen(pattern), offset, NULL)) == '{' );
data/libr3-1.3.4/tests/check_slug.c:104:42:  [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).
    ck_assert( ! r3_inside_slug(pattern, strlen(pattern), pattern, NULL) );
data/libr3-1.3.4/tests/check_slug.c:113:34:  [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).
    cnt = r3_slug_count(pattern, strlen(pattern), &errstr);
data/libr3-1.3.4/tests/check_slug.c:169:34:  [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).
    cnt = r3_slug_count(pattern, strlen(pattern), &errstr);
data/libr3-1.3.4/tests/check_slug.c:174:35:  [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).
    cnt = r3_slug_count(pattern2, strlen(pattern2), &errstr);
data/libr3-1.3.4/tests/check_slug.c:179:35:  [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).
    cnt = r3_slug_count(pattern3, strlen(pattern3), &errstr);
data/libr3-1.3.4/tests/check_tree.c:266:42:  [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).
    entry = match_entry_createl( "foo" , strlen("/foo") );
data/libr3-1.3.4/tests/check_tree.c:267:37:  [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).
    m = r3_tree_matchl( n , "/foo", strlen("/foo"), entry);
data/libr3-1.3.4/tests/check_tree.c:270: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).
    entry = match_entry_createl( "/zoo" , strlen("/zoo") );
data/libr3-1.3.4/tests/check_tree.c:271:37:  [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).
    m = r3_tree_matchl( n , "/zoo", strlen("/zoo"), entry);
data/libr3-1.3.4/tests/check_tree.c:274: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).
    entry = match_entry_createl( "/bar" , strlen("/bar") );
data/libr3-1.3.4/tests/check_tree.c:275:37:  [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).
    m = r3_tree_matchl( n , "/bar", strlen("/bar"), entry);
data/libr3-1.3.4/tests/check_tree.c:278: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).
    entry = match_entry_createl( "/xxx" , strlen("/xxx") );
data/libr3-1.3.4/tests/check_tree.c:279:37:  [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).
    m = r3_tree_matchl( n , "/xxx", strlen("/xxx"), entry);
data/libr3-1.3.4/tests/check_tree.c:282:47:  [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).
    entry = match_entry_createl( "/foo/xxx" , strlen("/foo/xxx") );
data/libr3-1.3.4/tests/check_tree.c:283:41:  [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).
    m = r3_tree_matchl( n , "/foo/xxx", strlen("/foo/xxx"), entry);
data/libr3-1.3.4/tests/check_tree.c:286:47:  [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).
    entry = match_entry_createl( "/some_id" , strlen("/some_id") );
data/libr3-1.3.4/tests/check_tree.c:287:41:  [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).
    m = r3_tree_matchl( n , "/some_id", strlen("/some_id"), entry);
data/libr3-1.3.4/tests/check_tree.c:376:50:  [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).
    matched = r3_tree_matchl(n, "/post/111-222", strlen("/post/111-222"), NULL);
data/libr3-1.3.4/tests/check_tree.c:381:47:  [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).
    matched = r3_tree_matchl(n, "/post/111-", strlen("/post/111-"), NULL);
data/libr3-1.3.4/tests/check_tree.c:499:59:  [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).
    ret = r3_tree_insert_pathl_ex(n, "/foo/{name:\\d{5}", strlen("/foo/{name:\\d{5}"),  NULL, NULL, &errstr);
data/libr3-1.3.4/tests/check_tree.c:636: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).
    entry = match_entry_createl( "/user/123" , strlen("/user/123") );
data/libr3-1.3.4/tests/check_tree.c:643:46:  [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).
    matched = r3_tree_matchl(n, "/user/123", strlen("/user/123"), entry);
data/libr3-1.3.4/tests/check_tree.c:655: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).
    entry = match_entry_createl( "/user/123" , strlen("/user/123") );
data/libr3-1.3.4/tests/check_tree.c:676:46:  [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).
    matched = r3_tree_matchl(n, "/user/123", strlen("/user/123"), entry);
data/libr3-1.3.4/tests/check_tree.c:685:47:  [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).
    matched = r3_tree_matchl(n, "/user2/123", strlen("/user2/123"), entry);
data/libr3-1.3.4/tests/check_tree.c:691:47:  [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).
    matched = r3_tree_matchl(n, "/user3/123", strlen("/user3/123"), entry);

ANALYSIS SUMMARY:

Hits = 199
Lines analyzed = 18269 in approximately 0.54 seconds (33601 lines/second)
Physical Source Lines of Code (SLOC) = 13857
Hits@level = [0] 245 [1] 134 [2]  41 [3]   4 [4]  20 [5]   0
Hits@level+ = [0+] 444 [1+] 199 [2+]  65 [3+]  24 [4+]  20 [5+]   0
Hits/KSLOC@level+ = [0+] 32.0416 [1+] 14.361 [2+] 4.69077 [3+] 1.73198 [4+] 1.44331 [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.