ssl/statem/statem_clnt.c:2218: error: INTEGER_OVERFLOW_L2
  ([0, -3+max(5, `pkt->remaining`)] - [0, -3+max(5, `pkt->remaining`)]):unsigned64 by call to `PACKET_copy_bytes`.
Showing all 10 steps of the trace


ssl/statem/statem_clnt.c:2206:10: Call
2204.           goto f_err;
2205.       }
2206.       if (!PACKET_get_net_3_len(pkt, &resplen)
                 ^
2207.           || PACKET_remaining(pkt) != resplen) {
2208.           al = SSL_AD_DECODE_ERROR;

ssl/packet_locl.h:205:8: Parameter `*data`
  203.   
  204.   /* Same as PACKET_get_net_3() but for a size_t */
  205.   __owur static ossl_inline int PACKET_get_net_3_len(PACKET *pkt, size_t *data)
                ^
  206.   {
  207.       unsigned long i;

ssl/statem/statem_clnt.c:2218:10: Call
2216.           goto f_err;
2217.       }
2218.       if (!PACKET_copy_bytes(pkt, s->tlsext_ocsp_resp, resplen)) {
                 ^
2219.           al = SSL_AD_DECODE_ERROR;
2220.           SSLerr(SSL_F_TLS_PROCESS_CERT_STATUS, SSL_R_LENGTH_MISMATCH);

ssl/packet_locl.h:379:8: Parameter `len`
  377.    * The caller is responsible for ensuring that |data| can hold |len| bytes.
  378.    */
  379.   __owur static ossl_inline int PACKET_copy_bytes(PACKET *pkt,
                ^
  380.                                                   unsigned char *data, size_t len)
  381.   {

ssl/packet_locl.h:385:5: Call
  383.           return 0;
  384.   
  385.       packet_forward(pkt, len);
             ^
  386.   
  387.       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, -3+max(5, pkt->remaining)] - [0, -3+max(5, pkt->remaining)]):unsigned64 by call to `PACKET_copy_bytes` 
    34.   {
    35.       pkt->curr += len;
    36.       pkt->remaining -= len;
              ^
    37.   }
    38.   

static ossl_inline void packet_forward(PACKET *pkt, size_t len)
{
    pkt->curr += len;
    pkt->remaining -= len;
}
['MSG_PROCESS_RETURN tls_process_cert_status(SSL *s, PACKET *pkt)\n{\n    int al;\n    size_t resplen;\n    unsigned int type;\n    if (!PACKET_get_1(pkt, &type)\n        || type != TLSEXT_STATUSTYPE_ocsp) {\n        al = SSL_AD_DECODE_ERROR;\n        SSLerr(SSL_F_TLS_PROCESS_CERT_STATUS, SSL_R_UNSUPPORTED_STATUS_TYPE);\n        goto f_err;\n    }\n    if (!PACKET_get_net_3_len(pkt, &resplen)\n        || PACKET_remaining(pkt) != resplen) {\n        al = SSL_AD_DECODE_ERROR;\n        SSLerr(SSL_F_TLS_PROCESS_CERT_STATUS, SSL_R_LENGTH_MISMATCH);\n        goto f_err;\n    }\n    s->tlsext_ocsp_resp = OPENSSL_malloc(resplen);\n    if (s->tlsext_ocsp_resp == NULL) {\n        al = SSL_AD_INTERNAL_ERROR;\n        SSLerr(SSL_F_TLS_PROCESS_CERT_STATUS, ERR_R_MALLOC_FAILURE);\n        goto f_err;\n    }\n    if (!PACKET_copy_bytes(pkt, s->tlsext_ocsp_resp, resplen)) {\n        al = SSL_AD_DECODE_ERROR;\n        SSLerr(SSL_F_TLS_PROCESS_CERT_STATUS, SSL_R_LENGTH_MISMATCH);\n        goto f_err;\n    }\n    s->tlsext_ocsp_resplen = resplen;\n    return MSG_PROCESS_CONTINUE_READING;\n f_err:\n    ssl3_send_alert(s, SSL3_AL_FATAL, al);\n    ossl_statem_set_error(s);\n    return MSG_PROCESS_ERROR;\n}', 'static ossl_inline int PACKET_get_net_3_len(PACKET *pkt, size_t *data)\n{\n    unsigned long i;\n    int ret = PACKET_get_net_3(pkt, &i);\n    if (ret)\n        *data = (size_t)i;\n    return ret;\n}', 'static ossl_inline int PACKET_copy_bytes(PACKET *pkt,\n                                                unsigned char *data, size_t len)\n{\n    if (!PACKET_peek_copy_bytes(pkt, data, len))\n        return 0;\n    packet_forward(pkt, len);\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}']