apps/s_server.c:1613: 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:1580:18: Call
1578.           }
1579.   
1580.           s_cert = load_cert(s_cert_file, s_cert_format,
                         ^
1581.                              NULL, e, "server certificate file");
1582.   

apps/apps.c:687:9: Call
  685.   
  686.       if (format == FORMAT_HTTP) {
  687.           load_cert_crl_http(file, &x, NULL);
                 ^
  688.           return x;
  689.       }

apps/apps.c:639:10: Call
    637.       OCSP_REQ_CTX *rctx = NULL;
    638.       int use_ssl, rv = 0;
    639.       if (!OCSP_parse_url(url, &host, &port, &path, &use_ssl))
                    ^
    640.           goto err;
    641.       if (use_ssl) {

crypto/ocsp/ocsp_lib.c:195:5: Assignment
      193.           goto parse_err;
      194.   
      195.       *(p++) = '\0';
                 ^
      196.   
      197.       if (strcmp(buf, "http") == 0) {

apps/s_server.c:1613:27: Call
1611.       if (next_proto_neg_in) {
1612.           unsigned short len;
1613.           next_proto.data = next_protos_parse(&len, next_proto_neg_in);
                                  ^
1614.           if (next_proto.data == NULL)
1615.               goto end;

apps/apps.c:2236:10: <Offset trace>
2234.   
2235.       out = app_malloc(strlen(in) + 1, "NPN buffer");
2236.       for (i = 0; i <= len; ++i) {
                 ^
2237.           if (i == len || in[i] == ',') {
2238.               if (i - start > 255) {

apps/apps.c:2236:10: Assignment
  2234.   
  2235.       out = app_malloc(strlen(in) + 1, "NPN buffer");
  2236.       for (i = 0; i <= len; ++i) {
                   ^
  2237.           if (i == len || in[i] == ',') {
  2238.               if (i - start > 255) {

apps/apps.c:2225:1: <Length trace>
2223.    *   returns: a malloced buffer or NULL on failure.
2224.    */
2225. > unsigned char *next_protos_parse(unsigned short *outlen, const char *in)
2226.   {
2227.       size_t len;

apps/apps.c:2225:1: Parameter `in->strlen`
  2223.    *   returns: a malloced buffer or NULL on failure.
  2224.    */
  2225. > unsigned char *next_protos_parse(unsigned short *outlen, const char *in)
  2226.   {
  2227.       size_t len;

apps/apps.c:2235:11: Call
  2233.           return NULL;
  2234.   
  2235.       out = app_malloc(strlen(in) + 1, "NPN buffer");
                    ^
  2236.       for (i = 0; i <= len; ++i) {
  2237.           if (i == len || in[i] == ',') {

apps/apps.c:991:1: Parameter `sz`
    989.   }
    990.   
    991. > void* app_malloc(int sz, const char *what)
    992.   {
    993.       void *vp = OPENSSL_malloc(sz);

apps/apps.c:993:16: Call
    991.   void* app_malloc(int sz, const char *what)
    992.   {
    993.       void *vp = OPENSSL_malloc(sz);
                          ^
    994.   
    995.       if (vp == NULL) {

crypto/mem.c:127:9: Assignment
      125.   
      126.       if (num <= 0)
      127.           return NULL;
                     ^
      128.   
      129.       allow_customize = 0;

apps/apps.c:993:5: Assignment
    991.   void* app_malloc(int sz, const char *what)
    992.   {
    993.       void *vp = OPENSSL_malloc(sz);
               ^
    994.   
    995.       if (vp == NULL) {

apps/apps.c:1001:5: Assignment
    999.           exit(1);
    1000.       }
    1001.       return vp;
                ^
    1002.   }
    1003.   

apps/apps.c:2235:5: Assignment
  2233.           return NULL;
  2234.   
  2235.       out = app_malloc(strlen(in) + 1, "NPN buffer");
              ^
  2236.       for (i = 0; i <= len; ++i) {
  2237.           if (i == len || in[i] == ',') {

apps/apps.c:2245:13: Array access: Offset: [1, 65535] Size: [1, +oo] by call to `next_protos_parse` 
  2243.               start = i + 1;
  2244.           } else
  2245.               out[i + 1] = in[i];
                      ^
  2246.       }
  2247.   
