ssl/ssl_lib.c:371: error: INTEGER_OVERFLOW_L2
  ([0, `s->ctx->sessions->num_nodes`] - 1):unsigned32 by call to `SSL_CTX_free`.
Showing all 9 steps of the trace


ssl/ssl_lib.c:316:1: Parameter `s->ctx->sessions->num_nodes`
314.   }
315.   
316. > void SSL_free(SSL *s)
317.   	{
318.   	int i;

ssl/ssl_lib.c:371:14: Call
369.   	/* Free up if allocated */
370.   
371.   	if (s->ctx) SSL_CTX_free(s->ctx);
                    ^
372.   
373.   	if (s->client_CA != NULL)

ssl/ssl_lib.c:1201:1: Parameter `a->sessions->num_nodes`
  1199.       { OPENSSL_free(comp); }
  1200.   
  1201. > void SSL_CTX_free(SSL_CTX *a)
  1202.   	{
  1203.   	int i;

ssl/ssl_lib.c:1223:3: Call
  1221.   	if (a->sessions != NULL)
  1222.   		{
  1223.   		SSL_CTX_flush_sessions(a,0);
            ^
  1224.   		lh_free(a->sessions);
  1225.   		}

ssl/ssl_sess.c:596:1: Parameter `s->sessions->num_nodes`
    594.   	}
    595.   
    596. > void SSL_CTX_flush_sessions(SSL_CTX *s, long t)
    597.   	{
    598.   	unsigned long i;

ssl/ssl_sess.c:608:2: Call
    606.   	i=tp.cache->down_load;
    607.   	tp.cache->down_load=0;
    608.   	lh_doall_arg(tp.cache,(void (*)())timeout,&tp);
            ^
    609.   	tp.cache->down_load=i;
    610.   	CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);

crypto/lhash/lhash.c:275:1: <LHS trace>
273.   	}
274.   
275. > void lh_doall_arg(LHASH *lh, void (*func)(), void *arg)
276.   	{
277.   	int i;

crypto/lhash/lhash.c:275:1: Parameter `lh->num_nodes`
      273.   	}
      274.   
      275. > void lh_doall_arg(LHASH *lh, void (*func)(), void *arg)
      276.   	{
      277.   	int i;

crypto/lhash/lhash.c:282:7: Binary operation: ([0, s->ctx->sessions->num_nodes] - 1):unsigned32 by call to `SSL_CTX_free` 
      280.   	/* reverse the order so we search from 'top to bottom'
      281.   	 * We were having memory leaks otherwise */
      282.   	for (i=lh->num_nodes-1; i>=0; i--)
                   ^
      283.   		{
      284.   		a=lh->b[i];

void lh_doall_arg(LHASH *lh, void (*func)(), void *arg)
	{
	int i;
	LHASH_NODE *a,*n;
	for (i=lh->num_nodes-1; i>=0; i--)
		{
		a=lh->b[i];
		while (a != NULL)
			{
			n=a->next;
			func(a->data,arg);
			a=n;
			}
		}
	}
['void SSL_free(SSL *s)\n\t{\n\tint i;\n\tif(s == NULL)\n\t    return;\n\ti=CRYPTO_add(&s->references,-1,CRYPTO_LOCK_SSL);\n#ifdef REF_PRINT\n\tREF_PRINT("SSL",s);\n#endif\n\tif (i > 0) return;\n#ifdef REF_CHECK\n\tif (i < 0)\n\t\t{\n\t\tfprintf(stderr,"SSL_free, bad reference count\\n");\n\t\tabort();\n\t\t}\n#endif\n\tCRYPTO_free_ex_data(ssl_meth,(char *)s,&s->ex_data);\n\tif (s->bbio != NULL)\n\t\t{\n\t\tif (s->bbio == s->wbio)\n\t\t\t{\n\t\t\ts->wbio=BIO_pop(s->wbio);\n\t\t\t}\n\t\tBIO_free(s->bbio);\n\t\ts->bbio=NULL;\n\t\t}\n\tif (s->rbio != NULL)\n\t\tBIO_free_all(s->rbio);\n\tif ((s->wbio != NULL) && (s->wbio != s->rbio))\n\t\tBIO_free_all(s->wbio);\n\tif (s->init_buf != NULL) BUF_MEM_free(s->init_buf);\n\tif (s->cipher_list != NULL) sk_SSL_CIPHER_free(s->cipher_list);\n\tif (s->cipher_list_by_id != NULL) sk_SSL_CIPHER_free(s->cipher_list_by_id);\n\tif (s->session != NULL)\n\t\t{\n\t\tssl_clear_bad_session(s);\n\t\tSSL_SESSION_free(s->session);\n\t\t}\n\tssl_clear_cipher_ctx(s);\n\tif (s->cert != NULL) ssl_cert_free(s->cert);\n\tif (s->ctx) SSL_CTX_free(s->ctx);\n\tif (s->client_CA != NULL)\n\t\tsk_X509_NAME_pop_free(s->client_CA,X509_NAME_free);\n\tif (s->method != NULL) s->method->ssl_free(s);\n\tOPENSSL_free(s);\n\t}', 'void SSL_CTX_free(SSL_CTX *a)\n\t{\n\tint i;\n\tif (a == NULL) return;\n\ti=CRYPTO_add(&a->references,-1,CRYPTO_LOCK_SSL_CTX);\n#ifdef REF_PRINT\n\tREF_PRINT("SSL_CTX",a);\n#endif\n\tif (i > 0) return;\n#ifdef REF_CHECK\n\tif (i < 0)\n\t\t{\n\t\tfprintf(stderr,"SSL_CTX_free, bad reference count\\n");\n\t\tabort();\n\t\t}\n#endif\n\tCRYPTO_free_ex_data(ssl_ctx_meth,(char *)a,&a->ex_data);\n\tif (a->sessions != NULL)\n\t\t{\n\t\tSSL_CTX_flush_sessions(a,0);\n\t\tlh_free(a->sessions);\n\t\t}\n\tif (a->cert_store != NULL)\n\t\tX509_STORE_free(a->cert_store);\n\tif (a->cipher_list != NULL)\n\t\tsk_SSL_CIPHER_free(a->cipher_list);\n\tif (a->cipher_list_by_id != NULL)\n\t\tsk_SSL_CIPHER_free(a->cipher_list_by_id);\n\tif (a->cert != NULL)\n\t\tssl_cert_free(a->cert);\n\tif (a->client_CA != NULL)\n\t\tsk_X509_NAME_pop_free(a->client_CA,X509_NAME_free);\n\tif (a->extra_certs != NULL)\n\t\tsk_X509_pop_free(a->extra_certs,X509_free);\n\tif (a->comp_methods != NULL)\n\t\tsk_SSL_COMP_pop_free(a->comp_methods,SSL_COMP_free);\n\tOPENSSL_free(a);\n\t}', 'void SSL_CTX_flush_sessions(SSL_CTX *s, long t)\n\t{\n\tunsigned long i;\n\tTIMEOUT_PARAM tp;\n\ttp.ctx=s;\n\ttp.cache=s->sessions;\n\tif (tp.cache == NULL) return;\n\ttp.time=t;\n\tCRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);\n\ti=tp.cache->down_load;\n\ttp.cache->down_load=0;\n\tlh_doall_arg(tp.cache,(void (*)())timeout,&tp);\n\ttp.cache->down_load=i;\n\tCRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);\n\t}', 'void lh_doall_arg(LHASH *lh, void (*func)(), void *arg)\n\t{\n\tint i;\n\tLHASH_NODE *a,*n;\n\tfor (i=lh->num_nodes-1; i>=0; i--)\n\t\t{\n\t\ta=lh->b[i];\n\t\twhile (a != NULL)\n\t\t\t{\n\t\t\tn=a->next;\n\t\t\tfunc(a->data,arg);\n\t\t\ta=n;\n\t\t\t}\n\t\t}\n\t}']