int ssl_parse_clienthello_use_srtp_ext(SSL *s, unsigned char *d, int len,int *al)
	{
	SRTP_PROTECTION_PROFILE *cprof,*sprof;
	STACK_OF(SRTP_PROTECTION_PROFILE) *clnt=0,*srvr;
	int i,j;
	int id;
	int ret;
	if(len%2)
		{
		SSLerr(SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT,SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST);
		*al=SSL_AD_DECODE_ERROR;
		return 1;
		}
	clnt=sk_SRTP_PROTECTION_PROFILE_new_null();
	while(len)
		{
		n2s(d,id);
		len-=2;
		if(!find_profile_by_num(id,&cprof))
			{
			sk_SRTP_PROTECTION_PROFILE_push(clnt,cprof);
			}
		else
			{
			;
			}
		}
	srvr=SSL_get_srtp_profiles(s);
	for(i=0;i<sk_SRTP_PROTECTION_PROFILE_num(srvr);i++)
		{
		sprof=sk_SRTP_PROTECTION_PROFILE_value(srvr,i);
		for(j=0;j<sk_SRTP_PROTECTION_PROFILE_num(clnt);j++)
			{
			cprof=sk_SRTP_PROTECTION_PROFILE_value(clnt,j);
			if(cprof->id==sprof->id)
				{
				s->srtp_profile=sprof;
				*al=0;
				ret=0;
				goto done;
				}
			}
		}
	ret=0;
done:
	if(clnt) sk_SRTP_PROTECTION_PROFILE_free(clnt);
	return ret;
	}
['int ssl_parse_clienthello_use_srtp_ext(SSL *s, unsigned char *d, int len,int *al)\n\t{\n\tSRTP_PROTECTION_PROFILE *cprof,*sprof;\n\tSTACK_OF(SRTP_PROTECTION_PROFILE) *clnt=0,*srvr;\n\tint i,j;\n\tint id;\n\tint ret;\n\tif(len%2)\n\t\t{\n\t\tSSLerr(SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT,SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST);\n\t\t*al=SSL_AD_DECODE_ERROR;\n\t\treturn 1;\n\t\t}\n\tclnt=sk_SRTP_PROTECTION_PROFILE_new_null();\n\twhile(len)\n\t\t{\n\t\tn2s(d,id);\n\t\tlen-=2;\n\t\tif(!find_profile_by_num(id,&cprof))\n\t\t\t{\n\t\t\tsk_SRTP_PROTECTION_PROFILE_push(clnt,cprof);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t;\n\t\t\t}\n\t\t}\n\tsrvr=SSL_get_srtp_profiles(s);\n\tfor(i=0;i<sk_SRTP_PROTECTION_PROFILE_num(srvr);i++)\n\t\t{\n\t\tsprof=sk_SRTP_PROTECTION_PROFILE_value(srvr,i);\n\t\tfor(j=0;j<sk_SRTP_PROTECTION_PROFILE_num(clnt);j++)\n\t\t\t{\n\t\t\tcprof=sk_SRTP_PROTECTION_PROFILE_value(clnt,j);\n\t\t\tif(cprof->id==sprof->id)\n\t\t\t\t{\n\t\t\t\ts->srtp_profile=sprof;\n\t\t\t\t*al=0;\n\t\t\t\tret=0;\n\t\t\t\tgoto done;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tret=0;\ndone:\n\tif(clnt) sk_SRTP_PROTECTION_PROFILE_free(clnt);\n\treturn ret;\n\t}', '_STACK *sk_new_null(void)\n\t{\n\treturn sk_new((int (*)(const void *, const void *))0);\n\t}', '_STACK *sk_new(int (*c)(const void *, const void *))\n\t{\n\t_STACK *ret;\n\tint i;\n\tif ((ret=OPENSSL_malloc(sizeof(_STACK))) == NULL)\n\t\tgoto err;\n\tif ((ret->data=OPENSSL_malloc(sizeof(char *)*MIN_NODES)) == NULL)\n\t\tgoto err;\n\tfor (i=0; i<MIN_NODES; i++)\n\t\tret->data[i]=NULL;\n\tret->comp=c;\n\tret->num_alloc=MIN_NODES;\n\tret->num=0;\n\tret->sorted=0;\n\treturn(ret);\nerr:\n\tif(ret)\n\t\tOPENSSL_free(ret);\n\treturn(NULL);\n\t}', 'void *CRYPTO_malloc(int num, const char *file, int line)\n\t{\n\tvoid *ret = NULL;\n\tif (num <= 0) return NULL;\n\tallow_customize = 0;\n\tif (malloc_debug_func != NULL)\n\t\t{\n\t\tallow_customize_debug = 0;\n\t\tmalloc_debug_func(NULL, num, file, line, 0);\n\t\t}\n\tret = malloc_ex_func(num,file,line);\n#ifdef LEVITTE_DEBUG_MEM\n\tfprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\\n", ret, num);\n#endif\n\tif (malloc_debug_func != NULL)\n\t\tmalloc_debug_func(ret, num, file, line, 1);\n#ifndef OPENSSL_CPUID_OBJ\n        if(ret && (num > 2048))\n\t{\textern unsigned char cleanse_ctr;\n                ((unsigned char *)ret)[0] = cleanse_ctr;\n\t}\n#endif\n\treturn ret;\n\t}', 'int sk_push(_STACK *st, void *data)\n\t{\n\treturn(sk_insert(st,data,st->num));\n\t}']