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


ssl/statem/extensions_srvr.c:1565:17: Call
1563.                   TLSEXT_TYPE_application_layer_protocol_negotiation)
1564.               || !WPACKET_start_sub_packet_u16(pkt)
1565.               || !WPACKET_start_sub_packet_u16(pkt)
                        ^
1566.               || !WPACKET_sub_memcpy_u8(pkt, s->s3.alpn_selected,
1567.                                         s->s3.alpn_selected_len)

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_srvr.c:1566:17: Call
1564.               || !WPACKET_start_sub_packet_u16(pkt)
1565.               || !WPACKET_start_sub_packet_u16(pkt)
1566.               || !WPACKET_sub_memcpy_u8(pkt, s->s3.alpn_selected,
                        ^
1567.                                         s->s3.alpn_selected_len)
1568.               || !WPACKET_close(pkt)

ssl/packet.c:377:1: Parameter `pkt->written`
  375.   }
  376.   
  377. > int WPACKET_sub_memcpy__(WPACKET *pkt, const void *src, size_t len,
  378.                            size_t lenbytes)
  379.   {

ssl/packet.c:380:10: Call
  378.                            size_t lenbytes)
  379.   {
  380.       if (!WPACKET_start_sub_packet_len__(pkt, lenbytes)
                  ^
  381.               || !WPACKET_memcpy(pkt, src, len)
  382.               || !WPACKET_close(pkt))

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 + 6]):unsigned64 by call to `WPACKET_sub_memcpy__` 
        47.           return 0;
        48.   
        49.       if (pkt->staticbuf == NULL && (pkt->buf->length - pkt->written < len)) {
                                                 ^
        50.           size_t newlen;
        51.           size_t reflen;
