apps/s_server.c:1594: 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:1561:18: Call
1559.           }
1560.   
1561.           s_cert = load_cert(s_cert_file, s_cert_format,
                         ^
1562.                              "server certificate file");
1563.   

apps/apps.c:686:9: Call
  684.       if (format == FORMAT_HTTP) {
  685.   #ifndef OPENSSL_NO_OCSP
  686.           load_cert_crl_http(file, &x, NULL);
                 ^
  687.   #endif
  688.           return x;

apps/apps.c:637:10: Call
    635.       OCSP_REQ_CTX *rctx = NULL;
    636.       int use_ssl, rv = 0;
    637.       if (!OCSP_parse_url(url, &host, &port, &path, &use_ssl))
                    ^
    638.           goto err;
    639.       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:1594:27: Call
1592.       if (next_proto_neg_in) {
1593.           unsigned short len;
1594.           next_proto.data = next_protos_parse(&len, next_proto_neg_in);
                                  ^
1595.           if (next_proto.data == NULL)
1596.               goto end;

apps/apps.c:1961:10: <Offset trace>
1959.   
1960.       out = app_malloc(strlen(in) + 1, "NPN buffer");
1961.       for (i = 0; i <= len; ++i) {
                 ^
1962.           if (i == len || in[i] == ',') {
1963.               if (i - start > 255) {

apps/apps.c:1961:10: Assignment
  1959.   
  1960.       out = app_malloc(strlen(in) + 1, "NPN buffer");
  1961.       for (i = 0; i <= len; ++i) {
                   ^
  1962.           if (i == len || in[i] == ',') {
  1963.               if (i - start > 255) {

apps/apps.c:1950:1: <Length trace>
1948.    *   returns: a malloced buffer or NULL on failure.
1949.    */
1950. > unsigned char *next_protos_parse(unsigned short *outlen, const char *in)
1951.   {
1952.       size_t len;

apps/apps.c:1950:1: Parameter `in->strlen`
  1948.    *   returns: a malloced buffer or NULL on failure.
  1949.    */
  1950. > unsigned char *next_protos_parse(unsigned short *outlen, const char *in)
  1951.   {
  1952.       size_t len;

apps/apps.c:1960:11: Call
  1958.           return NULL;
  1959.   
  1960.       out = app_malloc(strlen(in) + 1, "NPN buffer");
                    ^
  1961.       for (i = 0; i <= len; ++i) {
  1962.           if (i == len || in[i] == ',') {

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

apps/apps.c:995:16: Call
    993.   void* app_malloc(int sz, const char *what)
    994.   {
    995.       void *vp = OPENSSL_malloc(sz);
                          ^
    996.   
    997.       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:995:5: Assignment
    993.   void* app_malloc(int sz, const char *what)
    994.   {
    995.       void *vp = OPENSSL_malloc(sz);
               ^
    996.   
    997.       if (vp == NULL) {

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

apps/apps.c:1960:5: Assignment
  1958.           return NULL;
  1959.   
  1960.       out = app_malloc(strlen(in) + 1, "NPN buffer");
              ^
  1961.       for (i = 0; i <= len; ++i) {
  1962.           if (i == len || in[i] == ',') {

apps/apps.c:1970:13: Array access: Offset: [1, 65535] Size: [1, +oo] by call to `next_protos_parse` 
  1968.               start = i + 1;
  1969.           } else
  1970.               out[i + 1] = in[i];
                      ^
  1971.       }
  1972.   
