static ossl_inline void packet_forward(PACKET *pkt, size_t len)
{
    pkt->curr += len;
    pkt->remaining -= len;
}
['static int get_MFL_from_client_hello(BIO *bio, int *mfl_codemfl_code)\n{\n    long len;\n    unsigned char *data;\n    PACKET pkt, pkt2, pkt3;\n    unsigned int MFL_code = 0, type = 0;\n    if (!TEST_uint_gt( len = BIO_get_mem_data( bio, (char **) &data ), 0 ) )\n        goto end;\n    memset(&pkt, 0, sizeof(pkt));\n    memset(&pkt2, 0, sizeof(pkt2));\n    memset(&pkt3, 0, sizeof(pkt3));\n    if (!TEST_true( PACKET_buf_init( &pkt, data, len ) )\n            || !PACKET_forward(&pkt, SSL3_RT_HEADER_LENGTH)\n            || !TEST_true(PACKET_forward(&pkt, SSL3_HM_HEADER_LENGTH))\n            || !TEST_true(PACKET_forward(&pkt, CLIENT_VERSION_LEN\n                                               + SSL3_RANDOM_SIZE))\n            || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2))\n            || !TEST_true(PACKET_get_length_prefixed_2(&pkt, &pkt2))\n            || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2))\n            || !TEST_true(PACKET_as_length_prefixed_2(&pkt, &pkt2)))\n        goto end;\n    while (PACKET_remaining(&pkt2)) {\n        if (!TEST_true(PACKET_get_net_2(&pkt2, &type))\n                || !TEST_true(PACKET_get_length_prefixed_2(&pkt2, &pkt3)))\n            goto end;\n        if (type == TLSEXT_TYPE_max_fragment_length) {\n            if (!TEST_uint_ne(PACKET_remaining(&pkt3), 0)\n                    || !TEST_true(PACKET_get_1(&pkt3, &MFL_code)))\n                goto end;\n            *mfl_codemfl_code = MFL_code;\n            return 1;\n        }\n    }\n end:\n    return 0;\n}', 'static ossl_inline int PACKET_buf_init(PACKET *pkt,\n                                              const unsigned char *buf,\n                                              size_t len)\n{\n    if (len > (size_t)(SIZE_MAX / 2))\n        return 0;\n    pkt->curr = buf;\n    pkt->remaining = len;\n    return 1;\n}', 'static ossl_inline int PACKET_forward(PACKET *pkt, size_t len)\n{\n    if (PACKET_remaining(pkt) < 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}']