test/packettest.c:145: error: INTEGER_OVERFLOW_L2
  ([3, +oo] - 249):unsigned64 by call to `PACKET_forward`.
Showing all 14 steps of the trace


test/packettest.c:142:17: Call
140.       PACKET pkt;
141.   
142.       if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
                       ^
143.               || !PACKET_get_net_3(&pkt, &i)
144.               ||  i != 0x020406UL

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:143:17: Call
141.   
142.       if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)
143.               || !PACKET_get_net_3(&pkt, &i)
                       ^
144.               ||  i != 0x020406UL
145.               || !PACKET_forward(&pkt, BUF_LEN - 6)

ssl/packet_locl.h:222:8: Parameter `pkt->remaining`
  220.   /* Equivalent of n2l3 */
  221.   /* Get 3 bytes in network order from |pkt| and store the value in |*data| */
  222.   __owur static ossl_inline int PACKET_get_net_3(PACKET *pkt,
                ^
  223.                                                  unsigned long *data)
  224.   {

ssl/packet_locl.h:225:10: Call
  223.                                                  unsigned long *data)
  224.   {
  225.       if (!PACKET_peek_net_3(pkt, data))
                  ^
  226.           return 0;
  227.   

ssl/packet_locl.h:207:8: Parameter `pkt->remaining`
    205.    * |*data|
    206.    */
    207.   __owur static ossl_inline int PACKET_peek_net_3(const PACKET *pkt,
                  ^
    208.                                                   unsigned long *data)
    209.   {

test/packettest.c:145:17: Call
143.               || !PACKET_get_net_3(&pkt, &i)
144.               ||  i != 0x020406UL
145.               || !PACKET_forward(&pkt, BUF_LEN - 6)
                       ^
146.               || !PACKET_get_net_3(&pkt, &i)
147.               ||  i != 0xfafcfeUL

ssl/packet_locl.h:456:8: Parameter `len`
  454.   
  455.   /* Move the current reading position forward |len| bytes */
  456.   __owur static ossl_inline int PACKET_forward(PACKET *pkt, size_t len)
                ^
  457.   {
  458.       if (PACKET_remaining(pkt) < len)

ssl/packet_locl.h:461:5: Call
  459.           return 0;
  460.   
  461.       packet_forward(pkt, len);
             ^
  462.   
  463.       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: ([3, +oo] - 249):unsigned64 by call to `PACKET_forward` 
    82.   {
    83.       pkt->curr += len;
    84.       pkt->remaining -= len;
              ^
    85.   }
    86.   

static ossl_inline void packet_forward(PACKET *pkt, size_t len)
{
    pkt->curr += len;
    pkt->remaining -= len;
}
['static int test_PACKET_get_net_3(unsigned char buf[BUF_LEN])\n{\n    unsigned long i;\n    PACKET pkt;\n    if (       !PACKET_buf_init(&pkt, buf, BUF_LEN)\n            || !PACKET_get_net_3(&pkt, &i)\n            ||  i != 0x020406UL\n            || !PACKET_forward(&pkt, BUF_LEN - 6)\n            || !PACKET_get_net_3(&pkt, &i)\n            ||  i != 0xfafcfeUL\n            ||  PACKET_get_net_3(&pkt, &i)) {\n        fprintf(stderr, "test_PACKET_get_net_3() failed\\n");\n        return 0;\n    }\n    return 1;\n}', 'static ossl_inline void packet_forward(PACKET *pkt, size_t len)\n{\n    pkt->curr += len;\n    pkt->remaining -= len;\n}']