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


test/wpackettest.c:139:10: Call
137.           return cleanup(&pkt);
138.   
139.       if (!TEST_true(WPACKET_init_len(&pkt, buf, 1))
                ^
140.                   /*
141.                    * Should fail because we already consumed 1 byte with the

ssl/packet.c:134:1: Parameter `lenbytes`
  132.   }
  133.   
  134. > int WPACKET_init_len(WPACKET *pkt, BUF_MEM *buf, size_t lenbytes)
  135.   {
  136.       /* Internal API, so should not fail */

ssl/packet.c:145:12: Call
  143.       pkt->maxsize = maxmaxsize(lenbytes);
  144.   
  145.       return wpacket_intern_init_len(pkt, lenbytes);
                    ^
  146.   }
  147.   

ssl/packet.c:90:1: Parameter `lenbytes`
    88.   }
    89.   
    90. > static int wpacket_intern_init_len(WPACKET *pkt, size_t lenbytes)
    91.   {
    92.       unsigned char *lenchars;

ssl/packet.c:104:5: Assignment
    102.           return 1;
    103.   
    104.       pkt->subs->pwritten = lenbytes;
               ^
    105.       pkt->subs->lenbytes = lenbytes;
    106.   

test/wpackettest.c:160:17: Call
158.               || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff))
159.               || !TEST_false(WPACKET_put_bytes_u8(&pkt, 0xff))
160.               || !TEST_true(WPACKET_finish(&pkt))
                       ^
161.               || !TEST_true(WPACKET_get_total_written(&pkt, &written))
162.               || !TEST_mem_eq(buf->data, written, simple2, sizeof(simple2)))

ssl/packet.c:255:1: Parameter `pkt->written`
  253.   }
  254.   
  255. > int WPACKET_finish(WPACKET *pkt)
  256.   {
  257.       int ret;

ssl/packet.c:266:11: Call
  264.           return 0;
  265.   
  266.       ret = wpacket_intern_close(pkt, pkt->subs, 1);
                   ^
  267.       if (ret) {
  268.           OPENSSL_free(pkt->subs);

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->written`
    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->pwritten`
    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:190:5: Binary operation: ([0, +oo] - 1):unsigned64 by call to `WPACKET_finish` 
    188.   static int wpacket_intern_close(WPACKET *pkt, WPACKET_SUB *sub, int doclose)
    189.   {
    190.       size_t packlen = pkt->written - sub->pwritten;
               ^
    191.   
    192.       if (packlen == 0
