ssl/ssl_cert.c:925: error: INTEGER_OVERFLOW_L2
  ([2, max(2147483644, `s->init_buf->max`)] - [1, 2147483644]):unsigned64 by call to `ssl_add_cert_to_buf`.
Showing all 13 steps of the trace


ssl/ssl_cert.c:852:1: Parameter `s->init_buf->max`
850.   
851.   /* Add certificate chain to internal SSL BUF_MEM strcuture */
852. > int ssl_add_cert_chain(SSL *s, CERT_PKEY *cpk, unsigned long *l)
853.   {
854.       BUF_MEM *buf = s->init_buf;

ssl/ssl_cert.c:862:10: Call
860.   
861.       /* TLSv1 sends a chain with nothing in it, instead of an alert */
862.       if (!BUF_MEM_grow_clean(buf, 10)) {
                ^
863.           SSLerr(SSL_F_SSL_ADD_CERT_CHAIN, ERR_R_BUF_LIB);
864.           return 0;

crypto/buffer/buffer.c:157:1: Parameter `len`
  155.   }
  156.   
  157. > size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
  158.   {
  159.       char *ret;

ssl/ssl_cert.c:925:18: Call
923.               x = sk_X509_value(chain, i);
924.   
925.               if (!ssl_add_cert_to_buf(buf, l, x)) {
                        ^
926.                   X509_STORE_CTX_free(xs_ctx);
927.                   return 0;

ssl/ssl_cert.c:833:1: Parameter `buf->max`
  831.   /* Add a certificate to a BUF_MEM structure */
  832.   
  833. > static int ssl_add_cert_to_buf(BUF_MEM *buf, unsigned long *l, X509 *x)
  834.   {
  835.       int n;

ssl/ssl_cert.c:839:10: Call
  837.   
  838.       n = i2d_X509(x, NULL);
  839.       if (!BUF_MEM_grow_clean(buf, (int)(n + (*l) + 3))) {
                  ^
  840.           SSLerr(SSL_F_SSL_ADD_CERT_TO_BUF, ERR_R_BUF_LIB);
  841.           return 0;

crypto/buffer/buffer.c:157:1: Parameter `len`
    155.   }
    156.   
    157. > size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len)
    158.   {
    159.       char *ret;

crypto/buffer/buffer.c:181:15: Call
    179.           ret = sec_alloc_realloc(str, n);
    180.       else
    181.           ret = OPENSSL_clear_realloc(str->data, str->max, n);
                         ^
    182.       if (ret == NULL) {
    183.           BUFerr(BUF_F_BUF_MEM_GROW_CLEAN, ERR_R_MALLOC_FAILURE);

crypto/mem.c:184:1: <LHS trace>
182.   }
183.   
184. > void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num,
185.                              const char *file, int line)
186.   {

crypto/mem.c:184:1: Parameter `num`
      182.   }
      183.   
      184. > void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num,
      185.                              const char *file, int line)
      186.   {

crypto/mem.c:184:1: <RHS trace>
182.   }
183.   
184. > void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num,
185.                              const char *file, int line)
186.   {

crypto/mem.c:184:1: Parameter `num`
      182.   }
      183.   
      184. > void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num,
      185.                              const char *file, int line)
      186.   {

crypto/mem.c:199:9: Binary operation: ([2, max(2147483644, s->init_buf->max)] - [1, 2147483644]):unsigned64 by call to `ssl_add_cert_to_buf` 
      197.       /* Can't shrink the buffer since memcpy below copies |old_len| bytes. */
      198.       if (num < old_len) {
      199.           memset((char*)str + num, 0, old_len - num);
                     ^
      200.           return str;
      201.       }
