test/packettest.c:321: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 252):unsigned64 by call to `PACKET_forward`.
Showing all 16 steps of the trace


test/packettest.c:317:17: Call
315.       PACKET pkt;
316.   
317.       if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
                       ^
318.               || !PACKET_forward(&pkt, 1)
319.               || !PACKET_get_bytes(&pkt, &byte, 1)

ssl/packet_locl.h:109:1: Parameter `pkt->remaining`
  107.    * is being used.
  108.    */
  109. > static inline int PACKET_buf_init(PACKET *pkt, unsigned char *buf, size_t len)
  110.   {
  111.       /* Sanity check for negative values. */

test/packettest.c:318:17: Call
316.   
317.       if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
318.               || !PACKET_forward(&pkt, 1)
                       ^
319.               || !PACKET_get_bytes(&pkt, &byte, 1)
320.               ||  byte[0] != 4

ssl/packet_locl.h:426:8: Parameter `len`
  424.   
  425.   /* Move the current reading position forward |len| bytes */
  426.   __owur static inline int PACKET_forward(PACKET *pkt, size_t len)
                ^
  427.   {
  428.       if (PACKET_remaining(pkt) < len)

test/packettest.c:319:17: Call
317.       if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
318.               || !PACKET_forward(&pkt, 1)
319.               || !PACKET_get_bytes(&pkt, &byte, 1)
                       ^
320.               ||  byte[0] != 4
321.               || !PACKET_forward(&pkt, BUF_LEN - 3)

ssl/packet_locl.h:320:8: Parameter `pkt->remaining`
  318.    * freed
  319.    */
  320.   __owur static inline int PACKET_get_bytes(PACKET *pkt, unsigned char **data,
                ^
  321.                                             size_t len)
  322.   {

ssl/packet_locl.h:323:10: Call
  321.                                             size_t len)
  322.   {
  323.       if (!PACKET_peek_bytes(pkt, data, len))
                  ^
  324.           return 0;
  325.   

ssl/packet_locl.h:303:8: Parameter `len`
    301.    * underlying buffer gets freed
    302.    */
    303.   __owur static inline int PACKET_peek_bytes(const PACKET *pkt, unsigned char **data,
                  ^
    304.                                              size_t len)
    305.   {

test/packettest.c:321:17: Call
319.               || !PACKET_get_bytes(&pkt, &byte, 1)
320.               ||  byte[0] != 4
321.               || !PACKET_forward(&pkt, BUF_LEN - 3)
                       ^
322.               || !PACKET_get_bytes(&pkt, &byte, 1)
323.               ||  byte[0] != 0xfe) {

ssl/packet_locl.h:426:8: Parameter `len`
  424.   
  425.   /* Move the current reading position forward |len| bytes */
  426.   __owur static inline int PACKET_forward(PACKET *pkt, size_t len)
                ^
  427.   {
  428.       if (PACKET_remaining(pkt) < len)

ssl/packet_locl.h:431:5: Call
  429.           return 0;
  430.   
  431.       packet_forward(pkt, len);
             ^
  432.   
  433.       return 1;

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

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

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

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

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