ssl/statem/statem_clnt.c:799: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `WPACKET_close`.
Showing all 11 steps of the trace


ssl/statem/statem_clnt.c:797:17: Call
795.           i = s->session->session_id_length;
796.       if (i > (int)sizeof(s->session->session_id)
797.               || !WPACKET_start_sub_packet_u8(&pkt)
                       ^
798.               || (i != 0 && !WPACKET_memcpy(&pkt, s->session->session_id, i))
799.               || !WPACKET_close(&pkt)) {

ssl/packet.c:190:1: Parameter `lenbytes`
  188.   }
  189.   
  190. > int WPACKET_start_sub_packet_len(WPACKET *pkt, size_t lenbytes)
  191.   {
  192.       WPACKET_SUB *sub;

ssl/packet.c:207:5: Assignment
  205.       pkt->subs = sub;
  206.       sub->pwritten = pkt->written + lenbytes;
  207.       sub->lenbytes = lenbytes;
             ^
  208.   
  209.       if (lenbytes == 0) {

ssl/statem/statem_clnt.c:799:17: Call
797.               || !WPACKET_start_sub_packet_u8(&pkt)
798.               || (i != 0 && !WPACKET_memcpy(&pkt, s->session->session_id, i))
799.               || !WPACKET_close(&pkt)) {
                       ^
800.           SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_HELLO, ERR_R_INTERNAL_ERROR);
801.           goto err;

ssl/packet.c:158:1: Parameter `pkt->curr`
  156.   }
  157.   
  158. > int WPACKET_close(WPACKET *pkt)
  159.   {
  160.       /*

ssl/packet.c:167:12: Call
  165.           return 0;
  166.   
  167.       return wpacket_intern_close(pkt);
                    ^
  168.   }
  169.   

ssl/packet.c:124:1: <LHS trace>
122.    * close a sub-packet and write out its length if necessary.
123.    */
124. > static int wpacket_intern_close(WPACKET *pkt)
125.   {
126.       WPACKET_SUB *sub = pkt->subs;

ssl/packet.c:124:1: Parameter `pkt->curr`
    122.    * close a sub-packet and write out its length if necessary.
    123.    */
    124. > static int wpacket_intern_close(WPACKET *pkt)
    125.   {
    126.       WPACKET_SUB *sub = pkt->subs;

ssl/packet.c:124:1: <RHS trace>
122.    * close a sub-packet and write out its length if necessary.
123.    */
124. > static int wpacket_intern_close(WPACKET *pkt)
125.   {
126.       WPACKET_SUB *sub = pkt->subs;

ssl/packet.c:124:1: Parameter `pkt->subs->lenbytes`
    122.    * close a sub-packet and write out its length if necessary.
    123.    */
    124. > static int wpacket_intern_close(WPACKET *pkt)
    125.   {
    126.       WPACKET_SUB *sub = pkt->subs;

ssl/packet.c:136:13: Binary operation: ([0, +oo] - 1):unsigned64 by call to `WPACKET_close` 
    134.               && sub->flags & WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH) {
    135.           /* Deallocate any bytes allocated for the length of the WPACKET */
    136.           if ((pkt->curr - sub->lenbytes) == sub->packet_len) {
                       ^
    137.               pkt->written -= sub->lenbytes;
    138.               pkt->curr -= sub->lenbytes;
