test/packettest.c:300: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `PACKET_get_bytes`.
Showing all 12 steps of the trace


test/packettest.c:298:17: Call
296.       PACKET pkt;
297.   
298.       if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
                       ^
299.               || !PACKET_forward(&pkt, 1)
300.               || !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:299:17: Call
297.   
298.       if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
299.               || !PACKET_forward(&pkt, 1)
                       ^
300.               || !PACKET_get_bytes(&pkt, &byte, 1)
301.               ||  byte[0] != 4

ssl/packet_locl.h:401:8: Parameter `len`
  399.   
  400.   /* Move the current reading position forward |len| bytes */
  401.   __owur static inline int PACKET_forward(PACKET *pkt, size_t len)
                ^
  402.   {
  403.       if (PACKET_remaining(pkt) < len)

test/packettest.c:300:17: Call
298.       if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
299.               || !PACKET_forward(&pkt, 1)
300.               || !PACKET_get_bytes(&pkt, &byte, 1)
                       ^
301.               ||  byte[0] != 4
302.               || !PACKET_forward(&pkt, BUF_LEN - 3)

ssl/packet_locl.h:313:8: Parameter `len`
  311.    * freed
  312.    */
  313.   __owur static inline int PACKET_get_bytes(PACKET *pkt, unsigned char **data,
                ^
  314.                                             size_t len)
  315.   {

ssl/packet_locl.h:319:5: Call
  317.           return 0;
  318.   
  319.       packet_forward(pkt, len);
             ^
  320.   
  321.       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] - 1):unsigned64 by call to `PACKET_get_bytes` 
    80.   {
    81.       pkt->curr += len;
    82.       pkt->remaining -= len;
              ^
    83.   }
    84.   
