ssl/t1_lib.c:1854: error: INTEGER_OVERFLOW_L2
  ([2, +oo] - 18):unsigned64 by call to `PACKET_get_bytes`.
Showing all 9 steps of the trace


ssl/t1_lib.c:1852:9: Assignment
1850.               return;
1851.       } else {
1852.           const size_t len = sizeof(kSafariExtensionsBlock);
                ^
1853.   
1854.           if (!PACKET_get_bytes(&tmppkt, &eblock1, len)

ssl/t1_lib.c:1854:14: Call
1852.           const size_t len = sizeof(kSafariExtensionsBlock);
1853.   
1854.           if (!PACKET_get_bytes(&tmppkt, &eblock1, len)
                     ^
1855.                   || PACKET_remaining(&tmppkt))
1856.               return;

ssl/packet_locl.h:344:8: Parameter `len`
  342.    * freed
  343.    */
  344.   __owur static ossl_inline int PACKET_get_bytes(PACKET *pkt,
                ^
  345.                                                  unsigned char **data,
  346.                                                  size_t len)

ssl/packet_locl.h:351:5: Call
  349.           return 0;
  350.   
  351.       packet_forward(pkt, len);
             ^
  352.   
  353.       return 1;

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

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

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

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

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

static ossl_inline void packet_forward(PACKET *pkt, size_t len)
{
    pkt->curr += len;
    pkt->remaining -= len;
}
['static void ssl_check_for_safari(SSL *s, const PACKET *pkt)\n{\n    unsigned int type, size;\n    unsigned char *eblock1, *eblock2;\n    PACKET tmppkt;\n    static const unsigned char kSafariExtensionsBlock[] = {\n        0x00, 0x0a,\n        0x00, 0x08,\n        0x00, 0x06,\n        0x00, 0x17,\n        0x00, 0x18,\n        0x00, 0x19,\n        0x00, 0x0b,\n        0x00, 0x02,\n        0x01,\n        0x00,\n    };\n    static const unsigned char kSafariTLS12ExtensionsBlock[] = {\n        0x00, 0x0d,\n        0x00, 0x0c,\n        0x00, 0x0a,\n        0x05, 0x01,\n        0x04, 0x01,\n        0x02, 0x01,\n        0x04, 0x03,\n        0x02, 0x03,\n    };\n    tmppkt = *pkt;\n    if (!PACKET_forward(&tmppkt, 2)\n            || !PACKET_get_net_2(&tmppkt, &type)\n            || !PACKET_get_net_2(&tmppkt, &size)\n            || !PACKET_forward(&tmppkt, size))\n        return;\n    if (type != TLSEXT_TYPE_server_name)\n        return;\n    if (TLS1_get_client_version(s) >= TLS1_2_VERSION) {\n        const size_t len1 = sizeof(kSafariExtensionsBlock);\n        const size_t len2 = sizeof(kSafariTLS12ExtensionsBlock);\n        if (!PACKET_get_bytes(&tmppkt, &eblock1, len1)\n                || !PACKET_get_bytes(&tmppkt, &eblock2, len2)\n                || PACKET_remaining(&tmppkt))\n            return;\n        if (memcmp(eblock1, kSafariExtensionsBlock, len1) != 0)\n            return;\n        if (memcmp(eblock2, kSafariTLS12ExtensionsBlock, len2) != 0)\n            return;\n    } else {\n        const size_t len = sizeof(kSafariExtensionsBlock);\n        if (!PACKET_get_bytes(&tmppkt, &eblock1, len)\n                || PACKET_remaining(&tmppkt))\n            return;\n        if (memcmp(eblock1, kSafariExtensionsBlock, len) != 0)\n            return;\n    }\n    s->s3->is_probably_safari = 1;\n}', 'static ossl_inline void packet_forward(PACKET *pkt, size_t len)\n{\n    pkt->curr += len;\n    pkt->remaining -= len;\n}']