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/urweb-20170720+dfsg/include/urweb/queue.h
Examining data/urweb-20170720+dfsg/include/urweb/request.h
Examining data/urweb-20170720+dfsg/include/urweb/types.h
Examining data/urweb-20170720+dfsg/include/urweb/urweb.h
Examining data/urweb-20170720+dfsg/include/urweb/urweb_cpp.h
Examining data/urweb-20170720+dfsg/include/urweb/types_cpp.h
Examining data/urweb-20170720+dfsg/src/c/cgi.c
Examining data/urweb-20170720+dfsg/src/c/fastcgi.c
Examining data/urweb-20170720+dfsg/src/c/fastcgi.h
Examining data/urweb-20170720+dfsg/src/c/http.c
Examining data/urweb-20170720+dfsg/src/c/memmem.c
Examining data/urweb-20170720+dfsg/src/c/openssl.c
Examining data/urweb-20170720+dfsg/src/c/queue.c
Examining data/urweb-20170720+dfsg/src/c/request.c
Examining data/urweb-20170720+dfsg/src/c/static.c
Examining data/urweb-20170720+dfsg/src/c/urweb.c
Examining data/urweb-20170720+dfsg/tests/test.c
Examining data/urweb-20170720+dfsg/tests/test.h
Examining data/urweb-20170720+dfsg/tests/transactional.c
Examining data/urweb-20170720+dfsg/tests/transactional.h

FINAL RESULTS:

data/urweb-20170720+dfsg/src/c/cgi.c:57: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(stderr, fmt, ap);
data/urweb-20170720+dfsg/src/c/cgi.c:89:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(new_path, "%s%s", path, path_info);
data/urweb-20170720+dfsg/src/c/fastcgi.c:161:9:  [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.
  len = vsnprintf((char *)o->r.contentData, 65535, fmt, ap);
data/urweb-20170720+dfsg/src/c/fastcgi.c:179:15:  [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.
    int len = vsnprintf((char *)o->r.contentData, 65535, fmt, ap);
data/urweb-20170720+dfsg/src/c/fastcgi.c:185:5:  [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(stderr, fmt, ap);
data/urweb-20170720+dfsg/src/c/fastcgi.c:195:15:  [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.
    int len = vsnprintf((char *)o->r.contentData + 7, 65535 - 7, fmt, ap);
data/urweb-20170720+dfsg/src/c/fastcgi.c:206:5:  [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(stderr, fmt, ap);
data/urweb-20170720+dfsg/src/c/fastcgi.c:516:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(path_buf, "%s%s", path, path_info);
data/urweb-20170720+dfsg/src/c/http.c:26:51:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define qfprintf(f, fmt, args...) do { if(!quiet) fprintf(f, fmt, ##args); } while(0)
data/urweb-20170720+dfsg/src/c/http.c:27:47:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define qprintf(fmt, args...) do { if(!quiet) printf(fmt, ##args); } while(0)
data/urweb-20170720+dfsg/src/c/http.c:64: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(stderr, fmt, ap);
data/urweb-20170720+dfsg/src/c/http.c:72:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(fmt, ap);
data/urweb-20170720+dfsg/src/c/openssl.c:99:9:  [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(uw_sig_file, F_OK)) {
data/urweb-20170720+dfsg/src/c/request.c:460: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(rc->queryString, inputs);
data/urweb-20170720+dfsg/src/c/request.c:501: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(rc->path_copy, path);
data/urweb-20170720+dfsg/src/c/request.c:519:11:  [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(errmsg, uw_error_message(ctx));
data/urweb-20170720+dfsg/src/c/request.c:543:11:  [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(errmsg, uw_error_message(ctx));
data/urweb-20170720+dfsg/src/c/request.c:564: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).
        strcpy(errmsg, uw_error_message(ctx));
data/urweb-20170720+dfsg/src/c/static.c:14:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(fmt, ap);
data/urweb-20170720+dfsg/src/c/urweb.c:750:3:  [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.
  vsnprintf(ctx->error_message, ERROR_BUF_LEN, fmt, ap);
data/urweb-20170720+dfsg/src/c/urweb.c:763:3:  [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.
  vsnprintf(ctx->error_message, ERROR_BUF_LEN, fmt, ap);
data/urweb-20170720+dfsg/src/c/urweb.c:1463: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(ctx->outHeaders.front, s);
data/urweb-20170720+dfsg/src/c/urweb.c:1487: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(ctx->script.front, s);
data/urweb-20170720+dfsg/src/c/urweb.c:1506:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(r, " onload='%s'", s);
data/urweb-20170720+dfsg/src/c/urweb.c:1516:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(r, " onunload='unloading=true;%s;unload()'", s);
data/urweb-20170720+dfsg/src/c/urweb.c:1526:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(r, "sig=\"%s\";", sig);
data/urweb-20170720+dfsg/src/c/urweb.c:1535:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(r, "isPost=%s;client_id=%u;client_pass=%d;url_prefix=\"%s\";timeout=%d;%s%s%slistener();",
data/urweb-20170720+dfsg/src/c/urweb.c:1707: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(ctx->script.front, s);
data/urweb-20170720+dfsg/src/c/urweb.c:1723: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(ctx->script.front, s);
data/urweb-20170720+dfsg/src/c/urweb.c:2484: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(s, s1);
data/urweb-20170720+dfsg/src/c/urweb.c:2485: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(s, s2);
data/urweb-20170720+dfsg/src/c/urweb.c:2533: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(s, s1);
data/urweb-20170720+dfsg/src/c/urweb.c:2569:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(r, uw_sqlfmtInt, n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2589:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(r, uw_sqlfmtFloat, n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2646: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(s2, uw_sqlsuffixString);
data/urweb-20170720+dfsg/src/c/urweb.c:2688: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(s2, uw_sqlsuffixChar);
data/urweb-20170720+dfsg/src/c/urweb.c:2736: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(s2, uw_sqlsuffixBlob);
data/urweb-20170720+dfsg/src/c/urweb.c:2748:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(r, uw_sqlfmtInt, combo, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2773:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(r, uw_sqlfmtUint4, cli, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2822:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(r, "'%s.%06u'::timestamp", s, t.microseconds);
data/urweb-20170720+dfsg/src/c/urweb.c:2825:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(r, "'%s'::timestamp", s);
data/urweb-20170720+dfsg/src/c/urweb.c:2829:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(r, "'%s'", s);
data/urweb-20170720+dfsg/src/c/cgi.c:34:12:  [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 ((r = getenv(uppercased)))
data/urweb-20170720+dfsg/src/c/cgi.c:38:12:  [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.
    return getenv(uppercased + 5);
data/urweb-20170720+dfsg/src/c/cgi.c:44:10:  [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.
  return getenv(name);
data/urweb-20170720+dfsg/src/c/cgi.c:69: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 *method = getenv("REQUEST_METHOD"),
data/urweb-20170720+dfsg/src/c/cgi.c:70:13:  [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.
    *path = getenv("SCRIPT_NAME"), *path_info = getenv("PATH_INFO"),
data/urweb-20170720+dfsg/src/c/cgi.c:70:49:  [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.
    *path = getenv("SCRIPT_NAME"), *path_info = getenv("PATH_INFO"),
data/urweb-20170720+dfsg/src/c/cgi.c:71:21:  [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.
    *query_string = getenv("QUERY_STRING");
data/urweb-20170720+dfsg/src/c/fastcgi.c:568: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.
  char *fwsa = getenv("FCGI_WEB_SERVER_ADDRS"), *nthreads_s = getenv("URWEB_NUM_THREADS");
data/urweb-20170720+dfsg/src/c/fastcgi.c:568:63:  [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 *fwsa = getenv("FCGI_WEB_SERVER_ADDRS"), *nthreads_s = getenv("URWEB_NUM_THREADS");
data/urweb-20170720+dfsg/src/c/fastcgi.c:583:17:  [3] (buffer) getopt:
  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 ((opt = getopt(argc, argv, "ht:")) != -1) {
data/urweb-20170720+dfsg/src/c/http.c:49:10:  [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.
  return getenv(name);
data/urweb-20170720+dfsg/src/c/http.c:362:17:  [3] (buffer) getopt:
  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 ((opt = getopt(argc, argv, "hp:a:A:t:kqT:m:")) != -1) {
data/urweb-20170720+dfsg/src/c/request.c:163: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.
  if ((stackSize_s = getenv("URWEB_STACK_SIZE")) != NULL && stackSize_s[0] != 0) {
data/urweb-20170720+dfsg/src/c/urweb.c:374:3:  [3] (random) srandom:
  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.
  srandom(clock());
data/urweb-20170720+dfsg/src/c/urweb.c:3897:12:  [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.
    return getenv(name);
data/urweb-20170720+dfsg/src/c/urweb.c:4757:16:  [3] (random) random:
  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.
  int doBump = random() % 1024 == 0;
data/urweb-20170720+dfsg/src/c/cgi.c:29:3:  [2] (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). Risk is low because the source is a constant string.
  strcpy(uppercased, "HTTP_");
data/urweb-20170720+dfsg/src/c/fastcgi.c:38: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 contentData[65535];
data/urweb-20170720+dfsg/src/c/fastcgi.c:142: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(o->r.contentData, buf, len2);
data/urweb-20170720+dfsg/src/c/fastcgi.c:194:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy((char *)o->r.contentData, "DEBUG: ");
data/urweb-20170720+dfsg/src/c/fastcgi.c:239:3:  [2] (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). Risk is low because the source is a constant string.
  strcpy(hs->uppercased, "HTTP_");
data/urweb-20170720+dfsg/src/c/fastcgi.c:298: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(nv->name, *buf, nameLength);
data/urweb-20170720+dfsg/src/c/fastcgi.c:301: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(nv->value, *buf + nameLength, valueLength);
data/urweb-20170720+dfsg/src/c/fastcgi.c:444: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).
      body_len = atoi(s);
data/urweb-20170720+dfsg/src/c/fastcgi.c:491:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&body[body_read], r->contentData, this_len);
data/urweb-20170720+dfsg/src/c/fastcgi.c:571: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).
    nthreads = atoi(nthreads_s);
data/urweb-20170720+dfsg/src/c/fastcgi.c:595: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).
      nthreads = atoi(optarg);
data/urweb-20170720+dfsg/src/c/fastcgi.c:647: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 host[100], matched = 0;
data/urweb-20170720+dfsg/src/c/fastcgi.h:56: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 reserved[5];
data/urweb-20170720+dfsg/src/c/fastcgi.h:82: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 reserved[3];
data/urweb-20170720+dfsg/src/c/fastcgi.h:107: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 reserved[7];
data/urweb-20170720+dfsg/src/c/http.c:284: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.
            char clen[100];
data/urweb-20170720+dfsg/src/c/http.c:286: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(clen, "Content-length: %d\r\n", uw_pagelen(ctx));
data/urweb-20170720+dfsg/src/c/http.c:374:17:  [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).
      uw_port = atoi(optarg);
data/urweb-20170720+dfsg/src/c/http.c:401: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).
      nthreads = atoi(optarg);
data/urweb-20170720+dfsg/src/c/http.c:414:26:  [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).
      recv_timeout_sec = atoi(optarg);
data/urweb-20170720+dfsg/src/c/http.c:427:13:  [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).
      opt = atoi(optarg);
data/urweb-20170720+dfsg/src/c/openssl.c:102:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if ((fd = open(uw_sig_file, O_WRONLY | O_CREAT, 0700)) < 0) {
data/urweb-20170720+dfsg/src/c/openssl.c:115:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if ((fd = open(uw_sig_file, O_RDONLY)) < 0) {
data/urweb-20170720+dfsg/src/c/request.c:257: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[ERROR_BUF_LEN];
data/urweb-20170720+dfsg/src/c/request.c:279: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).
    int clen = atoi(clen_s);
data/urweb-20170720+dfsg/src/c/request.c:328:22:  [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).
      unsigned idn = atoi(id);
data/urweb-20170720+dfsg/src/c/request.c:329:30:  [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).
      uw_client_connect(idn, atoi(pass), sock, send, close, logger_data, log_error);
data/urweb-20170720+dfsg/src/c/request.c:583:9:  [2] (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). Risk is low because the source is a constant string.
        strcpy(errmsg, "Unknown uw_handle return code");
data/urweb-20170720+dfsg/src/c/urweb.c:125: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(b->front, s, len);
data/urweb-20170720+dfsg/src/c/urweb.c:135: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(b->front, s, len);
data/urweb-20170720+dfsg/src/c/urweb.c:502: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 error_message[ERROR_BUF_LEN];
data/urweb-20170720+dfsg/src/c/urweb.c:807:19:  [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).
    unsigned id = atoi(id_s);
data/urweb-20170720+dfsg/src/c/urweb.c:808: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).
    int pass = atoi(pass_s);
data/urweb-20170720+dfsg/src/c/urweb.c:1420: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(ctx->output_buffer, ctx->outHeaders.start, ctx->outHeaders.front - ctx->outHeaders.start);
data/urweb-20170720+dfsg/src/c/urweb.c:1421: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(ctx->output_buffer + (ctx->outHeaders.front - ctx->outHeaders.start), "\r\n", 2);
data/urweb-20170720+dfsg/src/c/urweb.c:1422: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(ctx->output_buffer + (ctx->outHeaders.front - ctx->outHeaders.start) + 2, ctx->page.start, ctx->page.front - ctx->page.start);
data/urweb-20170720+dfsg/src/c/urweb.c:1561:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "\\\"");
data/urweb-20170720+dfsg/src/c/urweb.c:1565:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "\\047");
data/urweb-20170720+dfsg/src/c/urweb.c:1569:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "\\\\");
data/urweb-20170720+dfsg/src/c/urweb.c:1573:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "\\074");
data/urweb-20170720+dfsg/src/c/urweb.c:1577:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "\\046");
data/urweb-20170720+dfsg/src/c/urweb.c:1584: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(s2, "\\%03o", c);
data/urweb-20170720+dfsg/src/c/urweb.c:1606:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(s2, "\\\"");
data/urweb-20170720+dfsg/src/c/urweb.c:1610:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(s2, "\\047");
data/urweb-20170720+dfsg/src/c/urweb.c:1614:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(s2, "\\\\");
data/urweb-20170720+dfsg/src/c/urweb.c:1618:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(s2, "\\074");
data/urweb-20170720+dfsg/src/c/urweb.c:1622:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(s2, "\\046");
data/urweb-20170720+dfsg/src/c/urweb.c:1629: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(s2, "\\%03o", (unsigned char)c);
data/urweb-20170720+dfsg/src/c/urweb.c:1656:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "\\\\");
data/urweb-20170720+dfsg/src/c/urweb.c:1660:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "\\074");
data/urweb-20170720+dfsg/src/c/urweb.c:1664:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "\\046");
data/urweb-20170720+dfsg/src/c/urweb.c:1671: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(s2, "\\%03o", c);
data/urweb-20170720+dfsg/src/c/urweb.c:1691: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(r, "%u%n", chn.chn, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1705:3:  [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(ctx->script.front, "s%d_%llu=sc(exec(%n", ctx->id, ctx->source_count, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1709:3:  [2] (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). Risk is low because the source is a constant string.
  strcpy(ctx->script.front, "));");
data/urweb-20170720+dfsg/src/c/urweb.c:1721:3:  [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(ctx->script.front, "sv(s%d_%llu,exec(%n", src.context, src.source, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1725:3:  [2] (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). Risk is low because the source is a constant string.
  strcpy(ctx->script.front, "));");
data/urweb-20170720+dfsg/src/c/urweb.c:1751: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(ctx->page.front, s, len);
data/urweb-20170720+dfsg/src/c/urweb.c:1787:3:  [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(result, "%lld%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1797:3:  [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(result, "%.16g%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1813:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(p, "&quot;");
data/urweb-20170720+dfsg/src/c/urweb.c:1816:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(p, "&amp;");
data/urweb-20170720+dfsg/src/c/urweb.c:1835:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(p, "&quot;");
data/urweb-20170720+dfsg/src/c/urweb.c:1838:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(p, "&amp;");
data/urweb-20170720+dfsg/src/c/urweb.c:1856:3:  [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(ctx->page.front, "%lld%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1871:3:  [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(ctx->page.front, "%g%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1914:3:  [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(r, "%lld%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1928: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(r, "%u%n", chn.chn, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1940:3:  [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(r, "%g%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1965: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(p, ".%02X", c);
data/urweb-20170720+dfsg/src/c/urweb.c:1987:3:  [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(r, "%d/%llu%n", src.context, src.source, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:1995:3:  [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(ctx->page.front, "%lld%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2011: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(ctx->page.front, "%u%n", chn.chn, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2022:3:  [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(ctx->page.front, "%g%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2056: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(ctx->page.front, ".%02X", c);
data/urweb-20170720+dfsg/src/c/urweb.c:2077:3:  [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(ctx->page.front, "%d/%llu%n", src.context, src.source, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2220:3:  [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(r, "%lld%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2229:3:  [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(ctx->page.front, "%lld%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2242:3:  [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(r, "&#%u;%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2252:3:  [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(ctx->page.front, "&#%u;%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2263:3:  [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(r, "%g%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2272:3:  [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(ctx->page.front, "%g%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2284:3:  [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(r, "%lld%n", (uw_Basis_int)t.seconds * 1000000 + t.microseconds, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2293:3:  [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(ctx->page.front, "%lld%n", (uw_Basis_int)n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2309:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "&lt;");
data/urweb-20170720+dfsg/src/c/urweb.c:2313:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "&amp;");
data/urweb-20170720+dfsg/src/c/urweb.c:2357:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(ctx->page.front, "False");
data/urweb-20170720+dfsg/src/c/urweb.c:2361:5:  [2] (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). Risk is low because the source is a constant string.
    strcpy(ctx->page.front, "True");
data/urweb-20170720+dfsg/src/c/urweb.c:2388:3:  [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(r, "s%d_%llu%n", src.context, src.source, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2397:3:  [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(ctx->page.front, "s%d_%llu%n", src.context, src.source, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2505: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(r, s+start, len);
data/urweb-20170720+dfsg/src/c/urweb.c:2557: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(r, p, len);
data/urweb-20170720+dfsg/src/c/urweb.c:2621:9:  [2] (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). Risk is low because the source is a constant string.
        strcpy(s2, "\\'");
data/urweb-20170720+dfsg/src/c/urweb.c:2623:9:  [2] (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). Risk is low because the source is a constant string.
        strcpy(s2, "''");
data/urweb-20170720+dfsg/src/c/urweb.c:2628:9:  [2] (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). Risk is low because the source is a constant string.
        strcpy(s2, "\\\\");
data/urweb-20170720+dfsg/src/c/urweb.c:2637: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(s2, "\\%03o", (unsigned char)c);
data/urweb-20170720+dfsg/src/c/urweb.c:2664:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "\\'");
data/urweb-20170720+dfsg/src/c/urweb.c:2666:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "''");
data/urweb-20170720+dfsg/src/c/urweb.c:2671:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(s2, "\\\\");
data/urweb-20170720+dfsg/src/c/urweb.c:2680: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(s2, "\\%03o", (unsigned char)c);
data/urweb-20170720+dfsg/src/c/urweb.c:2714:9:  [2] (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). Risk is low because the source is a constant string.
        strcpy(s2, "\\'");
data/urweb-20170720+dfsg/src/c/urweb.c:2718:9:  [2] (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). Risk is low because the source is a constant string.
        strcpy(s2, "\\\\\\\\");
data/urweb-20170720+dfsg/src/c/urweb.c:2725: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(s2, "\\\\%03o", c);
data/urweb-20170720+dfsg/src/c/urweb.c:2730: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(s2, "%02X", c);
data/urweb-20170720+dfsg/src/c/urweb.c:2760:3:  [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(r, "%lld%n", combo, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2784:3:  [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(r, "%u%n", cli, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2863: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(ctx->heap.front, ".%06u", t.microseconds);
data/urweb-20170720+dfsg/src/c/urweb.c:2893:3:  [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(r, "%lld%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:2904:3:  [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(r, "%g%n", n, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:3126:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(usec, dot+1, len < 6 ? len : 6);
data/urweb-20170720+dfsg/src/c/urweb.c:3127:41:  [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).
      uw_Basis_time r = { mktime(&stm), atoi(usec) };
data/urweb-20170720+dfsg/src/c/urweb.c:3257: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(ret, p2+1, sz);
data/urweb-20170720+dfsg/src/c/urweb.c:3273: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(r, p + 1 + len, n-1);
data/urweb-20170720+dfsg/src/c/urweb.c:3301: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 formatted[30];
data/urweb-20170720+dfsg/src/c/urweb.c:3366: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 pre[INTS_MAX + 2];
data/urweb-20170720+dfsg/src/c/urweb.c:3370:3:  [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(pre, "%u\n%n", chn.chn, &preLen);
data/urweb-20170720+dfsg/src/c/urweb.c:3566: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(start, ctx->script_header, lenH);
data/urweb-20170720+dfsg/src/c/urweb.c:3567: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(start + lenH, "<script type=\"text/javascript\">", 31);
data/urweb-20170720+dfsg/src/c/urweb.c:3568: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(start + lenH + 31, ctx->script.start, len);
data/urweb-20170720+dfsg/src/c/urweb.c:3569: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(start + lenH + 31 + len, "</script>", 9);
data/urweb-20170720+dfsg/src/c/urweb.c:3578: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(start, ctx->script_header, lenH);
data/urweb-20170720+dfsg/src/c/urweb.c:3592: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(start, "<head>", 6);
data/urweb-20170720+dfsg/src/c/urweb.c:3593: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(start + 6, ctx->script_header, lenH);
data/urweb-20170720+dfsg/src/c/urweb.c:3594: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(start + 6 + lenH, "<script type=\"text/javascript\">", 31);
data/urweb-20170720+dfsg/src/c/urweb.c:3595: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(start + 6 + lenH + 31, ctx->script.start, len);
data/urweb-20170720+dfsg/src/c/urweb.c:3596: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(start + 6 + lenH + 31 + len, "</script></head>", 16);
data/urweb-20170720+dfsg/src/c/urweb.c:3606: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(start, "<head>", 6);
data/urweb-20170720+dfsg/src/c/urweb.c:3607: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(start + 6, ctx->script_header, lenH);
data/urweb-20170720+dfsg/src/c/urweb.c:3608: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(start + 6 + lenH, "</head>", 7);
data/urweb-20170720+dfsg/src/c/urweb.c:3619: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(sig, realsig, 2*uw_hash_blocksize);
data/urweb-20170720+dfsg/src/c/urweb.c:3909: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(&r[2*i], "%.02X", ((unsigned char *)sig)[i]);
data/urweb-20170720+dfsg/src/c/urweb.c:3909:42:  [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.
    sprintf(&r[2*i], "%.02X", ((unsigned char *)sig)[i]);
data/urweb-20170720+dfsg/src/c/urweb.c:4011:3:  [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(ctx->outHeaders.front, "%lu%n", (unsigned long)b.size, &len);
data/urweb-20170720+dfsg/src/c/urweb.c:4048:3:  [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(ctx->outHeaders.front, "%lu%n", (unsigned long)uw_buffer_used(&ctx->page), &len);
data/urweb-20170720+dfsg/src/c/urweb.c:4073: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(ctx->page.start, ctx->outHeaders.start, uw_buffer_used(&ctx->outHeaders));
data/urweb-20170720+dfsg/src/c/urweb.c:4435: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[14];
data/urweb-20170720+dfsg/src/c/urweb.c:4502:3:  [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(r, "uw%u%n", ctx->nextId++, &len);
data/urweb-20170720+dfsg/src/c/cgi.c:20:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t len = strlen(h);
data/urweb-20170720+dfsg/src/c/cgi.c:88: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).
    char *new_path = malloc(strlen(path) + strlen(path_info) + 1);
data/urweb-20170720+dfsg/src/c/cgi.c:88:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *new_path = malloc(strlen(path) + strlen(path_info) + 1);
data/urweb-20170720+dfsg/src/c/cgi.c:96:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((res = read(0, body + body_pos, body_len - body_pos)) > 0) {
data/urweb-20170720+dfsg/src/c/fastcgi.c:230:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t len = strlen(h);
data/urweb-20170720+dfsg/src/c/fastcgi.c:508:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      int len1 = strlen(path), len2 = strlen(path_info);
data/urweb-20170720+dfsg/src/c/fastcgi.c:508: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).
      int len1 = strlen(path), len2 = strlen(path_info);
data/urweb-20170720+dfsg/src/c/http.c:31: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).
  int len = strlen(h);
data/urweb-20170720+dfsg/src/c/openssl.c:121:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read(fd, &password, sizeof password) != sizeof password) {
data/urweb-20170720+dfsg/src/c/openssl.c:137: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).
  SHA256_Update(&c, in, strlen(in));
data/urweb-20170720+dfsg/src/c/request.c:82:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(100000);
data/urweb-20170720+dfsg/src/c/request.c:266: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).
      memmove(s+1, s+3, strlen(s+3)+1);
data/urweb-20170720+dfsg/src/c/request.c:307: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).
      boundary_len = strlen(boundary);
data/urweb-20170720+dfsg/src/c/request.c:317:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (!strncmp(path, prefix, strlen(prefix))
data/urweb-20170720+dfsg/src/c/request.c:318: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).
      && !strcmp(path + strlen(prefix), ".msgs")) {
data/urweb-20170720+dfsg/src/c/request.c:449: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).
      int len = strlen(inputs);
data/urweb-20170720+dfsg/src/c/request.c:488: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).
      size_t path_len = strlen(path);
data/urweb-20170720+dfsg/src/c/urweb.c:271:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  send(sock, on_success, strlen(on_success));
data/urweb-20170720+dfsg/src/c/urweb.c:313:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    send(sock, on_success, strlen(on_success));
data/urweb-20170720+dfsg/src/c/urweb.c:345: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).
    c->send(c->sock, on_success, strlen(on_success));
data/urweb-20170720+dfsg/src/c/urweb.c:893:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(ctx->error_message, msg, sizeof(ctx->error_message));
data/urweb-20170720+dfsg/src/c/urweb.c:1460: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).
  int len = strlen(s);
data/urweb-20170720+dfsg/src/c/urweb.c:1484: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).
  int len = strlen(s);
data/urweb-20170720+dfsg/src/c/urweb.c:1505: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).
    char *r = uw_malloc(ctx, 11 + strlen(s));
data/urweb-20170720+dfsg/src/c/urweb.c:1515: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).
    char *r = uw_malloc(ctx, 37 + strlen(s));
data/urweb-20170720+dfsg/src/c/urweb.c:1525: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).
      char *r = uw_malloc(ctx, strlen(sig) + 8);
data/urweb-20170720+dfsg/src/c/urweb.c:1533:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char *r = uw_malloc(ctx, 59 + 3 * INTS_MAX + strlen(ctx->app->url_prefix)
data/urweb-20170720+dfsg/src/c/urweb.c:1534: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).
                        + (ctx->needs_sig ? strlen(sig) + 7 : 0));
data/urweb-20170720+dfsg/src/c/urweb.c:1551: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).
  uw_check_heap(ctx, strlen(s) * 4 + 3);
data/urweb-20170720+dfsg/src/c/urweb.c:1590:3:  [1] (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). Risk is low because the source is a constant character.
  strcpy(s2, "\"");
data/urweb-20170720+dfsg/src/c/urweb.c:1634:3:  [1] (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). Risk is low because the source is a constant character.
  strcpy(s2, "\"");
data/urweb-20170720+dfsg/src/c/urweb.c:1642:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  uw_check_script(ctx, strlen(s) * 4 + 3);
data/urweb-20170720+dfsg/src/c/urweb.c:1652:7:  [1] (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). Risk is low because the source is a constant character.
      strcpy(s2, "\\");
data/urweb-20170720+dfsg/src/c/urweb.c:1677:3:  [1] (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). Risk is low because the source is a constant character.
  strcpy(s2, "\"");
data/urweb-20170720+dfsg/src/c/urweb.c:1699:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t s_len = strlen(s);
data/urweb-20170720+dfsg/src/c/urweb.c:1718:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t s_len = strlen(s);
data/urweb-20170720+dfsg/src/c/urweb.c:1750: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).
  int len = strlen(s);
data/urweb-20170720+dfsg/src/c/urweb.c:1756: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).
  uw_check(ctx, strlen(s) + 1);
data/urweb-20170720+dfsg/src/c/urweb.c:1803: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).
  int len = strlen(s);
data/urweb-20170720+dfsg/src/c/urweb.c:1878: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).
  uw_check(ctx, strlen(s) * 6);
data/urweb-20170720+dfsg/src/c/urweb.c:1951: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).
  uw_check_heap(ctx, strlen(s) * 3 + 1 + !!(s[0] == '_'));
data/urweb-20170720+dfsg/src/c/urweb.c:2043: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).
  uw_check(ctx, strlen(s) * 3 + !!(s[0] == '_'));
data/urweb-20170720+dfsg/src/c/urweb.c:2185:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(*s);
data/urweb-20170720+dfsg/src/c/urweb.c:2204:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(*s);
data/urweb-20170720+dfsg/src/c/urweb.c:2302: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).
  uw_check_heap(ctx, strlen(s) * 5 + 1);
data/urweb-20170720+dfsg/src/c/urweb.c:2327: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).
  uw_check(ctx, strlen(s) * 6);
data/urweb-20170720+dfsg/src/c/urweb.c:2431:10:  [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 strlen(s);
data/urweb-20170720+dfsg/src/c/urweb.c:2608: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).
  uw_check_heap(ctx, strlen(s) * 2 + 3 + uw_Estrings + strlen(uw_sqlsuffixString));
data/urweb-20170720+dfsg/src/c/urweb.c:2608: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).
  uw_check_heap(ctx, strlen(s) * 2 + 3 + uw_Estrings + strlen(uw_sqlsuffixString));
data/urweb-20170720+dfsg/src/c/urweb.c:2647: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).
  ctx->heap.front = s2 + 1 + strlen(uw_sqlsuffixString);
data/urweb-20170720+dfsg/src/c/urweb.c:2654: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).
  uw_check_heap(ctx, 5 + uw_Estrings + strlen(uw_sqlsuffixChar));
data/urweb-20170720+dfsg/src/c/urweb.c:2689: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).
  ctx->heap.front = s2 + 1 + strlen(uw_sqlsuffixChar);
data/urweb-20170720+dfsg/src/c/urweb.c:2699: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).
  uw_check_heap(ctx, b.size * 5 + 4 + strlen(uw_sqlsuffixBlob));
data/urweb-20170720+dfsg/src/c/urweb.c:2737: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).
  ctx->heap.front = s2 + 1 + strlen(uw_sqlsuffixBlob);
data/urweb-20170720+dfsg/src/c/urweb.c:3125: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).
      int len = strlen(dot+1);
data/urweb-20170720+dfsg/src/c/urweb.c:3241: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).
  int len = strlen(c);
data/urweb-20170720+dfsg/src/c/urweb.c:3368:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(msg);
data/urweb-20170720+dfsg/src/c/urweb.c:3417: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).
  if (!s || strlen(haystack) - (s - haystack) - (sizeof sig_intro - 1) < uw_hash_blocksize*2+1)
data/urweb-20170720+dfsg/src/c/urweb.c:3558: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).
        size_t lenH = strlen(ctx->script_header), len = uw_buffer_used(&ctx->script);
data/urweb-20170720+dfsg/src/c/urweb.c:3571: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).
        size_t lenH = strlen(ctx->script_header);
data/urweb-20170720+dfsg/src/c/urweb.c:3584: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).
        size_t lenH = strlen(ctx->script_header), len = uw_buffer_used(&ctx->script);
data/urweb-20170720+dfsg/src/c/urweb.c:3598: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).
        size_t lenH = strlen(ctx->script_header);
data/urweb-20170720+dfsg/src/c/urweb.c:3919:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int i, x = 0, len1 = strlen(s1);
data/urweb-20170720+dfsg/src/c/urweb.c:3921: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).
  if (len1 != strlen(s2)) return 0;
data/urweb-20170720+dfsg/src/c/urweb.c:3949: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).
  uw_Basis_blob b = {strlen(s), s};
data/urweb-20170720+dfsg/src/c/urweb.c:4108: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).
  uw_Basis_string ret = uw_malloc(ctx, strlen(s) + 1), r = ret;
data/urweb-20170720+dfsg/src/c/urweb.c:4142:12:  [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(s);
data/urweb-20170720+dfsg/src/c/urweb.c:4741: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).
    len += 1 + strlen(k);

ANALYSIS SUMMARY:

Hits = 263
Lines analyzed = 8185 in approximately 0.28 seconds (29569 lines/second)
Physical Source Lines of Code (SLOC) = 6430
Hits@level = [0]  75 [1]  68 [2] 137 [3]  16 [4]  42 [5]   0
Hits@level+ = [0+] 338 [1+] 263 [2+] 195 [3+]  58 [4+]  42 [5+]   0
Hits/KSLOC@level+ = [0+] 52.5661 [1+] 40.902 [2+] 30.3266 [3+] 9.02022 [4+] 6.53188 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.