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


test/wpackettest.c:65:10: Call
63.   
64.       /* And a longer length prefix */
65.       if (!TEST_true(WPACKET_init_len(&pkt, buf, 4))
               ^
66.               || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff))
67.               || !TEST_true(WPACKET_finish(&pkt))

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

test/wpackettest.c:66:17: Call
64.       /* And a longer length prefix */
65.       if (!TEST_true(WPACKET_init_len(&pkt, buf, 4))
66.               || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff))
                      ^
67.               || !TEST_true(WPACKET_finish(&pkt))
68.               || !TEST_true(WPACKET_get_total_written(&pkt, &written))

crypto/packet.c:309:1: Parameter `pkt->written`
  307.   }
  308.   
  309. > int WPACKET_put_bytes__(WPACKET *pkt, unsigned int val, size_t size)
  310.   {
  311.       unsigned char *data;

test/wpackettest.c:67:17: Call
65.       if (!TEST_true(WPACKET_init_len(&pkt, buf, 4))
66.               || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff))
67.               || !TEST_true(WPACKET_finish(&pkt))
                      ^
68.               || !TEST_true(WPACKET_get_total_written(&pkt, &written))
69.               || !TEST_mem_eq(buf->data, written, simple3, sizeof(simple3)))

crypto/packet.c:252:1: Parameter `pkt->written`
  250.   }
  251.   
  252. > int WPACKET_finish(WPACKET *pkt)
  253.   {
  254.       int ret;

crypto/packet.c:263:11: Call
  261.           return 0;
  262.   
  263.       ret = wpacket_intern_close(pkt, pkt->subs, 1);
                   ^
  264.       if (ret) {
  265.           OPENSSL_free(pkt->subs);

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

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

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

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

crypto/packet.c:188:5: Binary operation: ([0, +oo] - 4):unsigned64 by call to `WPACKET_finish` 
    186.   static int wpacket_intern_close(WPACKET *pkt, WPACKET_SUB *sub, int doclose)
    187.   {
    188.       size_t packlen = pkt->written - sub->pwritten;
               ^
    189.   
    190.       if (packlen == 0
