ssl/statem/extensions.c:1214: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - [`pkt->written`, `pkt->written` + 4]):unsigned64 by call to `construct_ca_names`.
Showing all 14 steps of the trace


ssl/statem/extensions.c:1207:13: Call
1205.   
1206.       if (!WPACKET_put_bytes_u16(pkt, TLSEXT_TYPE_certificate_authorities)
1207.           || !WPACKET_start_sub_packet_u16(pkt)) {
                    ^
1208.           SSLfatal(s, SSL_AD_INTERNAL_ERROR,
1209.                    SSL_F_TLS_CONSTRUCT_CERTIFICATE_AUTHORITIES,

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

ssl/statem/extensions.c:1214:10: Call
1212.       }
1213.   
1214.       if (!construct_ca_names(s, ca_sk, pkt)) {
                 ^
1215.           /* SSLfatal() already called */
1216.           return EXT_RETURN_FAIL;

ssl/statem/statem_lib.c:2306:1: Parameter `pkt->written`
  2304.   }
  2305.   
  2306. > int construct_ca_names(SSL *s, const STACK_OF(X509_NAME) *ca_sk, WPACKET *pkt)
  2307.   {
  2308.       /* Start sub-packet for client CA list */

ssl/statem/statem_lib.c:2309:10: Call
  2307.   {
  2308.       /* Start sub-packet for client CA list */
  2309.       if (!WPACKET_start_sub_packet_u16(pkt)) {
                   ^
  2310.           SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_CONSTRUCT_CA_NAMES,
  2311.                    ERR_R_INTERNAL_ERROR);

ssl/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;

ssl/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 */

ssl/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))

ssl/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.   

ssl/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 */

ssl/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 */

ssl/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 */

ssl/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 */

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