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/mongrel2-1.12.2/examples/kegogi/lemon.c
Examining data/mongrel2-1.12.2/examples/kegogi/lempar.c
Examining data/mongrel2-1.12.2/examples/kegogi/src/fuzzrnd.c
Examining data/mongrel2-1.12.2/examples/kegogi/src/fuzzrnd.h
Examining data/mongrel2-1.12.2/examples/kegogi/src/httpclient.c
Examining data/mongrel2-1.12.2/examples/kegogi/src/httpclient.h
Examining data/mongrel2-1.12.2/examples/kegogi/src/kegogi.c
Examining data/mongrel2-1.12.2/examples/kegogi/src/kegogi.h
Examining data/mongrel2-1.12.2/examples/kegogi/src/kegogi_lexer.c
Examining data/mongrel2-1.12.2/examples/kegogi/src/kegogi_parser.c
Examining data/mongrel2-1.12.2/examples/kegogi/src/kegogi_parser.h
Examining data/mongrel2-1.12.2/examples/kegogi/src/kegogi_parser_extra.c
Examining data/mongrel2-1.12.2/examples/kegogi/src/kegogi_tokens.c
Examining data/mongrel2-1.12.2/examples/kegogi/src/kegogi_tokens.h
Examining data/mongrel2-1.12.2/examples/kegogi/src/param.c
Examining data/mongrel2-1.12.2/examples/kegogi/src/param.h
Examining data/mongrel2-1.12.2/src/adt/darray.c
Examining data/mongrel2-1.12.2/src/adt/darray.h
Examining data/mongrel2-1.12.2/src/adt/dict.c
Examining data/mongrel2-1.12.2/src/adt/dict.h
Examining data/mongrel2-1.12.2/src/adt/hash.c
Examining data/mongrel2-1.12.2/src/adt/hash.h
Examining data/mongrel2-1.12.2/src/adt/list.c
Examining data/mongrel2-1.12.2/src/adt/list.h
Examining data/mongrel2-1.12.2/src/adt/radixmap.h
Examining data/mongrel2-1.12.2/src/adt/tst.c
Examining data/mongrel2-1.12.2/src/adt/tst.h
Examining data/mongrel2-1.12.2/src/adt/radixmap.c
Examining data/mongrel2-1.12.2/src/bsd_specific.h
Examining data/mongrel2-1.12.2/src/bstr/bsafe.c
Examining data/mongrel2-1.12.2/src/bstr/bsafe.h
Examining data/mongrel2-1.12.2/src/bstr/bstraux.c
Examining data/mongrel2-1.12.2/src/bstr/bstraux.h
Examining data/mongrel2-1.12.2/src/bstr/bstrlib.c
Examining data/mongrel2-1.12.2/src/bstr/bstrlib.h
Examining data/mongrel2-1.12.2/src/bstring.h
Examining data/mongrel2-1.12.2/src/cache.c
Examining data/mongrel2-1.12.2/src/cache.h
Examining data/mongrel2-1.12.2/src/chunked.c
Examining data/mongrel2-1.12.2/src/chunked.h
Examining data/mongrel2-1.12.2/src/config/config.c
Examining data/mongrel2-1.12.2/src/config/config.h
Examining data/mongrel2-1.12.2/src/config/db.c
Examining data/mongrel2-1.12.2/src/config/db.h
Examining data/mongrel2-1.12.2/src/config/module.c
Examining data/mongrel2-1.12.2/src/config/module.h
Examining data/mongrel2-1.12.2/src/connection.h
Examining data/mongrel2-1.12.2/src/control.c
Examining data/mongrel2-1.12.2/src/control.h
Examining data/mongrel2-1.12.2/src/dbg.c
Examining data/mongrel2-1.12.2/src/dbg.h
Examining data/mongrel2-1.12.2/src/dir.c
Examining data/mongrel2-1.12.2/src/dir.h
Examining data/mongrel2-1.12.2/src/events.h
Examining data/mongrel2-1.12.2/src/filter.c
Examining data/mongrel2-1.12.2/src/filter.h
Examining data/mongrel2-1.12.2/src/handler.c
Examining data/mongrel2-1.12.2/src/handler.h
Examining data/mongrel2-1.12.2/src/handler_parser.c
Examining data/mongrel2-1.12.2/src/handler_parser.h
Examining data/mongrel2-1.12.2/src/headers.c
Examining data/mongrel2-1.12.2/src/headers.h
Examining data/mongrel2-1.12.2/src/host.c
Examining data/mongrel2-1.12.2/src/host.h
Examining data/mongrel2-1.12.2/src/http11/http11_common.h
Examining data/mongrel2-1.12.2/src/http11/http11_parser.c
Examining data/mongrel2-1.12.2/src/http11/http11_parser.h
Examining data/mongrel2-1.12.2/src/http11/httpclient_parser.c
Examining data/mongrel2-1.12.2/src/http11/httpclient_parser.h
Examining data/mongrel2-1.12.2/src/io.c
Examining data/mongrel2-1.12.2/src/log.c
Examining data/mongrel2-1.12.2/src/log.h
Examining data/mongrel2-1.12.2/src/logrotate.c
Examining data/mongrel2-1.12.2/src/logrotate.h
Examining data/mongrel2-1.12.2/src/mem/align.h
Examining data/mongrel2-1.12.2/src/mem/halloc.c
Examining data/mongrel2-1.12.2/src/mem/halloc.h
Examining data/mongrel2-1.12.2/src/mem/hlist.h
Examining data/mongrel2-1.12.2/src/mem/macros.h
Examining data/mongrel2-1.12.2/src/mime.c
Examining data/mongrel2-1.12.2/src/mime.h
Examining data/mongrel2-1.12.2/src/mongrel2.c
Examining data/mongrel2-1.12.2/src/pattern.c
Examining data/mongrel2-1.12.2/src/pattern.h
Examining data/mongrel2-1.12.2/src/proxy.c
Examining data/mongrel2-1.12.2/src/proxy.h
Examining data/mongrel2-1.12.2/src/register.c
Examining data/mongrel2-1.12.2/src/register.h
Examining data/mongrel2-1.12.2/src/request.c
Examining data/mongrel2-1.12.2/src/request.h
Examining data/mongrel2-1.12.2/src/response.c
Examining data/mongrel2-1.12.2/src/response.h
Examining data/mongrel2-1.12.2/src/routing.c
Examining data/mongrel2-1.12.2/src/routing.h
Examining data/mongrel2-1.12.2/src/server.c
Examining data/mongrel2-1.12.2/src/server.h
Examining data/mongrel2-1.12.2/src/setting.c
Examining data/mongrel2-1.12.2/src/setting.h
Examining data/mongrel2-1.12.2/src/state.c
Examining data/mongrel2-1.12.2/src/state.h
Examining data/mongrel2-1.12.2/src/superpoll.c
Examining data/mongrel2-1.12.2/src/superpoll.h
Examining data/mongrel2-1.12.2/src/task/386-ucontext.h
Examining data/mongrel2-1.12.2/src/task/amd64-ucontext.h
Examining data/mongrel2-1.12.2/src/task/context.c
Examining data/mongrel2-1.12.2/src/task/fd.c
Examining data/mongrel2-1.12.2/src/task/net.c
Examining data/mongrel2-1.12.2/src/task/power-ucontext.h
Examining data/mongrel2-1.12.2/src/task/qlock.c
Examining data/mongrel2-1.12.2/src/task/rendez.c
Examining data/mongrel2-1.12.2/src/task/task.c
Examining data/mongrel2-1.12.2/src/task/task.h
Examining data/mongrel2-1.12.2/src/task/taskimpl.h
Examining data/mongrel2-1.12.2/src/tnetstrings.c
Examining data/mongrel2-1.12.2/src/tnetstrings.h
Examining data/mongrel2-1.12.2/src/tnetstrings_impl.h
Examining data/mongrel2-1.12.2/src/unixy.c
Examining data/mongrel2-1.12.2/src/upload.c
Examining data/mongrel2-1.12.2/src/upload.h
Examining data/mongrel2-1.12.2/src/version.h
Examining data/mongrel2-1.12.2/src/websocket.c
Examining data/mongrel2-1.12.2/src/websocket.h
Examining data/mongrel2-1.12.2/src/xrequest.c
Examining data/mongrel2-1.12.2/src/xrequest.h
Examining data/mongrel2-1.12.2/src/zmq_compat.h
Examining data/mongrel2-1.12.2/src/bsd_specific.c
Examining data/mongrel2-1.12.2/src/connection.c
Examining data/mongrel2-1.12.2/src/io.h
Examining data/mongrel2-1.12.2/src/unixy.h
Examining data/mongrel2-1.12.2/tests/bstr_tests.c
Examining data/mongrel2-1.12.2/tests/cache_tests.c
Examining data/mongrel2-1.12.2/tests/cert_tests.c
Examining data/mongrel2-1.12.2/tests/chunked_tests.c
Examining data/mongrel2-1.12.2/tests/config_tests.c
Examining data/mongrel2-1.12.2/tests/connection_tests.c
Examining data/mongrel2-1.12.2/tests/darray_tests.c
Examining data/mongrel2-1.12.2/tests/db_tests.c
Examining data/mongrel2-1.12.2/tests/dict_tests.c
Examining data/mongrel2-1.12.2/tests/dir_tests.c
Examining data/mongrel2-1.12.2/tests/filter_tests.c
Examining data/mongrel2-1.12.2/tests/filters/test_filter.c
Examining data/mongrel2-1.12.2/tests/filters/test_filter_a.c
Examining data/mongrel2-1.12.2/tests/filters/test_filter_b.c
Examining data/mongrel2-1.12.2/tests/filters/test_filter_c.c
Examining data/mongrel2-1.12.2/tests/handler_parser_tests.c
Examining data/mongrel2-1.12.2/tests/handler_tests.c
Examining data/mongrel2-1.12.2/tests/hash_tests.c
Examining data/mongrel2-1.12.2/tests/host_tests.c
Examining data/mongrel2-1.12.2/tests/http11_tests.c
Examining data/mongrel2-1.12.2/tests/httpclient_tests.c
Examining data/mongrel2-1.12.2/tests/io_tests.c
Examining data/mongrel2-1.12.2/tests/list_tests.c
Examining data/mongrel2-1.12.2/tests/mime_tests.c
Examining data/mongrel2-1.12.2/tests/minunit.h
Examining data/mongrel2-1.12.2/tests/pattern_tests.c
Examining data/mongrel2-1.12.2/tests/proxy_tests.c
Examining data/mongrel2-1.12.2/tests/radixmap_tests.c
Examining data/mongrel2-1.12.2/tests/register_tests.c
Examining data/mongrel2-1.12.2/tests/request_tests.c
Examining data/mongrel2-1.12.2/tests/response_tests.c
Examining data/mongrel2-1.12.2/tests/routing_tests.c
Examining data/mongrel2-1.12.2/tests/server_tests.c
Examining data/mongrel2-1.12.2/tests/setting_tests.c
Examining data/mongrel2-1.12.2/tests/state_tests.c
Examining data/mongrel2-1.12.2/tests/superpoll_tests.c
Examining data/mongrel2-1.12.2/tests/tnetstrings_tests.c
Examining data/mongrel2-1.12.2/tests/tst_tests.c
Examining data/mongrel2-1.12.2/tests/unixy_tests.c
Examining data/mongrel2-1.12.2/tools/config_modules/mongodb.c
Examining data/mongrel2-1.12.2/tools/config_modules/null.c
Examining data/mongrel2-1.12.2/tools/config_modules/zmq.c
Examining data/mongrel2-1.12.2/tools/filters/null.c
Examining data/mongrel2-1.12.2/tools/filters/rewrite.c
Examining data/mongrel2-1.12.2/tools/filters/sendfile.c
Examining data/mongrel2-1.12.2/tools/lemon/lemon.c
Examining data/mongrel2-1.12.2/tools/lemon/lempar.c
Examining data/mongrel2-1.12.2/tools/m2sh/lempar.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/ast.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/ast.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/cli.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/cli.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/access.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/access.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/config.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/config.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/helpers.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/helpers.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/logging.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/logging.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/querying.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/querying.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/running.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/commands/running.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/config_file.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/config_file.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/constants.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/constants.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/lexer.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/linenoise.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/m2sh.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/parser.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/parser.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/query_print.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/query_print.h
Examining data/mongrel2-1.12.2/tools/m2sh/src/token.c
Examining data/mongrel2-1.12.2/tools/m2sh/src/token.h
Examining data/mongrel2-1.12.2/tools/m2sh/tests/cli_tests.c
Examining data/mongrel2-1.12.2/tools/m2sh/tests/minunit.h
Examining data/mongrel2-1.12.2/tools/m2sh/tests/parser_tests.c
Examining data/mongrel2-1.12.2/tools/procer/procer.c
Examining data/mongrel2-1.12.2/tools/procer/procer.h
Examining data/mongrel2-1.12.2/tools/procer/profile.c
Examining data/mongrel2-1.12.2/tools/procer/rampart.c

FINAL RESULTS:

data/mongrel2-1.12.2/src/bstr/bsafe.c:43:9:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
char * (gets) (char * buf) {
data/mongrel2-1.12.2/src/bstr/bsafe.h:26:16:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
extern char * (gets) (char * buf);
data/mongrel2-1.12.2/src/upload.c:139:10:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    rc = chmod((char *)tmp_name->data, UPLOAD_MODE);
data/mongrel2-1.12.2/examples/kegogi/lemon.c:23:12:  [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/mongrel2-1.12.2/examples/kegogi/lemon.c:1336:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(errmsg,format,ap);
data/mongrel2-1.12.2/examples/kegogi/lemon.c:1387: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/mongrel2-1.12.2/examples/kegogi/lemon.c:2728: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/mongrel2-1.12.2/examples/kegogi/lemon.c:2731: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/mongrel2-1.12.2/examples/kegogi/lemon.c:2984: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/mongrel2-1.12.2/examples/kegogi/lemon.c:2997: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3001: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3079: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3081: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3083: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3241: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3459: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3835: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/mongrel2-1.12.2/examples/kegogi/lemon.c:4002: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/mongrel2-1.12.2/examples/kegogi/lemon.c:4236: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/mongrel2-1.12.2/src/bstr/bsafe.c:23:8:  [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).
char * strcpy (char *dst, const char *src);
data/mongrel2-1.12.2/src/bstr/bsafe.c:24:8:  [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).
char * strcat (char *dst, const char *src);
data/mongrel2-1.12.2/src/bstr/bsafe.c:26:8:  [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).
char * strcpy (char *dst, const char *src) {
data/mongrel2-1.12.2/src/bstr/bsafe.c:34:8:  [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).
char * strcat (char *dst, const char *src) {
data/mongrel2-1.12.2/src/bstr/bsafe.h:34:8:  [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).
#undef strcpy
data/mongrel2-1.12.2/src/bstr/bsafe.h:35:8:  [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).
#undef strcat
data/mongrel2-1.12.2/src/bstr/bsafe.h:36:9:  [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).
#define strcpy(a,b) bsafe_strcpy(a,b) 
data/mongrel2-1.12.2/src/bstr/bsafe.h:37:9:  [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).
#define strcat(a,b) bsafe_strcat(a,b) 
data/mongrel2-1.12.2/src/bstr/bstrlib.c:2755:33:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
#define exvsnprintf(r,b,n,f,a) {vsprintf (b,f,a); r = -1;}
data/mongrel2-1.12.2/src/bstr/bstrlib.c:2762:12:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
extern int vsnprintf (char *buf, size_t count, const char *format, va_list arg);
data/mongrel2-1.12.2/src/bstr/bstrlib.c:2765:37:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define exvsnprintf(r,b,n,f,a) {r = vsnprintf (b,n,f,a);}
data/mongrel2-1.12.2/src/dbg.c:58:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(log_file, format, args);
data/mongrel2-1.12.2/src/mongrel2.c:334: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.
    if(access((char *)srv->pid_file->data, F_OK) == 0) {
data/mongrel2-1.12.2/src/task/fd.c:74:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        if(!t->system && --sleepingcounted == 0) taskcount--;
data/mongrel2-1.12.2/src/task/fd.c:205:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if(!t->system && sleepingcounted++ == 0) {
data/mongrel2-1.12.2/src/task/net.c:98:13:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            execl(AUTHBIND_HELPER, AUTHBIND_HELPER, addrstr, portstr, psa->sa_family == AF_INET6 ? "6": (char *)NULL, (char *)NULL);
data/mongrel2-1.12.2/src/task/task.c:123:22:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if(!taskrunning->system) {
data/mongrel2-1.12.2/src/task/task.c:220:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            if(!t->system) {
data/mongrel2-1.12.2/src/task/task.c:299:32:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        tns_add_to_list(el, t->system ? tns_get_true() : tns_get_false());
data/mongrel2-1.12.2/src/task/taskimpl.h:132:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    int    system;
data/mongrel2-1.12.2/tools/lemon/lemon.c:23:12:  [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/mongrel2-1.12.2/tools/lemon/lemon.c:1336:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(errmsg,format,ap);
data/mongrel2-1.12.2/tools/lemon/lemon.c:1387: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/mongrel2-1.12.2/tools/lemon/lemon.c:2728: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/mongrel2-1.12.2/tools/lemon/lemon.c:2731: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/mongrel2-1.12.2/tools/lemon/lemon.c:2984: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/mongrel2-1.12.2/tools/lemon/lemon.c:2997: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/mongrel2-1.12.2/tools/lemon/lemon.c:3001: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/mongrel2-1.12.2/tools/lemon/lemon.c:3079: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/mongrel2-1.12.2/tools/lemon/lemon.c:3081: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/mongrel2-1.12.2/tools/lemon/lemon.c:3083: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/mongrel2-1.12.2/tools/lemon/lemon.c:3241: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/mongrel2-1.12.2/tools/lemon/lemon.c:3459: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/mongrel2-1.12.2/tools/lemon/lemon.c:3835: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/mongrel2-1.12.2/tools/lemon/lemon.c:4002: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/mongrel2-1.12.2/tools/lemon/lemon.c:4236: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/mongrel2-1.12.2/tools/m2sh/src/commands.h:26:35:  [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.
#define check_file(S, N, P) check(access((const char *)(S)->data, (P)) == 0, "Can't access %s '%s' properly.", N, bdata((S)))
data/mongrel2-1.12.2/tools/m2sh/src/commands/helpers.c:42:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    return system("uuidgen");
data/mongrel2-1.12.2/tools/m2sh/src/commands/logging.c:48:18:  [4] (misc) getlogin:
  It's often easy to fool getlogin. Sometimes it does not work at all,
  because some program messed up the utmp file. Often, it gives only the
  first 8 characters of the login name. The user currently logged in on the
  controlling tty of our program need not be the user who started it. Avoid
  getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid())
  and extract the desired information instead.
    char *user = getlogin() == NULL ? getenv("LOGNAME") : getlogin();
data/mongrel2-1.12.2/tools/m2sh/src/commands/logging.c:48:59:  [4] (misc) getlogin:
  It's often easy to fool getlogin. Sometimes it does not work at all,
  because some program messed up the utmp file. Often, it gives only the
  first 8 characters of the login name. The user currently logged in on the
  controlling tty of our program need not be the user who started it. Avoid
  getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid())
  and extract the desired information instead.
    char *user = getlogin() == NULL ? getenv("LOGNAME") : getlogin();
data/mongrel2-1.12.2/tools/m2sh/src/commands/logging.c:52: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.
    if(access((const char *)db_file->data, R_OK | W_OK) != 0) {
data/mongrel2-1.12.2/tools/m2sh/src/commands/running.c:179:5:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    system(bdata(command));
data/mongrel2-1.12.2/tools/procer/procer.c:80:14:  [4] (shell) execle:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        rc = execle(bdatae(prof->command, ""), bdatae(prof->command, ""), NULL, environ);
data/mongrel2-1.12.2/tools/procer/procer.c:123:12:  [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(bdatae(prof->pid_file, ""), R_OK) != 0) {
data/mongrel2-1.12.2/tools/procer/profile.c:29: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.
    int rc = access(bdatae(target, ""), R_OK);
data/mongrel2-1.12.2/examples/kegogi/lemon.c:2987: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/mongrel2-1.12.2/examples/kegogi/lemon.c:2988: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/mongrel2-1.12.2/examples/kegogi/src/kegogi.c:219:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while((c = getopt_long(argc, argv, "t:i:", long_options, NULL)) != -1) {
data/mongrel2-1.12.2/src/control.c:334:17:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        if(srv->chroot != NULL) {
data/mongrel2-1.12.2/src/control.c:335:40:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
            tns_list_addstr(cols, srv->chroot);
data/mongrel2-1.12.2/src/dir.c:339:24:  [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 *normalized = realpath((const char *)(bdata(target)),bdata(returnme));
data/mongrel2-1.12.2/src/dir.c:345:24:  [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 *normalized = realpath((const char *)(bdata(target)),NULL);
data/mongrel2-1.12.2/src/mongrel2.c:175:13:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    if(srv->chroot != NULL) {
data/mongrel2-1.12.2/src/mongrel2.c:176:47:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        pid_file = bformat("%s%s", bdata(srv->chroot), bdata(srv->pid_file));
data/mongrel2-1.12.2/src/mongrel2.c:236:13:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    if(srv->chroot != NULL) {
data/mongrel2-1.12.2/src/mongrel2.c:237:30:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        if(Unixy_chroot(srv->chroot) == 0) {
data/mongrel2-1.12.2/src/mongrel2.c:247:90:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
            log_warn("Couldn't chroot to %s, assuming running in test mode.", bdata(srv->chroot));
data/mongrel2-1.12.2/src/mongrel2.c:250:55:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
            bstring temp = bformat("%s%s", bdata(srv->chroot), bdata(srv->access_log));
data/mongrel2-1.12.2/src/mongrel2.c:270:13:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    if(srv->chroot != NULL && ! testmode) {
data/mongrel2-1.12.2/src/server.c:199:13:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    if(srv->chroot != NULL && !Unixy_in_chroot()) {
data/mongrel2-1.12.2/src/server.c:200:46:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        certdir = bformat("%s%s", bdata(srv->chroot), bdata(certdir_setting));
data/mongrel2-1.12.2/src/server.c:257:46:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        bstring bind_addr, int port, bstring chroot, bstring access_log,
data/mongrel2-1.12.2/src/server.c:286:16:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    if(blength(chroot) > 0) {
data/mongrel2-1.12.2/src/server.c:287:31:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        srv->chroot = bstrcpy(chroot); check_mem(srv->chroot);
data/mongrel2-1.12.2/src/server.c:287:55:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        srv->chroot = bstrcpy(chroot); check_mem(srv->chroot);
data/mongrel2-1.12.2/src/server.c:344:23:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        bdestroy(srv->chroot);
data/mongrel2-1.12.2/src/server.h:62:13:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    bstring chroot;
data/mongrel2-1.12.2/src/server.h:82:46:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        bstring bind_addr, int port, bstring chroot,
data/mongrel2-1.12.2/src/unixy.c:55:10:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    rc = chroot(to_dir);
data/mongrel2-1.12.2/tests/radixmap_tests.c:181:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(time(NULL));
data/mongrel2-1.12.2/tools/lemon/lemon.c:2987: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/mongrel2-1.12.2/tools/lemon/lemon.c:2988: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/mongrel2-1.12.2/tools/m2sh/src/commands/logging.c:48:39:  [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.
    char *user = getlogin() == NULL ? getenv("LOGNAME") : getlogin();
data/mongrel2-1.12.2/tools/m2sh/src/commands/running.c:222:24:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    check(tns_get_type(chroot) == tns_tag_string, "Wrong result for server chroot, should be a string.");
data/mongrel2-1.12.2/tools/m2sh/src/commands/running.c:321:22:  [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.
    char *home_dir = getenv("HOME");
data/mongrel2-1.12.2/tools/m2sh/src/commands/running.c:577:34:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    check(server_name != NULL && chroot != NULL, 
data/mongrel2-1.12.2/tools/m2sh/src/commands/running.c:581:53:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    control = bformat("ipc://%s/run/control", bdata(chroot));
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:98: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.
    char *term = getenv("TERM");
data/mongrel2-1.12.2/tools/procer/procer.c:76:31:  [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.
        if( (procer_run_log = getenv("PROCER_RUN_LOG")) == NULL)
data/mongrel2-1.12.2/tools/procer/procer.c:256:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(time(NULL)); // simple randomness
data/mongrel2-1.12.2/tools/procer/procer.c:270:29:  [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.
    if( (procer_error_log = getenv("PROCER_ERROR_LOG")) == NULL)
data/mongrel2-1.12.2/examples/kegogi/lemon.c:1317: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/mongrel2-1.12.2/examples/kegogi/lemon.c:1318: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/mongrel2-1.12.2/examples/kegogi/lemon.c:1328: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/mongrel2-1.12.2/examples/kegogi/lemon.c:1330: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/mongrel2-1.12.2/examples/kegogi/lemon.c:1627: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/mongrel2-1.12.2/examples/kegogi/lemon.c:1971: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/mongrel2-1.12.2/examples/kegogi/lemon.c:2336:9:  [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 zLine[50];
data/mongrel2-1.12.2/examples/kegogi/lemon.c:2353:11:  [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(zLine, "#line %d ", psp->tokenlineno);
data/mongrel2-1.12.2/examples/kegogi/lemon.c:2363:11:  [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(zBuf, zLine, nLine);
data/mongrel2-1.12.2/examples/kegogi/lemon.c:2378: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(zBuf, zNew, nNew);
data/mongrel2-1.12.2/examples/kegogi/lemon.c:2513: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/mongrel2-1.12.2/examples/kegogi/lemon.c:2747: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/mongrel2-1.12.2/examples/kegogi/lemon.c:2916: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/mongrel2-1.12.2/examples/kegogi/lemon.c:2918: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3044: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3070: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3077: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3094: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,"rb");
data/mongrel2-1.12.2/examples/kegogi/lemon.c:3218: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3239: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3262: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3555: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3993: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/mongrel2-1.12.2/examples/kegogi/lemon.c:3994: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/mongrel2-1.12.2/examples/kegogi/src/fuzzrnd.c:48:12:  [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.
  unsigned char  sbox[256];                  /* ArcFour s-box */
data/mongrel2-1.12.2/examples/kegogi/src/httpclient.c:64:28:  [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).
        rsp->content_len = atoi((char *)bVal->data);
data/mongrel2-1.12.2/examples/kegogi/src/httpclient.c:80:24:  [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).
    rsp->status_code = atoi((char *)bs->data);
data/mongrel2-1.12.2/examples/kegogi/src/kegogi.c:146:44:  [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).
                          (port != NULL) ? atoi(bdata(port)) : DEFAULT_PORT,
data/mongrel2-1.12.2/examples/kegogi/src/kegogi.c:165:32:  [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).
    int expected_status_code = atoi(bdata(expect->status_code));
data/mongrel2-1.12.2/examples/kegogi/src/kegogi.c:222:33:  [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).
            args->num_threads = atoi(optarg);
data/mongrel2-1.12.2/examples/kegogi/src/kegogi.c:226:43:  [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).
            args->iterations_per_thread = atoi(optarg);
data/mongrel2-1.12.2/examples/kegogi/src/kegogi_parser.c:1031:14:  [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).
    script = fopen(path, "r");
data/mongrel2-1.12.2/examples/kegogi/src/kegogi_parser_extra.c:17:14:  [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).
    script = fopen(path, "r");
data/mongrel2-1.12.2/src/bsd_specific.c:83:4:  [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[BSD_SENDFILE_BUF_SIZE];
data/mongrel2-1.12.2/src/bstr/bstraux.c:225: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 (buff, t->data, tsz);
data/mongrel2-1.12.2/src/bstr/bstraux.c:256:1:  [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 strnum[numlen+1];
data/mongrel2-1.12.2/src/bstr/bstraux.c:298:2:  [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 (b->data, buff + i + 1, x);
data/mongrel2-1.12.2/src/bstr/bstraux.c:512:12:  [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.
		unsigned char outoctet[3];
data/mongrel2-1.12.2/src/bstr/bstraux.c:617: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 (buff, luuCtx->io.dst->data, tsz);
data/mongrel2-1.12.2/src/bstr/bstraux.c:657: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 (buff, luuCtx->io.dst->data, luuCtx->io.dst->slen);
data/mongrel2-1.12.2/src/bstr/bstraux.c:786: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.
unsigned char octetbuff[MAX_OB_LEN];
data/mongrel2-1.12.2/src/bstr/bstrlib.c:46:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define bstr__memcpy(d,s,l) memcpy ((d), (s), (l))
data/mongrel2-1.12.2/src/bstr/bstrlib.c:709:39:  [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.
		if (b0->data[i] != ((const unsigned char *) blk)[i]) {
data/mongrel2-1.12.2/src/bstr/bstrlib.c:711:35:  [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.
			    downcase (((const unsigned char *) blk)[i])) return 0;
data/mongrel2-1.12.2/src/bstr/bstrlib.c:820:39:  [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.
		if (b0->data[i] != ((const unsigned char *) blk)[i]) return BSTR_OK;
data/mongrel2-1.12.2/src/bstr/bstrlib.c:1289:29:  [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.
struct charField { unsigned char content[CFCLEN]; };
data/mongrel2-1.12.2/src/chunked.c:30: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 sizestr[9];
data/mongrel2-1.12.2/src/connection.c:297:18:  [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.
        unsigned char sha1sum[CERT_FINGERPRINT_SIZE + 1] = {0};
data/mongrel2-1.12.2/src/connection.c:747: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 key[4];
data/mongrel2-1.12.2/src/connection.c:791: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(key,dataU+header_length-4,4);
data/mongrel2-1.12.2/src/connection.h:94: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 remote[IPADDR_SIZE+1];
data/mongrel2-1.12.2/src/dir.c:86: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).
    int fd = open(bdatae(fr->full_path,""), O_RDONLY);
data/mongrel2-1.12.2/src/dir.c:171: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).
    fd = open(bdatae(file->full_path,""), O_RDONLY);
data/mongrel2-1.12.2/src/filter.c:179: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(new_states, states, length * sizeof(StateEvent));
data/mongrel2-1.12.2/src/io.c:223: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 buff[1024];
data/mongrel2-1.12.2/src/io.c:319: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( ssn->master, cur->master, 48 );
data/mongrel2-1.12.2/src/log.c:127:24:  [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).
    config->log_file = fopen((char *)config->file_name->data, "a+");
data/mongrel2-1.12.2/src/mem/halloc.c:176:30:  [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 ptr ? (ptr[len] = 0, memcpy(ptr, str, len)) : NULL;
data/mongrel2-1.12.2/src/mongrel2.c:279:21:  [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 *log = fopen(bdata(srv->error_log), "a+");
data/mongrel2-1.12.2/src/server.c:155:14:  [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.
    unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE];
data/mongrel2-1.12.2/src/server.c:377: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 remote[IPADDR_SIZE];
data/mongrel2-1.12.2/src/setting.c:76:16:  [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).
        return atoi((const char *)value->data);
data/mongrel2-1.12.2/src/task/net.c:49: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 str[IPADDR_SIZE+1];
data/mongrel2-1.12.2/src/task/net.c:53: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 addrstr[33];
data/mongrel2-1.12.2/src/task/net.c:54: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 portstr[5];
data/mongrel2-1.12.2/src/task/net.c:81:17:  [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(addrstr + (n * 2), "%02x", (((struct sockaddr_in6 *)psa)->sin6_addr.s6_addr[n]) & 0xff);
data/mongrel2-1.12.2/src/task/net.c:85:13:  [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(addrstr, "%08x", (((struct sockaddr_in *)psa)->sin_addr.s_addr) & 0xffffffff);
data/mongrel2-1.12.2/src/task/net.c:88: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(portstr, "%04x", port & 0xffff);
data/mongrel2-1.12.2/src/task/net.c:183: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 str[IPADDR_SIZE+1];
data/mongrel2-1.12.2/src/task/net.c:194: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 service[6] = {0}; /* 1..65535 + terminator */
data/mongrel2-1.12.2/src/task/task.c:242: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(taskrunning->name, name, len < MAX_STATE_LENGTH ? len : MAX_STATE_LENGTH);
data/mongrel2-1.12.2/src/task/task.c:255: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(taskrunning->state, state, len < MAX_STATE_LENGTH ? len : MAX_STATE_LENGTH);
data/mongrel2-1.12.2/src/task/taskimpl.h:121: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    name[MAX_STATE_LENGTH];    // offset known to acid
data/mongrel2-1.12.2/src/task/taskimpl.h:122: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    state[MAX_STATE_LENGTH];
data/mongrel2-1.12.2/src/unixy.c:122: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).
    pid_file = fopen(bdata(pid_path), "r");
data/mongrel2-1.12.2/src/unixy.c:188: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).
    pid_file = fopen(pid_path, "w");
data/mongrel2-1.12.2/src/upload.c:134:13:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    tmpfd = mkstemp((char *)tmp_name->data);
data/mongrel2-1.12.2/src/websocket.c:18:21:  [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 unsigned char buf[14];
data/mongrel2-1.12.2/tests/bstr_tests.c:358: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 char msg[256];
data/mongrel2-1.12.2/tests/bstr_tests.c:359: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(msg, "%p", (void *)b);
data/mongrel2-1.12.2/tests/bstr_tests.c:363:13:  [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 (msg, ":[err:slen=%d<0]", b->slen);
data/mongrel2-1.12.2/tests/bstr_tests.c:367:17:  [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 (msg, ":[err:mlen=%d<slen=%d]", b->mlen, b->slen);
data/mongrel2-1.12.2/tests/bstr_tests.c:386:13:  [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.
    return (char *) dumpOut[rot]->data;
data/mongrel2-1.12.2/tests/bstr_tests.c:2042: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 (buff, sb->b->data + sb->ofs, len);
data/mongrel2-1.12.2/tests/bstr_tests.c:3533:61:  [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.
        debug (".\tbtfromblkltrimws (\"%s\", \"%s\", %d)", (char *) bdatae (b, NULL), tstrs[i]->data, tstrs[i]->slen);
data/mongrel2-1.12.2/tests/bstr_tests.c:3543:61:  [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.
        debug (".\tbtfromblkrtrimws (\"%s\", \"%s\", %d)", (char *) bdatae (b, NULL), tstrs[i]->data, tstrs[i]->slen);
data/mongrel2-1.12.2/tests/bstr_tests.c:3553:60:  [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.
        debug (".\tbtfromblktrimws (\"%s\", \"%s\", %d)", (char *) bdatae (b, NULL), tstrs[i]->data, tstrs[i]->slen);
data/mongrel2-1.12.2/tests/bstr_tests.c:3732:22:  [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 *log_file = fopen("tests/tests.log", "a+");
data/mongrel2-1.12.2/tests/cert_tests.c:45:2:  [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[1024];
data/mongrel2-1.12.2/tests/connection_tests.c:14:11:  [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.
    const char remote[IPADDR_SIZE];
data/mongrel2-1.12.2/tests/dict_tests.c:10:9:  [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.
typedef char input_t[256];
data/mongrel2-1.12.2/tests/dict_tests.c:49: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(new, str, sz);
data/mongrel2-1.12.2/tests/dict_tests.c:148:18:  [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 *data = fopen("tests/adt_data.txt", "r");
data/mongrel2-1.12.2/tests/dict_tests.c:279:35:  [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).
                    int dictnum = atoi(tok1);
data/mongrel2-1.12.2/tests/dict_tests.c:292:33:  [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).
                    int dict1 = atoi(tok1), dict2 = atoi(tok2);
data/mongrel2-1.12.2/tests/dict_tests.c:292:53:  [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).
                    int dict1 = atoi(tok1), dict2 = atoi(tok2);
data/mongrel2-1.12.2/tests/dir_tests.c:122:19:  [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).
    int zero_fd = open("/dev/null", O_WRONLY);
data/mongrel2-1.12.2/tests/hash_tests.c:9:9:  [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.
typedef char input_t[256];
data/mongrel2-1.12.2/tests/hash_tests.c:43: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(new, str, sz);
data/mongrel2-1.12.2/tests/hash_tests.c:75:18:  [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 *data = fopen("tests/adt_data.txt", "r");
data/mongrel2-1.12.2/tests/http11_tests.c:70:24:  [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 *infile = fopen(test_files.gl_pathv[i], "r");
data/mongrel2-1.12.2/tests/httpclient_tests.c:42:20:  [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 *infile = fopen(path, "r");
data/mongrel2-1.12.2/tests/io_tests.c:14: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).
    int fd = open(file, mode);
data/mongrel2-1.12.2/tests/list_tests.c:9:9:  [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.
typedef char input_t[256];
data/mongrel2-1.12.2/tests/list_tests.c:48: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(new, str, sz);
data/mongrel2-1.12.2/tests/list_tests.c:59:18:  [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 *data = fopen("tests/adt_data.txt", "r");
data/mongrel2-1.12.2/tests/minunit.h:17:23:  [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 *log_file = fopen("tests/tests.log", "a+");\
data/mongrel2-1.12.2/tests/request_tests.c:22:24:  [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 *test_cases = fopen("tests/request_payloads.txt", "w");
data/mongrel2-1.12.2/tests/request_tests.c:27:24:  [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 *infile = fopen(test_files.gl_pathv[i], "r");
data/mongrel2-1.12.2/tests/request_tests.c:68:20:  [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 *infile = fopen("tests/request_payloads.txt", "r");
data/mongrel2-1.12.2/tests/request_tests.c:122:20:  [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 *infile = fopen("tests/and_suite/ex_httpd_tst_16", "r");
data/mongrel2-1.12.2/tests/request_tests.c:178:20:  [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 *infile = fopen("tests/requests/relaxed_test", "r");
data/mongrel2-1.12.2/tests/request_tests.c:235:20:  [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 *infile = fopen("tests/and_suite/ex_httpd_tst_21", "r");
data/mongrel2-1.12.2/tests/response_tests.c:10:19:  [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).
    int zero_fd = open("/dev/zero", O_WRONLY);
data/mongrel2-1.12.2/tests/response_tests.c:24:19:  [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).
    int zero_fd = open("/dev/zero", O_WRONLY);
data/mongrel2-1.12.2/tests/superpoll_tests.c:294:12:  [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).
    perf = fopen("tests/perf.log", "a+");
data/mongrel2-1.12.2/tools/config_modules/mongodb.c:121:20:  [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).
            port = atoi(sport);
data/mongrel2-1.12.2/tools/config_modules/mongodb.c:183:24:  [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).
                port = atoi(sport);
data/mongrel2-1.12.2/tools/filters/sendfile.c:23: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).
    fd = open(bdata(fname), O_RDONLY);
data/mongrel2-1.12.2/tools/lemon/lemon.c:1317: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/mongrel2-1.12.2/tools/lemon/lemon.c:1318: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/mongrel2-1.12.2/tools/lemon/lemon.c:1328: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/mongrel2-1.12.2/tools/lemon/lemon.c:1330: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/mongrel2-1.12.2/tools/lemon/lemon.c:1627: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/mongrel2-1.12.2/tools/lemon/lemon.c:1971: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/mongrel2-1.12.2/tools/lemon/lemon.c:2336:9:  [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 zLine[50];
data/mongrel2-1.12.2/tools/lemon/lemon.c:2353:11:  [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(zLine, "#line %d ", psp->tokenlineno);
data/mongrel2-1.12.2/tools/lemon/lemon.c:2363:11:  [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(zBuf, zLine, nLine);
data/mongrel2-1.12.2/tools/lemon/lemon.c:2378: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(zBuf, zNew, nNew);
data/mongrel2-1.12.2/tools/lemon/lemon.c:2513: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/mongrel2-1.12.2/tools/lemon/lemon.c:2747: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/mongrel2-1.12.2/tools/lemon/lemon.c:2916: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/mongrel2-1.12.2/tools/lemon/lemon.c:2918: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/mongrel2-1.12.2/tools/lemon/lemon.c:3044: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/mongrel2-1.12.2/tools/lemon/lemon.c:3070: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/mongrel2-1.12.2/tools/lemon/lemon.c:3077: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/mongrel2-1.12.2/tools/lemon/lemon.c:3094: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,"rb");
data/mongrel2-1.12.2/tools/lemon/lemon.c:3218: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/mongrel2-1.12.2/tools/lemon/lemon.c:3239: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/mongrel2-1.12.2/tools/lemon/lemon.c:3262: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/mongrel2-1.12.2/tools/lemon/lemon.c:3555: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/mongrel2-1.12.2/tools/lemon/lemon.c:3993: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/mongrel2-1.12.2/tools/lemon/lemon.c:3994: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/mongrel2-1.12.2/tools/m2sh/src/cli.c:533: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(cmd->tokens, p->tokens, MAX_TOKENS);
data/mongrel2-1.12.2/tools/m2sh/src/commands/access.c:46:22:  [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 *log_file = fopen(bdata(log_filename), "r");
data/mongrel2-1.12.2/tools/m2sh/src/commands/logging.c:61:9:  [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 name_buf[128] = {0};
data/mongrel2-1.12.2/tools/m2sh/src/commands/running.c:199:22:  [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 *pid_file = fopen(bdata(pid_path), "r");
data/mongrel2-1.12.2/tools/m2sh/src/commands/running.c:232:18:  [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).
    int result = atoi((const char *)pid->data);
data/mongrel2-1.12.2/tools/m2sh/src/lexer.c:395:14:  [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).
    script = fopen(path, "r");
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:172: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 seq[64];
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:216:9:  [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 seq[2];
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:371: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[LINENOISE_MAX_LINE];
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:425: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(new,history+(history_max_len-tocopy), sizeof(char*)*tocopy);
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:438: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,"w");
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:454: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,"r");
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:455: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[LINENOISE_MAX_LINE];
data/mongrel2-1.12.2/tools/m2sh/tests/minunit.h:15:23:  [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 *log_file = fopen("tests/tests.log", "a+");\
data/mongrel2-1.12.2/tools/procer/procer.c:272:17:  [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 *log = fopen(procer_error_log, "a+");
data/mongrel2-1.12.2/tools/procer/profile.c:10:17:  [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).
    test_file = fopen(bdata(target), "r"); 
data/mongrel2-1.12.2/examples/kegogi/lemon.c:44:32:  [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 lemonStrlen(X)   ((int)strlen(X))
data/mongrel2-1.12.2/src/adt/tst.c:77:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                p = p->equal; 
data/mongrel2-1.12.2/src/adt/tst.c:107:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                p = p->equal;
data/mongrel2-1.12.2/src/adt/tst.c:117:16:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        p = p->equal;
data/mongrel2-1.12.2/src/adt/tst.c:138:24:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                p = p->equal;
data/mongrel2-1.12.2/src/adt/tst.c:149:16:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        p = p->equal;
data/mongrel2-1.12.2/src/adt/tst.c:166:32:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            if(i < len) p = p->equal; 
data/mongrel2-1.12.2/src/adt/tst.c:199:49:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            p->equal = tst_insert_base(root, p->equal, s+1, len - 1, value);
data/mongrel2-1.12.2/src/adt/tst.c:265:17:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        if(cur->equal) queue[(q_start + (q_size++)) % q_max] = cur->equal;
data/mongrel2-1.12.2/src/adt/tst.c:265:69:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        if(cur->equal) queue[(q_start + (q_size++)) % q_max] = cur->equal;
data/mongrel2-1.12.2/src/adt/tst.h:44:19:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    struct tst_t *equal;
data/mongrel2-1.12.2/src/bstr/bsafe.c:60: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.
char * (strncat) (char *dst, const char *src, size_t n) {
data/mongrel2-1.12.2/src/bstr/bsafe.h:30:16:  [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.
extern char * (strncat) (char *dst, const char *src, size_t n);
data/mongrel2-1.12.2/src/bstr/bstraux.c:855: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).
	if ((n = (int) (2*strlen (fmt))) < 16) n = 16;
data/mongrel2-1.12.2/src/bstr/bstrlib.c:193: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).
	j = (strlen) (str);
data/mongrel2-1.12.2/src/bstr/bstrlib.c:221: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).
	j = (strlen) (str);
data/mongrel2-1.12.2/src/bstr/bstrlib.c:385: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).
	return bcatblk (b, (const void *) s, (int) strlen (s));
data/mongrel2-1.12.2/src/bstr/bstrlib.c:520:8:  [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 (str + i);
data/mongrel2-1.12.2/src/bstr/bstrlib.c:2802: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).
	if ((n = (int) (2*strlen (fmt))) < START_VSNBUFF) n = START_VSNBUFF;
data/mongrel2-1.12.2/src/bstr/bstrlib.c:2814:23:  [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).
		buff->slen = (int) (strlen) ((char *) buff->data);
data/mongrel2-1.12.2/src/bstr/bstrlib.c:2850: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).
	if ((n = (int) (2*strlen (fmt))) < START_VSNBUFF) n = START_VSNBUFF;
data/mongrel2-1.12.2/src/bstr/bstrlib.c:2862:23:  [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).
		buff->slen = (int) (strlen) ((char *) buff->data);
data/mongrel2-1.12.2/src/bstr/bstrlib.c:2897: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).
	if ((n = (int) (2*strlen (fmt))) < START_VSNBUFF) n = START_VSNBUFF;
data/mongrel2-1.12.2/src/bstr/bstrlib.c:2909:23:  [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).
		buff->slen = (int) (strlen) ((char *) buff->data);
data/mongrel2-1.12.2/src/bstr/bstrlib.h:222: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).
    (t).slen = ((t).data) ? ((int) (strlen) ((char *)(t).data)) : 0; \
data/mongrel2-1.12.2/src/chunked.c:14: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).
    nsize = strlen(needle);
data/mongrel2-1.12.2/src/chunked.c:45:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(sizestr, data, at);
data/mongrel2-1.12.2/src/connection.c:1138:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(conn->remote, remote, IPADDR_SIZE);
data/mongrel2-1.12.2/src/control.c:232:55:  [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).
    tns_add_to_list(headers, tns_parse_string("name", strlen("name")));
data/mongrel2-1.12.2/src/control.c:233:55:  [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).
    tns_add_to_list(headers, tns_parse_string("help", strlen("help")));
data/mongrel2-1.12.2/src/dir.c:342: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).
    btrunc(returnme,strlen(bdata(returnme)));
data/mongrel2-1.12.2/src/handler.c:457: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).
    int rc = zmq_setsockopt(handler_socket, ZMQ_IDENTITY, identity, strlen(identity));
data/mongrel2-1.12.2/src/handler.c:484:67:  [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 rc = zmq_setsockopt(listener_socket, ZMQ_SUBSCRIBE, uuid, strlen(uuid));
data/mongrel2-1.12.2/src/mem/halloc.c:174: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).
	size_t len = strlen(str);
data/mongrel2-1.12.2/src/setting.c:66: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).
    bstring value = tst_search(SETTINGS_MAP, key, strlen(key));
data/mongrel2-1.12.2/src/setting.c:73: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).
    bstring value = tst_search(SETTINGS_MAP, key, strlen(key));
data/mongrel2-1.12.2/src/task/fd.c:328:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    } while((m = read(fd, buf, n)) < 0 && errno == EAGAIN);
data/mongrel2-1.12.2/src/task/fd.c:350:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while((m=read(fd, buf, n)) < 0 && errno == EAGAIN) {
data/mongrel2-1.12.2/src/task/task.c:241: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).
    int len = strlen(name);
data/mongrel2-1.12.2/src/task/task.c:254: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).
    int len = strlen(state);
data/mongrel2-1.12.2/src/task/task.c:300:55:  [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).
        tns_add_to_list(el, tns_parse_string(t->name, strlen(t->name)));
data/mongrel2-1.12.2/src/task/task.c:301:56:  [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).
        tns_add_to_list(el, tns_parse_string(t->state, strlen(t->state)));
data/mongrel2-1.12.2/src/task/task.c:302: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).
        tns_add_to_list(el, tns_parse_string(status, strlen(status)));
data/mongrel2-1.12.2/src/tnetstrings_impl.h:143: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).
    return tns_add_to_dict(d, tns_parse_string(key, strlen(key)), val);
data/mongrel2-1.12.2/tests/bstr_tests.c:399: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).
    ret += (res == NULL) || ((int) strlen (res) != b0->slen)
data/mongrel2-1.12.2/tests/bstr_tests.c:418: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).
    ret += (res == NULL) || ((int) strlen (res) != b0->slen)
data/mongrel2-1.12.2/tests/bstr_tests.c:518: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).
        if (z != '\0') if ((int) strlen (s) != b->slen) ret++;
data/mongrel2-1.12.2/tests/bstr_tests.c:598: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).
            || (b0->slen != (int) strlen (res))
data/mongrel2-1.12.2/tests/bstr_tests.c:606:81:  [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 (res) debug ("(b0->slen != strlen (res))   = %d", (b0->slen != (int) strlen (res)));
data/mongrel2-1.12.2/tests/bstr_tests.c:673:40:  [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 += (res == NULL) || ((int) strlen (res) > b2->slen) 
data/mongrel2-1.12.2/tests/bstr_tests.c:770:40:  [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 += (res == NULL) || ((int) strlen (res) > b0->slen) 
data/mongrel2-1.12.2/tests/bstr_tests.c:1273:23:  [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 += ((int) strlen (res) > b2->slen); if (ret && 0 == linenum) linenum = __LINE__;
data/mongrel2-1.12.2/tests/bstr_tests.c:1351:40:  [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 += (res == NULL) || ((int) strlen (res) > b2->slen)
data/mongrel2-1.12.2/tests/bstr_tests.c:1425:40:  [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 += (res == NULL) || ((int) strlen (res) > b2->slen)
data/mongrel2-1.12.2/tests/bstr_tests.c:1589:40:  [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 += (res == NULL) || ((int) strlen (res) > b1->slen)
data/mongrel2-1.12.2/tests/bstr_tests.c:1940: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).
                ret += (res == NULL) || ((int) strlen (res) > l->entry[i]->slen)
data/mongrel2-1.12.2/tests/bstr_tests.c:2348:40:  [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 += (res == NULL) || ((int) strlen (res) > b2->slen)
data/mongrel2-1.12.2/tests/bstr_tests.c:2421:40:  [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 += (res == NULL) || ((int) strlen (res) != b2->slen) 
data/mongrel2-1.12.2/tests/bstr_tests.c:2600: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).
        if (s) ret += (b2->slen != b0->slen + (int) strlen (s));
data/mongrel2-1.12.2/tests/bstr_tests.c:2602:40:  [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 += (res == NULL) || ((int) strlen (res) != b2->slen) 
data/mongrel2-1.12.2/tests/bstr_tests.c:2669:40:  [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 += (res == NULL) || ((int) strlen (res) != b2->slen) 
data/mongrel2-1.12.2/tests/bstr_tests.c:2734:40:  [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 += (res == NULL) || ((int) strlen (res) > b2->slen)
data/mongrel2-1.12.2/tests/bstr_tests.c:2778:40:  [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 += (res == NULL) || ((int) strlen (res) > b2->slen)
data/mongrel2-1.12.2/tests/bstr_tests.c:2957:40:  [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 += (res == NULL) || ((int) strlen (res) != b2->slen) 
data/mongrel2-1.12.2/tests/bstr_tests.c:3019:40:  [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 += (res == NULL) || ((int) strlen (res) != b2->slen) 
data/mongrel2-1.12.2/tests/bstr_tests.c:3362:40:  [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 += (res == NULL) || ((int) strlen (res) != b2->slen) 
data/mongrel2-1.12.2/tests/bstr_tests.c:3580: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).
    ret += ((size_t) b->slen) != strlen (str);
data/mongrel2-1.12.2/tests/bstr_tests.c:3587: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).
    ret += ((size_t) b->slen) != strlen ("xxxxx");
data/mongrel2-1.12.2/tests/bstr_tests.c:3626: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).
    len = (int) strlen (str);
data/mongrel2-1.12.2/tests/bstr_tests.c:3639: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).
    ret += ((size_t) b->slen) != strlen ("xxxxx");
data/mongrel2-1.12.2/tests/chunked_tests.c:24: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).
    rc = chunked_can_read(s1, strlen(s1), &start, &len, &end);
data/mongrel2-1.12.2/tests/chunked_tests.c:30: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).
    rc = chunked_can_read(s2, strlen(s2), &start, &len, &end);
data/mongrel2-1.12.2/tests/chunked_tests.c:33: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).
    rc = chunked_can_read(s3, strlen(s3), &start, &len, &end);
data/mongrel2-1.12.2/tests/chunked_tests.c:36: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).
    rc = chunked_can_read(s4, strlen(s4), &start, &len, &end);
data/mongrel2-1.12.2/tests/chunked_tests.c:39: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).
    rc = chunked_can_read(s5, strlen(s5), &start, &len, &end);
data/mongrel2-1.12.2/tests/chunked_tests.c:42: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).
    rc = chunked_can_read(s6, strlen(s6), &start, &len, &end);
data/mongrel2-1.12.2/tests/chunked_tests.c:45: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).
    rc = chunked_can_read(s7, strlen(s7), &start, &len, &end);
data/mongrel2-1.12.2/tests/chunked_tests.c:51: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).
    rc = chunked_can_read(s8, strlen(s8), &start, &len, &end);
data/mongrel2-1.12.2/tests/chunked_tests.c:57: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).
    rc = chunked_can_read(s9, strlen(s9), &start, &len, &end);
data/mongrel2-1.12.2/tests/chunked_tests.c:60:32:  [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).
    rc = chunked_can_read(s10, strlen(s10), &start, &len, &end);
data/mongrel2-1.12.2/tests/chunked_tests.c:63:32:  [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).
    rc = chunked_can_read(s11, strlen(s11), &start, &len, &end);
data/mongrel2-1.12.2/tests/dict_tests.c:46: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).
    int sz = strlen(str) + 1;
data/mongrel2-1.12.2/tests/hash_tests.c:40: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).
    int sz = strlen(str) + 1;
data/mongrel2-1.12.2/tests/list_tests.c:45: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).
    int sz = strlen(str) + 1;
data/mongrel2-1.12.2/tests/pattern_tests.c:9: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).
    m = pattern_match("ZED", strlen("ZED"), "ZED");
data/mongrel2-1.12.2/tests/pattern_tests.c:12: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).
    m = pattern_match("ZED", strlen("ZED"), "Z.D");
data/mongrel2-1.12.2/tests/pattern_tests.c:15: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).
    m = pattern_match("ZED", strlen("ZED"), "FOO");
data/mongrel2-1.12.2/tests/pattern_tests.c:23:33:  [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 = pattern_match("ZEEEED", strlen("ZEEEED"), "ZE*D");
data/mongrel2-1.12.2/tests/pattern_tests.c:26:33:  [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 = pattern_match("ZEEEED", strlen("ZEEEED"), "ZE*ED");
data/mongrel2-1.12.2/tests/pattern_tests.c:29: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).
    m = pattern_match("ZED", strlen("ZEEEED"), "ZE*ED");
data/mongrel2-1.12.2/tests/pattern_tests.c:32:29:  [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 = pattern_match("ZD", strlen("ZD"), "ZE*D");
data/mongrel2-1.12.2/tests/pattern_tests.c:35:33:  [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 = pattern_match("ZEEEED", strlen("ZEEEED"), "ZX*D");
data/mongrel2-1.12.2/tests/pattern_tests.c:38:33:  [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 = pattern_match("ZEEEED", strlen("ZEEEED"), "Z.*D");
data/mongrel2-1.12.2/tests/pattern_tests.c:41:33:  [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 = pattern_match("ZXXXXD", strlen("ZXXXXD"), "ZE.*D");
data/mongrel2-1.12.2/tests/pattern_tests.c:44:33:  [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 = pattern_match("ZEEEED", strlen("ZEEEED"), "ZE+D");
data/mongrel2-1.12.2/tests/pattern_tests.c:47:29:  [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 = pattern_match("ZD", strlen("ZEEEED"), "ZE+D");
data/mongrel2-1.12.2/tests/pattern_tests.c:50:33:  [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 = pattern_match("ZEEEED", strlen("ZEEEED"), "ZE-D");
data/mongrel2-1.12.2/tests/pattern_tests.c:53:29:  [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 = pattern_match("ZD", strlen("ZEEEED"), "ZE-D");
data/mongrel2-1.12.2/tests/pattern_tests.c:61: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).
    m = pattern_match("ZED", strlen("ZED"), "ZED$");
data/mongrel2-1.12.2/tests/pattern_tests.c:64: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).
    m = pattern_match("ZED", strlen("ZED"), "ZE$");
data/mongrel2-1.12.2/tests/pattern_tests.c:67: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).
    m = pattern_match("ZED", strlen("ZED"), "ED");
data/mongrel2-1.12.2/tests/pattern_tests.c:76: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).
    m = pattern_match("ZED", strlen("ZEED"), "Z(ED)");
data/mongrel2-1.12.2/tests/pattern_tests.c:93: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).
             strlen("THE (QUICK) brOWN FOx JUMPS"), "\\f[\\a]\\u-\\f[\\a]");
data/mongrel2-1.12.2/tests/pattern_tests.c:102:40:  [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 = pattern_match("/users/{1234}", strlen("/users/{1234}"), "/users/\\b{}");
data/mongrel2-1.12.2/tests/pattern_tests.c:105:39:  [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 = pattern_match("/users/{1234", strlen("/users/{1234}"), "/users/\\b{}");
data/mongrel2-1.12.2/tests/pattern_tests.c:108:39:  [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 = pattern_match("/users/1234}", strlen("/users/{1234}"), "/users/\\b{}");
data/mongrel2-1.12.2/tests/pattern_tests.c:116: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).
    m = pattern_match("ZED", strlen("ZED"), "Z[OE]D");
data/mongrel2-1.12.2/tests/pattern_tests.c:119: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).
    m = pattern_match("ZED", strlen("ZED"), "Z[^OE]D");
data/mongrel2-1.12.2/tests/pattern_tests.c:122: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).
    m = pattern_match("ZED", strlen("ZED"), "Z[A-Z]D");
data/mongrel2-1.12.2/tests/pattern_tests.c:130: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).
    m = pattern_match("ZED", strlen("ZED"), "ZEE?D");
data/mongrel2-1.12.2/tests/pattern_tests.c:133: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).
    m = pattern_match("ZEED", strlen("ZEED"), "ZEE?D");
data/mongrel2-1.12.2/tests/pattern_tests.c:136:32:  [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 = pattern_match("ZEEED", strlen("ZEEED"), "ZEE?D");
data/mongrel2-1.12.2/tests/pattern_tests.c:162: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).
    m = pattern_match("ZED", strlen("ZED"), "Z\\ED");
data/mongrel2-1.12.2/tests/pattern_tests.c:168: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).
    m = pattern_match("*Z*E+D.", strlen("*Z*E+D."), "\\*Z\\*E\\+D\\.");
data/mongrel2-1.12.2/tests/pattern_tests.c:172: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).
    m = pattern_match("ZED!", strlen("ZED!"), "ZED\\.");
data/mongrel2-1.12.2/tests/request_tests.c:75:40:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        bstring sender = bgets((bNgetc)fgetc, infile, ' ');
data/mongrel2-1.12.2/tests/request_tests.c:76:41:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        bstring conn_id = bgets((bNgetc)fgetc, infile, ' ');
data/mongrel2-1.12.2/tests/request_tests.c:77:38:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        bstring path = bgets((bNgetc)fgetc, infile, ' ');
data/mongrel2-1.12.2/tests/request_tests.c:78:40:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        list->entry[i] = bgets((bNgetc)fgetc, infile, '\n');
data/mongrel2-1.12.2/tests/superpoll_tests.c:146:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	nr = read(fd, buf, BUFSIZE);
data/mongrel2-1.12.2/tests/tst_tests.c:45: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).
    res = tst_search(node, "TESTNO", strlen("TESTNO"));
data/mongrel2-1.12.2/tests/tst_tests.c:57: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).
    res = tst_search_suffix(node, "TESTNO", strlen("TESTNO"));
data/mongrel2-1.12.2/tests/tst_tests.c:60: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).
    res = tst_search_suffix(node, "EST", strlen("EST"));
data/mongrel2-1.12.2/tests/tst_tests.c:63: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).
    res = tst_search_suffix(node, "ESTO", strlen("ESTO"));
data/mongrel2-1.12.2/tests/tst_tests.c:79: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).
    res = tst_search_prefix(node, "TE", strlen("TE"));
data/mongrel2-1.12.2/tests/tst_tests.c:82: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).
    res = tst_search_prefix(node, "TE--", strlen("TE--"));
data/mongrel2-1.12.2/tools/config_modules/mongodb.c:298:56:  [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).
                    el = tns_parse_string(string_data, strlen(string_data));
data/mongrel2-1.12.2/tools/lemon/lemon.c:44:32:  [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 lemonStrlen(X)   ((int)strlen(X))
data/mongrel2-1.12.2/tools/m2sh/src/commands/access.c:52:35:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((line = bgets((bNgetc) fgetc, log_file, '\n')) != NULL) {
data/mongrel2-1.12.2/tools/m2sh/src/config_file.c:57: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).
    check(base[strlen(base) - 1] == '/', "End directory base with / in %s or it won't work right.'", base);
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:173: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).
    size_t plen = strlen(prompt);
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:186: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).
    if (write(fd,seq,strlen(seq)) == -1) return;
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:188: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).
    if (write(fd,prompt,strlen(prompt)) == -1) return;
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:192: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).
    if (write(fd,seq,strlen(seq)) == -1) return;
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:195: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).
    if (write(fd,seq,strlen(seq)) == -1) return;
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:199: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).
    size_t plen = strlen(prompt);
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:218:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        nread = read(fd,&c,1);
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:260:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(fd,seq,2) == -1) break;
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:292:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(buf,history[history_len-1-history_index],buflen);
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:294:33:  [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 = pos = strlen(buf);
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:356: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).
        count = strlen(buf);
data/mongrel2-1.12.2/tools/m2sh/src/linenoise.c:380: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).
        len = strlen(buf);
data/mongrel2-1.12.2/tools/procer/profile.c:14:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    data = bgets((bNgetc)fgetc, test_file, '\n');

ANALYSIS SUMMARY:

Hits = 402
Lines analyzed = 61249 in approximately 1.70 seconds (36114 lines/second)
Physical Source Lines of Code (SLOC) = 43928
Hits@level = [0] 557 [1] 143 [2] 159 [3]  36 [4]  61 [5]   3
Hits@level+ = [0+] 959 [1+] 402 [2+] 259 [3+] 100 [4+]  64 [5+]   3
Hits/KSLOC@level+ = [0+] 21.8312 [1+] 9.15134 [2+] 5.89601 [3+] 2.27645 [4+] 1.45693 [5+] 0.0682936
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.