ssl/statem/statem.c:841: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - [0, 2]):unsigned64 by call to `WPACKET_finish`.
Showing all 10 steps of the trace


ssl/statem/statem.c:841:25: Call
839.               }
840.               if (!ssl_close_construct_packet(s, &pkt, mt)
841.                       || !WPACKET_finish(&pkt)) {
                               ^
842.                   WPACKET_cleanup(&pkt);
843.                   SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_WRITE_STATE_MACHINE,

ssl/packet.c:250:1: Parameter `pkt->subs->lenbytes`
  248.   }
  249.   
  250. > int WPACKET_finish(WPACKET *pkt)
  251.   {
  252.       int ret;

ssl/statem/statem.c:841:25: Call
839.               }
840.               if (!ssl_close_construct_packet(s, &pkt, mt)
841.                       || !WPACKET_finish(&pkt)) {
                               ^
842.                   WPACKET_cleanup(&pkt);
843.                   SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_WRITE_STATE_MACHINE,

ssl/packet.c:250:1: Parameter `pkt->curr`
  248.   }
  249.   
  250. > int WPACKET_finish(WPACKET *pkt)
  251.   {
  252.       int ret;

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

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

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

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

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

ssl/packet.c:199:13: Binary operation: ([0, +oo] - [0, 2]):unsigned64 by call to `WPACKET_finish` 
    197.   
    198.           /* Deallocate any bytes allocated for the length of the WPACKET */
    199.           if ((pkt->curr - sub->lenbytes) == sub->packet_len) {
                       ^
    200.               pkt->written -= sub->lenbytes;
    201.               pkt->curr -= sub->lenbytes;
