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


test/wpackettest.c:190:17: Call
188.      /* Single sub-packet with length prefix */
189.       if (!TEST_true(WPACKET_init(&pkt, buf))
190.               || !TEST_true(WPACKET_start_sub_packet_u8(&pkt))
                       ^
191.               || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff))
192.               || !TEST_true(WPACKET_close(&pkt))

ssl/packet.c:275:1: Parameter `lenbytes`
  273.   }
  274.   
  275. > int WPACKET_start_sub_packet_len__(WPACKET *pkt, size_t lenbytes)
  276.   {
  277.       WPACKET_SUB *sub;

ssl/packet.c:292:5: Assignment
  290.       pkt->subs = sub;
  291.       sub->pwritten = pkt->written + lenbytes;
  292.       sub->lenbytes = lenbytes;
             ^
  293.   
  294.       if (lenbytes == 0) {

test/wpackettest.c:192:17: Call
190.               || !TEST_true(WPACKET_start_sub_packet_u8(&pkt))
191.               || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff))
192.               || !TEST_true(WPACKET_close(&pkt))
                       ^
193.               || !TEST_true(WPACKET_finish(&pkt))
194.               || !TEST_true(WPACKET_get_total_written(&pkt, &written))

ssl/packet.c:243:1: Parameter `pkt->curr`
  241.   }
  242.   
  243. > int WPACKET_close(WPACKET *pkt)
  244.   {
  245.       /*

ssl/packet.c:252:12: Call
  250.           return 0;
  251.   
  252.       return wpacket_intern_close(pkt, pkt->subs, 1);
                    ^
  253.   }
  254.   

ssl/packet.c:188:1: <LHS trace>
186.    * (i.e. it fills in all the lengths), but doesn't actually close anything.
187.    */
188. > static int wpacket_intern_close(WPACKET *pkt, WPACKET_SUB *sub, int doclose)
189.   {
190.       size_t packlen = pkt->written - sub->pwritten;

ssl/packet.c:188:1: Parameter `pkt->curr`
    186.    * (i.e. it fills in all the lengths), but doesn't actually close anything.
    187.    */
    188. > static int wpacket_intern_close(WPACKET *pkt, WPACKET_SUB *sub, int doclose)
    189.   {
    190.       size_t packlen = pkt->written - sub->pwritten;

ssl/packet.c:188:1: <RHS trace>
186.    * (i.e. it fills in all the lengths), but doesn't actually close anything.
187.    */
188. > static int wpacket_intern_close(WPACKET *pkt, WPACKET_SUB *sub, int doclose)
189.   {
190.       size_t packlen = pkt->written - sub->pwritten;

ssl/packet.c:188:1: Parameter `sub->lenbytes`
    186.    * (i.e. it fills in all the lengths), but doesn't actually close anything.
    187.    */
    188. > static int wpacket_intern_close(WPACKET *pkt, WPACKET_SUB *sub, int doclose)
    189.   {
    190.       size_t packlen = pkt->written - sub->pwritten;

ssl/packet.c:203:13: Binary operation: ([0, +oo] - [0, 1]):unsigned64 by call to `WPACKET_close` 
    201.   
    202.           /* Deallocate any bytes allocated for the length of the WPACKET */
    203.           if ((pkt->curr - sub->lenbytes) == sub->packet_len) {
                       ^
    204.               pkt->written -= sub->lenbytes;
    205.               pkt->curr -= sub->lenbytes;
