apps/s_server.c:1589: error: BUFFER_OVERRUN_L3
  Offset: [1, 65535] Size: [1, +oo] by call to `next_protos_parse`.
Showing all 17 steps of the trace


apps/s_server.c:1556:18: Call
1554.           }
1555.   
1556.           s_cert = load_cert(s_cert_file, s_cert_format,
                         ^
1557.                              "server certificate file");
1558.   

apps/apps.c:615:9: Call
  613.       if (format == FORMAT_HTTP) {
  614.   #if !defined(OPENSSL_NO_OCSP) && !defined(OPENSSL_NO_SOCK)
  615.           load_cert_crl_http(file, &x, NULL);
                 ^
  616.   #endif
  617.           return x;

apps/apps.c:566:10: Call
    564.       OCSP_REQ_CTX *rctx = NULL;
    565.       int use_ssl, rv = 0;
    566.       if (!OCSP_parse_url(url, &host, &port, &path, &use_ssl))
                    ^
    567.           goto err;
    568.       if (use_ssl) {

crypto/ocsp/ocsp_lib.c:139:5: Assignment
      137.           goto parse_err;
      138.   
      139.       *(p++) = '\0';
                 ^
      140.   
      141.       if (strcmp(buf, "http") == 0) {

apps/s_server.c:1589:27: Call
1587.       if (next_proto_neg_in) {
1588.           size_t len;
1589.           next_proto.data = next_protos_parse(&len, next_proto_neg_in);
                                  ^
1590.           if (next_proto.data == NULL)
1591.               goto end;

apps/apps.c:1904:10: <Offset trace>
1902.   
1903.       out = app_malloc(strlen(in) + 1, "NPN buffer");
1904.       for (i = 0; i <= len; ++i) {
                 ^
1905.           if (i == len || in[i] == ',') {
1906.               if (i - start > 255) {

apps/apps.c:1904:10: Assignment
  1902.   
  1903.       out = app_malloc(strlen(in) + 1, "NPN buffer");
  1904.       for (i = 0; i <= len; ++i) {
                   ^
  1905.           if (i == len || in[i] == ',') {
  1906.               if (i - start > 255) {

apps/apps.c:1893:1: <Length trace>
1891.    *   returns: a malloc'd buffer or NULL on failure.
1892.    */
1893. > unsigned char *next_protos_parse(size_t *outlen, const char *in)
1894.   {
1895.       size_t len;

apps/apps.c:1893:1: Parameter `in->strlen`
  1891.    *   returns: a malloc'd buffer or NULL on failure.
  1892.    */
  1893. > unsigned char *next_protos_parse(size_t *outlen, const char *in)
  1894.   {
  1895.       size_t len;

apps/apps.c:1903:11: Call
  1901.           return NULL;
  1902.   
  1903.       out = app_malloc(strlen(in) + 1, "NPN buffer");
                    ^
  1904.       for (i = 0; i <= len; ++i) {
  1905.           if (i == len || in[i] == ',') {

apps/apps.c:925:1: Parameter `sz`
    923.   }
    924.   
    925. > void* app_malloc(int sz, const char *what)
    926.   {
    927.       void *vp = OPENSSL_malloc(sz);

apps/apps.c:927:16: Call
    925.   void* app_malloc(int sz, const char *what)
    926.   {
    927.       void *vp = OPENSSL_malloc(sz);
                          ^
    928.   
    929.       if (vp == NULL) {

crypto/mem.c:166:9: Assignment
      164.   
      165.       if (num == 0)
      166.           return NULL;
                     ^
      167.   
      168.       FAILTEST();

apps/apps.c:927:5: Assignment
    925.   void* app_malloc(int sz, const char *what)
    926.   {
    927.       void *vp = OPENSSL_malloc(sz);
               ^
    928.   
    929.       if (vp == NULL) {

apps/apps.c:935:5: Assignment
    933.           exit(1);
    934.       }
    935.       return vp;
               ^
    936.   }
    937.   

apps/apps.c:1903:5: Assignment
  1901.           return NULL;
  1902.   
  1903.       out = app_malloc(strlen(in) + 1, "NPN buffer");
              ^
  1904.       for (i = 0; i <= len; ++i) {
  1905.           if (i == len || in[i] == ',') {

apps/apps.c:1913:13: Array access: Offset: [1, 65535] Size: [1, +oo] by call to `next_protos_parse` 
  1911.               start = i + 1;
  1912.           } else
  1913.               out[i + 1] = in[i];
                      ^
  1914.       }
  1915.   
