unsigned char *next_protos_parse(size_t *outlen, const char *in)
{
    size_t len;
    unsigned char *out;
    size_t i, start = 0;
    len = strlen(in);
    if (len >= 65535)
        return NULL;
    out = app_malloc(strlen(in) + 1, "NPN buffer");
    for (i = 0; i <= len; ++i) {
        if (i == len || in[i] == ',') {
            if (i - start > 255) {
                OPENSSL_free(out);
                return NULL;
            }
            out[start] = (unsigned char)(i - start);
            start = i + 1;
        } else {
            out[i + 1] = in[i];
        }
    }
    *outlen = len + 1;
    return out;
}
['unsigned char *next_protos_parse(size_t *outlen, const char *in)\n{\n    size_t len;\n    unsigned char *out;\n    size_t i, start = 0;\n    len = strlen(in);\n    if (len >= 65535)\n        return NULL;\n    out = app_malloc(strlen(in) + 1, "NPN buffer");\n    for (i = 0; i <= len; ++i) {\n        if (i == len || in[i] == \',\') {\n            if (i - start > 255) {\n                OPENSSL_free(out);\n                return NULL;\n            }\n            out[start] = (unsigned char)(i - start);\n            start = i + 1;\n        } else {\n            out[i + 1] = in[i];\n        }\n    }\n    *outlen = len + 1;\n    return out;\n}', 'void* app_malloc(int sz, const char *what)\n{\n    void *vp = OPENSSL_malloc(sz);\n    return vp;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    INCREMENT(malloc_count);\n    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)\n        return malloc_impl(num, file, line);\n    if (num == 0)\n        return NULL;\n    FAILTEST();\n    if (allow_customize) {\n        allow_customize = 0;\n    }\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    (void)(file); (void)(line);\n    ret = malloc(num);\n#endif\n    return ret;\n}']