test/packettest.c:181: 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:180:17: Call
178.       unsigned long i;
179.   
180.       if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
                       ^
181.               || !PACKET_get_sub_packet(&pkt, &subpkt, 4)
182.               || !PACKET_get_net_4(&subpkt, &i)

ssl/packet_locl.h:109:8: Parameter `pkt->remaining`
  107.    * is being used.
  108.    */
  109.   __owur static ossl_inline int PACKET_buf_init(PACKET *pkt,
                ^
  110.                                                 const unsigned char *buf,
  111.                                                 size_t len)

test/packettest.c:181:17: Call
179.   
180.       if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
181.               || !PACKET_get_sub_packet(&pkt, &subpkt, 4)
                       ^
182.               || !PACKET_get_net_4(&subpkt, &i)
183.               ||  i != 0x02040608UL

ssl/packet_locl.h:162:8: Parameter `len`
  160.    * original |pkt|, so data wrapped by |pkt| must outlive the |subpkt|.
  161.    */
  162.   __owur static ossl_inline int PACKET_get_sub_packet(PACKET *pkt,
                ^
  163.                                                       PACKET *subpkt,
  164.                                                       size_t len)

ssl/packet_locl.h:169:5: Call
  167.           return 0;
  168.   
  169.       packet_forward(pkt, len);
             ^
  170.   
  171.       return 1;

ssl/packet_locl.h:81:1: <LHS trace>
79.   
80.   /* Internal unchecked shorthand; don't use outside this file. */
81. > static ossl_inline void packet_forward(PACKET *pkt, size_t len)
82.   {
83.       pkt->curr += len;

ssl/packet_locl.h:81:1: Parameter `pkt->remaining`
    79.   
    80.   /* Internal unchecked shorthand; don't use outside this file. */
    81. > static ossl_inline void packet_forward(PACKET *pkt, size_t len)
    82.   {
    83.       pkt->curr += len;

ssl/packet_locl.h:81:1: <RHS trace>
79.   
80.   /* Internal unchecked shorthand; don't use outside this file. */
81. > static ossl_inline void packet_forward(PACKET *pkt, size_t len)
82.   {
83.       pkt->curr += len;

ssl/packet_locl.h:81:1: Parameter `len`
    79.   
    80.   /* Internal unchecked shorthand; don't use outside this file. */
    81. > static ossl_inline void packet_forward(PACKET *pkt, size_t len)
    82.   {
    83.       pkt->curr += len;

ssl/packet_locl.h:84:5: Binary operation: ([0, +oo] - 4):unsigned64 by call to `PACKET_get_sub_packet` 
    82.   {
    83.       pkt->curr += len;
    84.       pkt->remaining -= len;
              ^
    85.   }
    86.   
