ssl/statem/statem_clnt.c:3339: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - [0, `pkt->written` + 130]):unsigned64 by call to `tls_construct_cke_srp`.
Showing all 15 steps of the trace


ssl/statem/statem_clnt.c:3312:1: Parameter `pkt->written`
3310.   }
3311.   
3312. > int tls_construct_client_key_exchange(SSL *s, WPACKET *pkt)
3313.   {
3314.       unsigned long alg_k;

ssl/statem/statem_clnt.c:3339:14: Call
3337.               goto err;
3338.       } else if (alg_k & SSL_kSRP) {
3339.           if (!tls_construct_cke_srp(s, pkt))
                     ^
3340.               goto err;
3341.       } else if (!(alg_k & SSL_kPSK)) {

ssl/statem/statem_clnt.c:3282:1: Parameter `pkt->written`
  3280.   }
  3281.   
  3282. > static int tls_construct_cke_srp(SSL *s, WPACKET *pkt)
  3283.   {
  3284.   #ifndef OPENSSL_NO_SRP

ssl/statem/statem_clnt.c:3288:17: Call
  3286.   
  3287.       if (s->srp_ctx.A == NULL
  3288.               || !WPACKET_sub_allocate_bytes_u16(pkt, BN_num_bytes(s->srp_ctx.A),
                          ^
  3289.                                                  &abytes)) {
  3290.           SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_CONSTRUCT_CKE_SRP,

crypto/packet.c:26:1: Parameter `pkt->written`
    24.   }
    25.   
    26. > int WPACKET_sub_allocate_bytes__(WPACKET *pkt, size_t len,
    27.                                    unsigned char **allocbytes, size_t lenbytes)
    28.   {

crypto/packet.c:29:10: Call
    27.                                    unsigned char **allocbytes, size_t lenbytes)
    28.   {
    29.       if (!WPACKET_start_sub_packet_len__(pkt, lenbytes)
                   ^
    30.               || !WPACKET_allocate_bytes(pkt, len, allocbytes)
    31.               || !WPACKET_close(pkt))

crypto/packet.c:272:1: Parameter `pkt->written`
      270.   }
      271.   
      272. > int WPACKET_start_sub_packet_len__(WPACKET *pkt, size_t lenbytes)
      273.   {
      274.       WPACKET_SUB *sub;

crypto/packet.c:296:10: Call
      294.       }
      295.   
      296.       if (!WPACKET_allocate_bytes(pkt, lenbytes, &lenchars))
                      ^
      297.           return 0;
      298.       /* Convert to an offset in case the underlying BUF_MEM gets realloc'd */

crypto/packet.c:16:1: Parameter `pkt->written`
        14.   #define DEFAULT_BUF_SIZE    256
        15.   
        16. > int WPACKET_allocate_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes)
        17.   {
        18.       if (!WPACKET_reserve_bytes(pkt, len, allocbytes))

crypto/packet.c:18:10: Call
        16.   int WPACKET_allocate_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes)
        17.   {
        18.       if (!WPACKET_reserve_bytes(pkt, len, allocbytes))
                       ^
        19.           return 0;
        20.   

crypto/packet.c:40:1: <LHS trace>
38.                        ? (p)->staticbuf : (unsigned char *)(p)->buf->data)
39.   
40. > int WPACKET_reserve_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes)
41.   {
42.       /* Internal API, so should not fail */

crypto/packet.c:40:1: Parameter `pkt->buf->length`
          38.                        ? (p)->staticbuf : (unsigned char *)(p)->buf->data)
          39.   
          40. > int WPACKET_reserve_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes)
          41.   {
          42.       /* Internal API, so should not fail */

crypto/packet.c:40:1: <RHS trace>
38.                        ? (p)->staticbuf : (unsigned char *)(p)->buf->data)
39.   
40. > int WPACKET_reserve_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes)
41.   {
42.       /* Internal API, so should not fail */

crypto/packet.c:40:1: Parameter `len`
          38.                        ? (p)->staticbuf : (unsigned char *)(p)->buf->data)
          39.   
          40. > int WPACKET_reserve_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes)
          41.   {
          42.       /* Internal API, so should not fail */

crypto/packet.c:49:36: Binary operation: ([0, +oo] - [0, pkt->written + 130]):unsigned64 by call to `tls_construct_cke_srp` 
          47.           return 0;
          48.   
          49.       if (pkt->staticbuf == NULL && (pkt->buf->length - pkt->written < len)) {
                                                   ^
          50.           size_t newlen;
          51.           size_t reflen;
