test/packettest.c:140: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 4):unsigned64 by call to `PACKET_get_sub_packet`.
Showing all 10 steps of the trace


test/packettest.c:139:10: Call
137.       unsigned long i;
138.   
139.       if (!TEST_true(PACKET_buf_init(&pkt, smbuf, BUF_LEN))
                ^
140.               || !TEST_true(PACKET_get_sub_packet(&pkt, &subpkt, 4))
141.               || !TEST_true(PACKET_get_net_4(&subpkt, &i))

ssl/packet_locl.h:72:8: Parameter `pkt->remaining`
  70.    * is being used.
  71.    */
  72.   __owur static ossl_inline int PACKET_buf_init(PACKET *pkt,
               ^
  73.                                                 const unsigned char *buf,
  74.                                                 size_t len)

test/packettest.c:140:17: Call
138.   
139.       if (!TEST_true(PACKET_buf_init(&pkt, smbuf, BUF_LEN))
140.               || !TEST_true(PACKET_get_sub_packet(&pkt, &subpkt, 4))
                       ^
141.               || !TEST_true(PACKET_get_net_4(&subpkt, &i))
142.               || !TEST_ulong_eq(i, 0x02040608UL)

ssl/packet_locl.h:124:8: Parameter `len`
  122.    * original |pkt|, so data wrapped by |pkt| must outlive the |subpkt|.
  123.    */
  124.   __owur static ossl_inline int PACKET_get_sub_packet(PACKET *pkt,
                ^
  125.                                                       PACKET *subpkt, size_t len)
  126.   {

ssl/packet_locl.h:130:5: Call
  128.           return 0;
  129.   
  130.       packet_forward(pkt, len);
             ^
  131.   
  132.       return 1;

ssl/packet_locl.h:33:1: <LHS trace>
31.   
32.   /* Internal unchecked shorthand; don't use outside this file. */
33. > static ossl_inline void packet_forward(PACKET *pkt, size_t len)
34.   {
35.       pkt->curr += len;

ssl/packet_locl.h:33:1: Parameter `pkt->remaining`
    31.   
    32.   /* Internal unchecked shorthand; don't use outside this file. */
    33. > static ossl_inline void packet_forward(PACKET *pkt, size_t len)
    34.   {
    35.       pkt->curr += len;

ssl/packet_locl.h:33:1: <RHS trace>
31.   
32.   /* Internal unchecked shorthand; don't use outside this file. */
33. > static ossl_inline void packet_forward(PACKET *pkt, size_t len)
34.   {
35.       pkt->curr += len;

ssl/packet_locl.h:33:1: Parameter `len`
    31.   
    32.   /* Internal unchecked shorthand; don't use outside this file. */
    33. > static ossl_inline void packet_forward(PACKET *pkt, size_t len)
    34.   {
    35.       pkt->curr += len;

ssl/packet_locl.h:36:5: Binary operation: ([0, +oo] - 4):unsigned64 by call to `PACKET_get_sub_packet` 
    34.   {
    35.       pkt->curr += len;
    36.       pkt->remaining -= len;
              ^
    37.   }
    38.   
