crypto/x509/x509_req.c:122: error: NULL_DEREFERENCE
  pointer `xk` last assigned on line 121 could be null and is dereferenced by call to `EVP_PKEY_cmp()` at line 122, column 10.
Showing all 67 steps of the trace


crypto/x509/x509_req.c:116:1: start of procedure X509_REQ_check_private_key()
114.   	}
115.   
116. > int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
117.   	{
118.   	EVP_PKEY *xk=NULL;

crypto/x509/x509_req.c:118:2: 
116.   int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
117.   	{
118. > 	EVP_PKEY *xk=NULL;
119.   	int ok=0;
120.   

crypto/x509/x509_req.c:119:2: 
117.   	{
118.   	EVP_PKEY *xk=NULL;
119. > 	int ok=0;
120.   
121.   	xk=X509_REQ_get_pubkey(x);

crypto/x509/x509_req.c:121:2: 
119.   	int ok=0;
120.   
121. > 	xk=X509_REQ_get_pubkey(x);
122.   	switch (EVP_PKEY_cmp(xk, k))
123.   		{

crypto/x509/x509_req.c:109:1: start of procedure X509_REQ_get_pubkey()
  107.   	}
  108.   
  109. > EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
  110.   	{
  111.   	if ((req == NULL) || (req->req_info == NULL))

crypto/x509/x509_req.c:111:7: Taking false branch
  109.   EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
  110.   	{
  111.   	if ((req == NULL) || (req->req_info == NULL))
               ^
  112.   		return(NULL);
  113.   	return(X509_PUBKEY_get(req->req_info->pubkey));

crypto/x509/x509_req.c:111:24: Taking false branch
  109.   EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
  110.   	{
  111.   	if ((req == NULL) || (req->req_info == NULL))
                                ^
  112.   		return(NULL);
  113.   	return(X509_PUBKEY_get(req->req_info->pubkey));

crypto/x509/x509_req.c:113:2: 
  111.   	if ((req == NULL) || (req->req_info == NULL))
  112.   		return(NULL);
  113. > 	return(X509_PUBKEY_get(req->req_info->pubkey));
  114.   	}
  115.   

crypto/asn1/x_pubkey.c:136:1: start of procedure X509_PUBKEY_get()
    134.   	}
    135.   
    136. > EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
    137.   	{
    138.   	EVP_PKEY *ret=NULL;

crypto/asn1/x_pubkey.c:138:2: 
    136.   EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
    137.   	{
    138. > 	EVP_PKEY *ret=NULL;
    139.   	const EVP_PKEY_ASN1_METHOD *meth;
    140.   

crypto/asn1/x_pubkey.c:141:6: Taking false branch
    139.   	const EVP_PKEY_ASN1_METHOD *meth;
    140.   
    141.   	if (key == NULL) goto error;
                ^
    142.   
    143.   	if (key->pkey != NULL)

crypto/asn1/x_pubkey.c:143:6: Taking false branch
    141.   	if (key == NULL) goto error;
    142.   
    143.   	if (key->pkey != NULL)
                ^
    144.   		{
    145.   		CRYPTO_add(&key->pkey->references, 1, CRYPTO_LOCK_EVP_PKEY);

crypto/asn1/x_pubkey.c:149:6: Taking false branch
    147.   		}
    148.   
    149.   	if (key->public_key == NULL) goto error;
                ^
    150.   
    151.   	if ((ret = EVP_PKEY_new()) == NULL)

crypto/asn1/x_pubkey.c:151:6: 
    149.   	if (key->public_key == NULL) goto error;
    150.   
    151. > 	if ((ret = EVP_PKEY_new()) == NULL)
    152.   		{
    153.   		X509err(X509_F_X509_PUBKEY_GET, ERR_R_MALLOC_FAILURE);

crypto/evp/p_lib.c:169:1: start of procedure EVP_PKEY_new()
      167.   	}
      168.   
      169. > EVP_PKEY *EVP_PKEY_new(void)
      170.   	{
      171.   	EVP_PKEY *ret;

crypto/evp/p_lib.c:173:2: 
      171.   	EVP_PKEY *ret;
      172.   
      173. > 	ret=(EVP_PKEY *)OPENSSL_malloc(sizeof(EVP_PKEY));
      174.   	if (ret == NULL)
      175.   		{

crypto/mem.c:291:1: start of procedure CRYPTO_malloc()
        289.   	}
        290.   
        291. > void *CRYPTO_malloc(int num, const char *file, int line)
        292.   	{
        293.   	void *ret = NULL;

crypto/mem.c:293:2: 
        291.   void *CRYPTO_malloc(int num, const char *file, int line)
        292.   	{
        293. > 	void *ret = NULL;
        294.   	extern unsigned char cleanse_ctr;
        295.   

crypto/mem.c:296:6: Taking false branch
        294.   	extern unsigned char cleanse_ctr;
        295.   
        296.   	if (num <= 0) return NULL;
                    ^
        297.   
        298.   	allow_customize = 0;

crypto/mem.c:298:2: 
        296.   	if (num <= 0) return NULL;
        297.   
        298. > 	allow_customize = 0;
        299.   	if (malloc_debug_func != NULL)
        300.   		{

crypto/mem.c:299:6: Taking true branch
        297.   
        298.   	allow_customize = 0;
        299.   	if (malloc_debug_func != NULL)
                    ^
        300.   		{
        301.   		allow_customize_debug = 0;

crypto/mem.c:301:3: 
        299.   	if (malloc_debug_func != NULL)
        300.   		{
        301. > 		allow_customize_debug = 0;
        302.   		malloc_debug_func(NULL, num, file, line, 0);
        303.   		}

crypto/mem.c:302:3: Skipping __function_pointer__(): unresolved function pointer
        300.   		{
        301.   		allow_customize_debug = 0;
        302.   		malloc_debug_func(NULL, num, file, line, 0);
                 ^
        303.   		}
        304.   	ret = malloc_ex_func(num,file,line);

crypto/mem.c:304:2: Skipping __function_pointer__(): unresolved function pointer
        302.   		malloc_debug_func(NULL, num, file, line, 0);
        303.   		}
        304.   	ret = malloc_ex_func(num,file,line);
                ^
        305.   #ifdef LEVITTE_DEBUG_MEM
        306.   	fprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\n", ret, num);

crypto/mem.c:308:6: Taking true branch
        306.   	fprintf(stderr, "LEVITTE_DEBUG_MEM:         > 0x%p (%d)\n", ret, num);
        307.   #endif
        308.   	if (malloc_debug_func != NULL)
                    ^
        309.   		malloc_debug_func(ret, num, file, line, 1);
        310.   

crypto/mem.c:309:3: Skipping __function_pointer__(): unresolved function pointer
        307.   #endif
        308.   	if (malloc_debug_func != NULL)
        309.   		malloc_debug_func(ret, num, file, line, 1);
                 ^
        310.   
        311.           /* Create a dependency on the value of 'cleanse_ctr' so our memory

crypto/mem.c:314:12: Taking false branch
        312.            * sanitisation function can't be optimised out. NB: We only do
        313.            * this for >2Kb so the overhead doesn't bother us. */
        314.           if(ret && (num > 2048))
                          ^
        315.                   ((unsigned char *)ret)[0] = cleanse_ctr;
        316.   

crypto/mem.c:317:2: 
        315.                   ((unsigned char *)ret)[0] = cleanse_ctr;
        316.   
        317. > 	return ret;
        318.   	}
        319.   

crypto/mem.c:318:2: return from a call to CRYPTO_malloc
        316.   
        317.   	return ret;
        318.   	}
                ^
        319.   
        320.   void *CRYPTO_realloc(void *str, int num, const char *file, int line)

crypto/evp/p_lib.c:174:6: Taking true branch
      172.   
      173.   	ret=(EVP_PKEY *)OPENSSL_malloc(sizeof(EVP_PKEY));
      174.   	if (ret == NULL)
                  ^
      175.   		{
      176.   		EVPerr(EVP_F_EVP_PKEY_NEW,ERR_R_MALLOC_FAILURE);

crypto/evp/p_lib.c:176:3: 
      174.   	if (ret == NULL)
      175.   		{
      176. > 		EVPerr(EVP_F_EVP_PKEY_NEW,ERR_R_MALLOC_FAILURE);
      177.   		return(NULL);
      178.   		}

crypto/err/err.c:668:1: start of procedure ERR_put_error()
        666.   /********************************************************/
        667.   
        668. > void ERR_put_error(int lib, int func, int reason, const char *file,
        669.   	     int line)
        670.   	{

crypto/err/err.c:692:2: Skipping ERR_get_state(): empty list of specs
        690.   	}
        691.   #endif
        692.   	es=ERR_get_state();
                ^
        693.   
        694.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:694:2: 
        692.   	es=ERR_get_state();
        693.   
        694. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
        695.   	if (es->top == es->bottom)
        696.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:695:6: Taking false branch
        693.   
        694.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
        695.   	if (es->top == es->bottom)
                    ^
        696.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
        697.   	es->err_flags[es->top]=0;

crypto/err/err.c:697:2: 
        695.   	if (es->top == es->bottom)
        696.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
        697. > 	es->err_flags[es->top]=0;
        698.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
        699.   	es->err_file[es->top]=file;

crypto/err/err.c:698:2: 
        696.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
        697.   	es->err_flags[es->top]=0;
        698. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
        699.   	es->err_file[es->top]=file;
        700.   	es->err_line[es->top]=line;

crypto/err/err.c:699:2: 
        697.   	es->err_flags[es->top]=0;
        698.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
        699. > 	es->err_file[es->top]=file;
        700.   	es->err_line[es->top]=line;
        701.   	err_clear_data(es,es->top);

crypto/err/err.c:700:2: 
        698.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
        699.   	es->err_file[es->top]=file;
        700. > 	es->err_line[es->top]=line;
        701.   	err_clear_data(es,es->top);
        702.   	}

crypto/err/err.c:701:2: Taking true branch
        699.   	es->err_file[es->top]=file;
        700.   	es->err_line[es->top]=line;
        701.   	err_clear_data(es,es->top);
                ^
        702.   	}
        703.   

crypto/err/err.c:701:2: Taking false branch
        699.   	es->err_file[es->top]=file;
        700.   	es->err_line[es->top]=line;
        701.   	err_clear_data(es,es->top);
                ^
        702.   	}
        703.   

crypto/err/err.c:701:2: Loop condition is false. Leaving loop
        699.   	es->err_file[es->top]=file;
        700.   	es->err_line[es->top]=line;
        701.   	err_clear_data(es,es->top);
                ^
        702.   	}
        703.   

crypto/err/err.c:702:2: return from a call to ERR_put_error
        700.   	es->err_line[es->top]=line;
        701.   	err_clear_data(es,es->top);
        702.   	}
                ^
        703.   
        704.   void ERR_clear_error(void)

crypto/evp/p_lib.c:177:3: 
      175.   		{
      176.   		EVPerr(EVP_F_EVP_PKEY_NEW,ERR_R_MALLOC_FAILURE);
      177. > 		return(NULL);
      178.   		}
      179.   	ret->type=EVP_PKEY_NONE;

crypto/evp/p_lib.c:186:2: return from a call to EVP_PKEY_new
      184.   	ret->save_parameters=1;
      185.   	return(ret);
      186.   	}
              ^
      187.   
      188.   int EVP_PKEY_assign(EVP_PKEY *pkey, int type, char *key)

crypto/asn1/x_pubkey.c:151:6: Taking true branch
    149.   	if (key->public_key == NULL) goto error;
    150.   
    151.   	if ((ret = EVP_PKEY_new()) == NULL)
                ^
    152.   		{
    153.   		X509err(X509_F_X509_PUBKEY_GET, ERR_R_MALLOC_FAILURE);

crypto/asn1/x_pubkey.c:153:3: 
    151.   	if ((ret = EVP_PKEY_new()) == NULL)
    152.   		{
    153. > 		X509err(X509_F_X509_PUBKEY_GET, ERR_R_MALLOC_FAILURE);
    154.   		goto error;
    155.   		}

crypto/err/err.c:668:1: start of procedure ERR_put_error()
      666.   /********************************************************/
      667.   
      668. > void ERR_put_error(int lib, int func, int reason, const char *file,
      669.   	     int line)
      670.   	{

crypto/err/err.c:692:2: Skipping ERR_get_state(): empty list of specs
      690.   	}
      691.   #endif
      692.   	es=ERR_get_state();
              ^
      693.   
      694.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:694:2: 
      692.   	es=ERR_get_state();
      693.   
      694. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
      695.   	if (es->top == es->bottom)
      696.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:695:6: Taking false branch
      693.   
      694.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
      695.   	if (es->top == es->bottom)
                  ^
      696.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
      697.   	es->err_flags[es->top]=0;

crypto/err/err.c:697:2: 
      695.   	if (es->top == es->bottom)
      696.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
      697. > 	es->err_flags[es->top]=0;
      698.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
      699.   	es->err_file[es->top]=file;

crypto/err/err.c:698:2: 
      696.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
      697.   	es->err_flags[es->top]=0;
      698. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
      699.   	es->err_file[es->top]=file;
      700.   	es->err_line[es->top]=line;

crypto/err/err.c:699:2: 
      697.   	es->err_flags[es->top]=0;
      698.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
      699. > 	es->err_file[es->top]=file;
      700.   	es->err_line[es->top]=line;
      701.   	err_clear_data(es,es->top);

crypto/err/err.c:700:2: 
      698.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
      699.   	es->err_file[es->top]=file;
      700. > 	es->err_line[es->top]=line;
      701.   	err_clear_data(es,es->top);
      702.   	}

crypto/err/err.c:701:2: Taking true branch
      699.   	es->err_file[es->top]=file;
      700.   	es->err_line[es->top]=line;
      701.   	err_clear_data(es,es->top);
              ^
      702.   	}
      703.   

crypto/err/err.c:701:2: Taking false branch
      699.   	es->err_file[es->top]=file;
      700.   	es->err_line[es->top]=line;
      701.   	err_clear_data(es,es->top);
              ^
      702.   	}
      703.   

crypto/err/err.c:701:2: Loop condition is false. Leaving loop
      699.   	es->err_file[es->top]=file;
      700.   	es->err_line[es->top]=line;
      701.   	err_clear_data(es,es->top);
              ^
      702.   	}
      703.   

crypto/err/err.c:702:2: return from a call to ERR_put_error
      700.   	es->err_line[es->top]=line;
      701.   	err_clear_data(es,es->top);
      702.   	}
              ^
      703.   
      704.   void ERR_clear_error(void)

crypto/asn1/x_pubkey.c:188:2: 
    186.   	return ret;
    187.   
    188. > 	error:
    189.   	if (ret != NULL)
    190.   		EVP_PKEY_free(ret);

crypto/asn1/x_pubkey.c:189:6: Taking false branch
    187.   
    188.   	error:
    189.   	if (ret != NULL)
                ^
    190.   		EVP_PKEY_free(ret);
    191.   	return(NULL);

crypto/asn1/x_pubkey.c:191:2: 
    189.   	if (ret != NULL)
    190.   		EVP_PKEY_free(ret);
    191. > 	return(NULL);
    192.   	}
    193.   

crypto/asn1/x_pubkey.c:192:2: return from a call to X509_PUBKEY_get
    190.   		EVP_PKEY_free(ret);
    191.   	return(NULL);
    192.   	}
            ^
    193.   
    194.   /* Now two pseudo ASN1 routines that take an EVP_PKEY structure

crypto/x509/x509_req.c:114:2: return from a call to X509_REQ_get_pubkey
  112.   		return(NULL);
  113.   	return(X509_PUBKEY_get(req->req_info->pubkey));
  114.   	}
          ^
  115.   
  116.   int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)

crypto/x509/x509_req.c:122:2: 
120.   
121.   	xk=X509_REQ_get_pubkey(x);
122. > 	switch (EVP_PKEY_cmp(xk, k))
123.   		{
124.   	case 1:

crypto/evp/p_lib.c:155:1: start of procedure EVP_PKEY_cmp()
  153.   	}
  154.   
  155. > int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
  156.   	{
  157.   	if (a->type != b->type)

crypto/evp/p_lib.c:157:6: 
  155.   int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)
  156.   	{
  157. > 	if (a->type != b->type)
  158.   		return -1;
  159.   

int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
	{
	EVP_PKEY *xk=NULL;
	int ok=0;
	xk=X509_REQ_get_pubkey(x);
	switch (EVP_PKEY_cmp(xk, k))
		{
	case 1:
		ok=1;
		break;
	case 0:
		X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,X509_R_KEY_VALUES_MISMATCH);
		break;
	case -1:
		X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,X509_R_KEY_TYPE_MISMATCH);
		break;
	case -2:
#ifndef OPENSSL_NO_EC
		if (k->type == EVP_PKEY_EC)
			{
			X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY, ERR_R_EC_LIB);
			break;
			}
#endif
#ifndef OPENSSL_NO_DH
		if (k->type == EVP_PKEY_DH)
			{
			X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,X509_R_CANT_CHECK_DH_KEY);
			break;
			}
#endif
	        X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,X509_R_UNKNOWN_KEY_TYPE);
		}
	EVP_PKEY_free(xk);
	return(ok);
	}
['int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)\n\t{\n\tEVP_PKEY *xk=NULL;\n\tint ok=0;\n\txk=X509_REQ_get_pubkey(x);\n\tswitch (EVP_PKEY_cmp(xk, k))\n\t\t{\n\tcase 1:\n\t\tok=1;\n\t\tbreak;\n\tcase 0:\n\t\tX509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,X509_R_KEY_VALUES_MISMATCH);\n\t\tbreak;\n\tcase -1:\n\t\tX509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,X509_R_KEY_TYPE_MISMATCH);\n\t\tbreak;\n\tcase -2:\n#ifndef OPENSSL_NO_EC\n\t\tif (k->type == EVP_PKEY_EC)\n\t\t\t{\n\t\t\tX509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY, ERR_R_EC_LIB);\n\t\t\tbreak;\n\t\t\t}\n#endif\n#ifndef OPENSSL_NO_DH\n\t\tif (k->type == EVP_PKEY_DH)\n\t\t\t{\n\t\t\tX509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,X509_R_CANT_CHECK_DH_KEY);\n\t\t\tbreak;\n\t\t\t}\n#endif\n\t        X509err(X509_F_X509_REQ_CHECK_PRIVATE_KEY,X509_R_UNKNOWN_KEY_TYPE);\n\t\t}\n\tEVP_PKEY_free(xk);\n\treturn(ok);\n\t}', 'EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)\n\t{\n\tif ((req == NULL) || (req->req_info == NULL))\n\t\treturn(NULL);\n\treturn(X509_PUBKEY_get(req->req_info->pubkey));\n\t}', 'EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)\n\t{\n\tEVP_PKEY *ret=NULL;\n\tconst EVP_PKEY_ASN1_METHOD *meth;\n\tif (key == NULL) goto error;\n\tif (key->pkey != NULL)\n\t\t{\n\t\tCRYPTO_add(&key->pkey->references, 1, CRYPTO_LOCK_EVP_PKEY);\n\t\treturn key->pkey;\n\t\t}\n\tif (key->public_key == NULL) goto error;\n\tif ((ret = EVP_PKEY_new()) == NULL)\n\t\t{\n\t\tX509err(X509_F_X509_PUBKEY_GET, ERR_R_MALLOC_FAILURE);\n\t\tgoto error;\n\t\t}\n\tmeth = EVP_PKEY_asn1_find(OBJ_obj2nid(key->algor->algorithm));\n\tif (meth)\n\t\t{\n\t\tif (meth->pub_decode)\n\t\t\t{\n\t\t\tif (!meth->pub_decode(ret, key))\n\t\t\t\t{\n\t\t\t\tX509err(X509_F_X509_PUBKEY_GET,\n\t\t\t\t\t\tX509_R_PUBLIC_KEY_DECODE_ERROR);\n\t\t\t\tgoto error;\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tX509err(X509_F_X509_PUBKEY_GET,\n\t\t\t\tX509_R_METHOD_NOT_SUPPORTED);\n\t\t\tgoto error;\n\t\t\t}\n\t\t}\n\telse\n\t\t{\n\t\tX509err(X509_F_X509_PUBKEY_GET,X509_R_UNSUPPORTED_ALGORITHM);\n\t\tgoto error;\n\t\t}\n\tkey->pkey = ret;\n\tCRYPTO_add(&ret->references, 1, CRYPTO_LOCK_EVP_PKEY);\n\treturn ret;\n\terror:\n\tif (ret != NULL)\n\t\tEVP_PKEY_free(ret);\n\treturn(NULL);\n\t}', 'EVP_PKEY *EVP_PKEY_new(void)\n\t{\n\tEVP_PKEY *ret;\n\tret=(EVP_PKEY *)OPENSSL_malloc(sizeof(EVP_PKEY));\n\tif (ret == NULL)\n\t\t{\n\t\tEVPerr(EVP_F_EVP_PKEY_NEW,ERR_R_MALLOC_FAILURE);\n\t\treturn(NULL);\n\t\t}\n\tret->type=EVP_PKEY_NONE;\n\tret->references=1;\n\tret->ameth=NULL;\n\tret->pkey.ptr=NULL;\n\tret->attributes=NULL;\n\tret->save_parameters=1;\n\treturn(ret);\n\t}', 'void *CRYPTO_malloc(int num, const char *file, int line)\n\t{\n\tvoid *ret = NULL;\n\textern unsigned char cleanse_ctr;\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        if(ret && (num > 2048))\n                ((unsigned char *)ret)[0] = cleanse_ctr;\n\treturn ret;\n\t}', 'void ERR_put_error(int lib, int func, int reason, const char *file,\n\t     int line)\n\t{\n\tERR_STATE *es;\n#ifdef _OSD_POSIX\n\tif (strncmp(file,"*POSIX(", sizeof("*POSIX(")-1) == 0) {\n\t\tchar *end;\n\t\tfile += sizeof("*POSIX(")-1;\n\t\tend = &file[strlen(file)-1];\n\t\tif (*end == \')\')\n\t\t\t*end = \'\\0\';\n\t\tif ((end = strrchr(file, \'/\')) != NULL)\n\t\t\tfile = &end[1];\n\t}\n#endif\n\tes=ERR_get_state();\n\tes->top=(es->top+1)%ERR_NUM_ERRORS;\n\tif (es->top == es->bottom)\n\t\tes->bottom=(es->bottom+1)%ERR_NUM_ERRORS;\n\tes->err_flags[es->top]=0;\n\tes->err_buffer[es->top]=ERR_PACK(lib,func,reason);\n\tes->err_file[es->top]=file;\n\tes->err_line[es->top]=line;\n\terr_clear_data(es,es->top);\n\t}', 'int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b)\n\t{\n\tif (a->type != b->type)\n\t\treturn -1;\n\tif (EVP_PKEY_cmp_parameters(a, b) == 0)\n\t\treturn 0;\n\tif (a->ameth && a->ameth->pub_cmp)\n\t\treturn a->ameth->pub_cmp(a, b);\n\treturn -2;\n\t}']