crypto/pem/pem_all.c:223: error: NULL_DEREFERENCE
  pointer `pktmp` last assigned on line 222 could be null and is dereferenced by call to `pkey_get_dsa()` at line 223, column 9.
Showing all 155 steps of the trace


crypto/pem/pem_all.c:218:1: start of procedure PEM_read_bio_DSAPrivateKey()
216.   }
217.   
218. > DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb,
219.   								void *u)
220.   {

crypto/pem/pem_all.c:222:2: 
220.   {
221.   	EVP_PKEY *pktmp;
222. > 	pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u);
223.   	return pkey_get_dsa(pktmp, dsa);	/* will free pktmp */
224.   }

crypto/pem/pem_pkey.c:75:1: start of procedure PEM_read_bio_PrivateKey()
  73.   int pem_check_suffix(const char *pem_str, const char *suffix);
  74.   
  75. > EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u)
  76.   	{
  77.   	char *nm=NULL;

crypto/pem/pem_pkey.c:77:2: 
  75.   EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u)
  76.   	{
  77. > 	char *nm=NULL;
  78.   	const unsigned char *p=NULL;
  79.   	unsigned char *data=NULL;

crypto/pem/pem_pkey.c:78:2: 
  76.   	{
  77.   	char *nm=NULL;
  78. > 	const unsigned char *p=NULL;
  79.   	unsigned char *data=NULL;
  80.   	long len;

crypto/pem/pem_pkey.c:79:2: 
  77.   	char *nm=NULL;
  78.   	const unsigned char *p=NULL;
  79. > 	unsigned char *data=NULL;
  80.   	long len;
  81.   	int slen;

crypto/pem/pem_pkey.c:82:2: 
  80.   	long len;
  81.   	int slen;
  82. > 	EVP_PKEY *ret=NULL;
  83.   
  84.   	if (!PEM_bytes_read_bio(&data, &len, &nm, PEM_STRING_EVP_PKEY, bp, cb, u))

crypto/pem/pem_pkey.c:84:7: 
  82.   	EVP_PKEY *ret=NULL;
  83.   
  84. > 	if (!PEM_bytes_read_bio(&data, &len, &nm, PEM_STRING_EVP_PKEY, bp, cb, u))
  85.   		return NULL;
  86.   	p = data;

crypto/pem/pem_lib.c:262:1: start of procedure PEM_bytes_read_bio()
    260.   }
    261.   
    262. > int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp,
    263.   	     pem_password_cb *cb, void *u)
    264.   	{

crypto/pem/pem_lib.c:266:2: 
    264.   	{
    265.   	EVP_CIPHER_INFO cipher;
    266. > 	char *nm=NULL,*header=NULL;
    267.   	unsigned char *data=NULL;
    268.   	long len;

crypto/pem/pem_lib.c:267:2: 
    265.   	EVP_CIPHER_INFO cipher;
    266.   	char *nm=NULL,*header=NULL;
    267. > 	unsigned char *data=NULL;
    268.   	long len;
    269.   	int ret = 0;

crypto/pem/pem_lib.c:269:2: 
    267.   	unsigned char *data=NULL;
    268.   	long len;
    269. > 	int ret = 0;
    270.   
    271.   	for (;;)

crypto/pem/pem_lib.c:283:3: Loop condition is true. Entering loop body
    281.   		OPENSSL_free(header);
    282.   		OPENSSL_free(data);
    283.   		}
             ^
    284.   	if (!PEM_get_EVP_CIPHER_INFO(header,&cipher)) goto err;
    285.   	if (!PEM_do_header(&cipher,data,&len,cb,u)) goto err;

crypto/pem/pem_lib.c:273:8: 
    271.   	for (;;)
    272.   		{
    273. > 		if (!PEM_read_bio(bp,&nm,&header,&data,&len)) {
    274.   			if(ERR_GET_REASON(ERR_peek_error()) ==
    275.   				PEM_R_NO_START_LINE)

crypto/pem/pem_lib.c:655:1: start of procedure PEM_read_bio()
      653.   #endif
      654.   
      655. > int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data,
      656.   	     long *len)
      657.   	{

crypto/pem/pem_lib.c:659:2: 
      657.   	{
      658.   	EVP_ENCODE_CTX ctx;
      659. > 	int end=0,i,k,bl=0,hl=0,nohead=0;
      660.   	char buf[256];
      661.   	BUF_MEM *nameB;

crypto/pem/pem_lib.c:665:2: 
      663.   	BUF_MEM *dataB,*tmpB;
      664.   	
      665. > 	nameB=BUF_MEM_new();
      666.   	headerB=BUF_MEM_new();
      667.   	dataB=BUF_MEM_new();

crypto/buffer/buffer.c:63:1: start of procedure BUF_MEM_new()
        61.   #include <openssl/buffer.h>
        62.   
        63. > BUF_MEM *BUF_MEM_new(void)
        64.   	{
        65.   	BUF_MEM *ret;

crypto/buffer/buffer.c:67:2: 
        65.   	BUF_MEM *ret;
        66.   
        67. > 	ret=OPENSSL_malloc(sizeof(BUF_MEM));
        68.   	if (ret == NULL)
        69.   		{

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/buffer/buffer.c:68:6: Taking true branch
        66.   
        67.   	ret=OPENSSL_malloc(sizeof(BUF_MEM));
        68.   	if (ret == NULL)
                   ^
        69.   		{
        70.   		BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);

crypto/buffer/buffer.c:70:3: 
        68.   	if (ret == NULL)
        69.   		{
        70. > 		BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);
        71.   		return(NULL);
        72.   		}

crypto/err/err.c:679:1: start of procedure ERR_put_error()
          677.   /********************************************************/
          678.   
          679. > void ERR_put_error(int lib, int func, int reason, const char *file,
          680.   	     int line)
          681.   	{

crypto/err/err.c:703:2: Skipping ERR_get_state(): empty list of specs
          701.   	}
          702.   #endif
          703.   	es=ERR_get_state();
                  ^
          704.   
          705.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:705:2: 
          703.   	es=ERR_get_state();
          704.   
          705. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
          706.   	if (es->top == es->bottom)
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:706:6: Taking false branch
          704.   
          705.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
          706.   	if (es->top == es->bottom)
                      ^
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
          708.   	es->err_flags[es->top]=0;

crypto/err/err.c:708:2: 
          706.   	if (es->top == es->bottom)
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
          708. > 	es->err_flags[es->top]=0;
          709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710.   	es->err_file[es->top]=file;

crypto/err/err.c:709:2: 
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
          708.   	es->err_flags[es->top]=0;
          709. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;

crypto/err/err.c:710:2: 
          708.   	es->err_flags[es->top]=0;
          709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710. > 	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);

crypto/err/err.c:711:2: 
          709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710.   	es->err_file[es->top]=file;
          711. > 	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
          713.   	}

crypto/err/err.c:712:2: Taking true branch
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
                  ^
          713.   	}
          714.   

crypto/err/err.c:712:2: Taking false branch
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
                  ^
          713.   	}
          714.   

crypto/err/err.c:712:2: Loop condition is false. Leaving loop
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
                  ^
          713.   	}
          714.   

crypto/err/err.c:713:2: return from a call to ERR_put_error
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
          713.   	}
                  ^
          714.   
          715.   void ERR_clear_error(void)

crypto/buffer/buffer.c:71:3: 
        69.   		{
        70.   		BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);
        71. > 		return(NULL);
        72.   		}
        73.   	ret->length=0;

crypto/buffer/buffer.c:77:2: return from a call to BUF_MEM_new
        75.   	ret->data=NULL;
        76.   	return(ret);
        77.   	}
               ^
        78.   
        79.   void BUF_MEM_free(BUF_MEM *a)

crypto/pem/pem_lib.c:666:2: 
      664.   	
      665.   	nameB=BUF_MEM_new();
      666. > 	headerB=BUF_MEM_new();
      667.   	dataB=BUF_MEM_new();
      668.   	if ((nameB == NULL) || (headerB == NULL) || (dataB == NULL))

crypto/buffer/buffer.c:63:1: start of procedure BUF_MEM_new()
        61.   #include <openssl/buffer.h>
        62.   
        63. > BUF_MEM *BUF_MEM_new(void)
        64.   	{
        65.   	BUF_MEM *ret;

crypto/buffer/buffer.c:67:2: 
        65.   	BUF_MEM *ret;
        66.   
        67. > 	ret=OPENSSL_malloc(sizeof(BUF_MEM));
        68.   	if (ret == NULL)
        69.   		{

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/buffer/buffer.c:68:6: Taking true branch
        66.   
        67.   	ret=OPENSSL_malloc(sizeof(BUF_MEM));
        68.   	if (ret == NULL)
                   ^
        69.   		{
        70.   		BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);

crypto/buffer/buffer.c:70:3: 
        68.   	if (ret == NULL)
        69.   		{
        70. > 		BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);
        71.   		return(NULL);
        72.   		}

crypto/err/err.c:679:1: start of procedure ERR_put_error()
          677.   /********************************************************/
          678.   
          679. > void ERR_put_error(int lib, int func, int reason, const char *file,
          680.   	     int line)
          681.   	{

crypto/err/err.c:703:2: Skipping ERR_get_state(): empty list of specs
          701.   	}
          702.   #endif
          703.   	es=ERR_get_state();
                  ^
          704.   
          705.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:705:2: 
          703.   	es=ERR_get_state();
          704.   
          705. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
          706.   	if (es->top == es->bottom)
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:706:6: Taking false branch
          704.   
          705.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
          706.   	if (es->top == es->bottom)
                      ^
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
          708.   	es->err_flags[es->top]=0;

crypto/err/err.c:708:2: 
          706.   	if (es->top == es->bottom)
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
          708. > 	es->err_flags[es->top]=0;
          709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710.   	es->err_file[es->top]=file;

crypto/err/err.c:709:2: 
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
          708.   	es->err_flags[es->top]=0;
          709. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;

crypto/err/err.c:710:2: 
          708.   	es->err_flags[es->top]=0;
          709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710. > 	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);

crypto/err/err.c:711:2: 
          709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710.   	es->err_file[es->top]=file;
          711. > 	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
          713.   	}

crypto/err/err.c:712:2: Taking true branch
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
                  ^
          713.   	}
          714.   

crypto/err/err.c:712:2: Taking false branch
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
                  ^
          713.   	}
          714.   

crypto/err/err.c:712:2: Loop condition is false. Leaving loop
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
                  ^
          713.   	}
          714.   

crypto/err/err.c:713:2: return from a call to ERR_put_error
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
          713.   	}
                  ^
          714.   
          715.   void ERR_clear_error(void)

crypto/buffer/buffer.c:71:3: 
        69.   		{
        70.   		BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);
        71. > 		return(NULL);
        72.   		}
        73.   	ret->length=0;

crypto/buffer/buffer.c:77:2: return from a call to BUF_MEM_new
        75.   	ret->data=NULL;
        76.   	return(ret);
        77.   	}
               ^
        78.   
        79.   void BUF_MEM_free(BUF_MEM *a)

crypto/pem/pem_lib.c:667:2: 
      665.   	nameB=BUF_MEM_new();
      666.   	headerB=BUF_MEM_new();
      667. > 	dataB=BUF_MEM_new();
      668.   	if ((nameB == NULL) || (headerB == NULL) || (dataB == NULL))
      669.   		{

crypto/buffer/buffer.c:63:1: start of procedure BUF_MEM_new()
        61.   #include <openssl/buffer.h>
        62.   
        63. > BUF_MEM *BUF_MEM_new(void)
        64.   	{
        65.   	BUF_MEM *ret;

crypto/buffer/buffer.c:67:2: 
        65.   	BUF_MEM *ret;
        66.   
        67. > 	ret=OPENSSL_malloc(sizeof(BUF_MEM));
        68.   	if (ret == NULL)
        69.   		{

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/buffer/buffer.c:68:6: Taking true branch
        66.   
        67.   	ret=OPENSSL_malloc(sizeof(BUF_MEM));
        68.   	if (ret == NULL)
                   ^
        69.   		{
        70.   		BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);

crypto/buffer/buffer.c:70:3: 
        68.   	if (ret == NULL)
        69.   		{
        70. > 		BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);
        71.   		return(NULL);
        72.   		}

crypto/err/err.c:679:1: start of procedure ERR_put_error()
          677.   /********************************************************/
          678.   
          679. > void ERR_put_error(int lib, int func, int reason, const char *file,
          680.   	     int line)
          681.   	{

crypto/err/err.c:703:2: Skipping ERR_get_state(): empty list of specs
          701.   	}
          702.   #endif
          703.   	es=ERR_get_state();
                  ^
          704.   
          705.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:705:2: 
          703.   	es=ERR_get_state();
          704.   
          705. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
          706.   	if (es->top == es->bottom)
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:706:6: Taking false branch
          704.   
          705.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
          706.   	if (es->top == es->bottom)
                      ^
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
          708.   	es->err_flags[es->top]=0;

crypto/err/err.c:708:2: 
          706.   	if (es->top == es->bottom)
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
          708. > 	es->err_flags[es->top]=0;
          709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710.   	es->err_file[es->top]=file;

crypto/err/err.c:709:2: 
          707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
          708.   	es->err_flags[es->top]=0;
          709. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;

crypto/err/err.c:710:2: 
          708.   	es->err_flags[es->top]=0;
          709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710. > 	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);

crypto/err/err.c:711:2: 
          709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
          710.   	es->err_file[es->top]=file;
          711. > 	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
          713.   	}

crypto/err/err.c:712:2: Taking true branch
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
                  ^
          713.   	}
          714.   

crypto/err/err.c:712:2: Taking false branch
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
                  ^
          713.   	}
          714.   

crypto/err/err.c:712:2: Loop condition is false. Leaving loop
          710.   	es->err_file[es->top]=file;
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
                  ^
          713.   	}
          714.   

crypto/err/err.c:713:2: return from a call to ERR_put_error
          711.   	es->err_line[es->top]=line;
          712.   	err_clear_data(es,es->top);
          713.   	}
                  ^
          714.   
          715.   void ERR_clear_error(void)

crypto/buffer/buffer.c:71:3: 
        69.   		{
        70.   		BUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);
        71. > 		return(NULL);
        72.   		}
        73.   	ret->length=0;

crypto/buffer/buffer.c:77:2: return from a call to BUF_MEM_new
        75.   	ret->data=NULL;
        76.   	return(ret);
        77.   	}
               ^
        78.   
        79.   void BUF_MEM_free(BUF_MEM *a)

crypto/pem/pem_lib.c:668:7: Taking true branch
      666.   	headerB=BUF_MEM_new();
      667.   	dataB=BUF_MEM_new();
      668.   	if ((nameB == NULL) || (headerB == NULL) || (dataB == NULL))
                   ^
      669.   		{
      670.   		BUF_MEM_free(nameB);

crypto/pem/pem_lib.c:670:3: 
      668.   	if ((nameB == NULL) || (headerB == NULL) || (dataB == NULL))
      669.   		{
      670. > 		BUF_MEM_free(nameB);
      671.   		BUF_MEM_free(headerB);
      672.   		BUF_MEM_free(dataB);

crypto/buffer/buffer.c:79:1: start of procedure BUF_MEM_free()
        77.   	}
        78.   
        79. > void BUF_MEM_free(BUF_MEM *a)
        80.   	{
        81.   	if(a == NULL)

crypto/buffer/buffer.c:81:5: Taking true branch
        79.   void BUF_MEM_free(BUF_MEM *a)
        80.   	{
        81.   	if(a == NULL)
                  ^
        82.   	    return;
        83.   

crypto/buffer/buffer.c:82:6: 
        80.   	{
        81.   	if(a == NULL)
        82. > 	    return;
        83.   
        84.   	if (a->data != NULL)

crypto/buffer/buffer.c:90:2: return from a call to BUF_MEM_free
        88.   		}
        89.   	OPENSSL_free(a);
        90.   	}
               ^
        91.   
        92.   int BUF_MEM_grow(BUF_MEM *str, int len)

crypto/pem/pem_lib.c:671:3: 
      669.   		{
      670.   		BUF_MEM_free(nameB);
      671. > 		BUF_MEM_free(headerB);
      672.   		BUF_MEM_free(dataB);
      673.   		PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);

crypto/buffer/buffer.c:79:1: start of procedure BUF_MEM_free()
        77.   	}
        78.   
        79. > void BUF_MEM_free(BUF_MEM *a)
        80.   	{
        81.   	if(a == NULL)

crypto/buffer/buffer.c:81:5: Taking true branch
        79.   void BUF_MEM_free(BUF_MEM *a)
        80.   	{
        81.   	if(a == NULL)
                  ^
        82.   	    return;
        83.   

crypto/buffer/buffer.c:82:6: 
        80.   	{
        81.   	if(a == NULL)
        82. > 	    return;
        83.   
        84.   	if (a->data != NULL)

crypto/buffer/buffer.c:90:2: return from a call to BUF_MEM_free
        88.   		}
        89.   	OPENSSL_free(a);
        90.   	}
               ^
        91.   
        92.   int BUF_MEM_grow(BUF_MEM *str, int len)

crypto/pem/pem_lib.c:672:3: 
      670.   		BUF_MEM_free(nameB);
      671.   		BUF_MEM_free(headerB);
      672. > 		BUF_MEM_free(dataB);
      673.   		PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);
      674.   		return(0);

crypto/buffer/buffer.c:79:1: start of procedure BUF_MEM_free()
        77.   	}
        78.   
        79. > void BUF_MEM_free(BUF_MEM *a)
        80.   	{
        81.   	if(a == NULL)

crypto/buffer/buffer.c:81:5: Taking true branch
        79.   void BUF_MEM_free(BUF_MEM *a)
        80.   	{
        81.   	if(a == NULL)
                  ^
        82.   	    return;
        83.   

crypto/buffer/buffer.c:82:6: 
        80.   	{
        81.   	if(a == NULL)
        82. > 	    return;
        83.   
        84.   	if (a->data != NULL)

crypto/buffer/buffer.c:90:2: return from a call to BUF_MEM_free
        88.   		}
        89.   	OPENSSL_free(a);
        90.   	}
               ^
        91.   
        92.   int BUF_MEM_grow(BUF_MEM *str, int len)

crypto/pem/pem_lib.c:673:3: 
      671.   		BUF_MEM_free(headerB);
      672.   		BUF_MEM_free(dataB);
      673. > 		PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);
      674.   		return(0);
      675.   		}

crypto/err/err.c:679:1: start of procedure ERR_put_error()
        677.   /********************************************************/
        678.   
        679. > void ERR_put_error(int lib, int func, int reason, const char *file,
        680.   	     int line)
        681.   	{

crypto/err/err.c:703:2: Skipping ERR_get_state(): empty list of specs
        701.   	}
        702.   #endif
        703.   	es=ERR_get_state();
                ^
        704.   
        705.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:705:2: 
        703.   	es=ERR_get_state();
        704.   
        705. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
        706.   	if (es->top == es->bottom)
        707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:706:6: Taking false branch
        704.   
        705.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
        706.   	if (es->top == es->bottom)
                    ^
        707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
        708.   	es->err_flags[es->top]=0;

crypto/err/err.c:708:2: 
        706.   	if (es->top == es->bottom)
        707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
        708. > 	es->err_flags[es->top]=0;
        709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
        710.   	es->err_file[es->top]=file;

crypto/err/err.c:709:2: 
        707.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
        708.   	es->err_flags[es->top]=0;
        709. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
        710.   	es->err_file[es->top]=file;
        711.   	es->err_line[es->top]=line;

crypto/err/err.c:710:2: 
        708.   	es->err_flags[es->top]=0;
        709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
        710. > 	es->err_file[es->top]=file;
        711.   	es->err_line[es->top]=line;
        712.   	err_clear_data(es,es->top);

crypto/err/err.c:711:2: 
        709.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
        710.   	es->err_file[es->top]=file;
        711. > 	es->err_line[es->top]=line;
        712.   	err_clear_data(es,es->top);
        713.   	}

crypto/err/err.c:712:2: Taking true branch
        710.   	es->err_file[es->top]=file;
        711.   	es->err_line[es->top]=line;
        712.   	err_clear_data(es,es->top);
                ^
        713.   	}
        714.   

crypto/err/err.c:712:2: Taking false branch
        710.   	es->err_file[es->top]=file;
        711.   	es->err_line[es->top]=line;
        712.   	err_clear_data(es,es->top);
                ^
        713.   	}
        714.   

crypto/err/err.c:712:2: Loop condition is false. Leaving loop
        710.   	es->err_file[es->top]=file;
        711.   	es->err_line[es->top]=line;
        712.   	err_clear_data(es,es->top);
                ^
        713.   	}
        714.   

crypto/err/err.c:713:2: return from a call to ERR_put_error
        711.   	es->err_line[es->top]=line;
        712.   	err_clear_data(es,es->top);
        713.   	}
                ^
        714.   
        715.   void ERR_clear_error(void)

crypto/pem/pem_lib.c:674:3: 
      672.   		BUF_MEM_free(dataB);
      673.   		PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);
      674. > 		return(0);
      675.   		}
      676.   

crypto/pem/pem_lib.c:818:2: return from a call to PEM_read_bio
      816.   	BUF_MEM_free(dataB);
      817.   	return(0);
      818.   	}
              ^
      819.   
      820.   /* Check pem string and return prefix length.

crypto/pem/pem_lib.c:273:8: Taking true branch
    271.   	for (;;)
    272.   		{
    273.   		if (!PEM_read_bio(bp,&nm,&header,&data,&len)) {
                  ^
    274.   			if(ERR_GET_REASON(ERR_peek_error()) ==
    275.   				PEM_R_NO_START_LINE)

crypto/pem/pem_lib.c:274:7: 
    272.   		{
    273.   		if (!PEM_read_bio(bp,&nm,&header,&data,&len)) {
    274. > 			if(ERR_GET_REASON(ERR_peek_error()) ==
    275.   				PEM_R_NO_START_LINE)
    276.   				ERR_add_error_data(2, "Expecting: ", name);

crypto/err/err.c:742:1: start of procedure ERR_peek_error()
      740.   
      741.   
      742. > unsigned long ERR_peek_error(void)
      743.   	{ return(get_error_values(0,0,NULL,NULL,NULL,NULL)); }
      744.   

crypto/err/err.c:743:4: Skipping get_error_values(): empty list of specs
      741.   
      742.   unsigned long ERR_peek_error(void)
      743.   	{ return(get_error_values(0,0,NULL,NULL,NULL,NULL)); }
                ^
      744.   
      745.   unsigned long ERR_peek_error_line(const char **file, int *line)

crypto/err/err.c:743:55: return from a call to ERR_peek_error
      741.   
      742.   unsigned long ERR_peek_error(void)
      743.   	{ return(get_error_values(0,0,NULL,NULL,NULL,NULL)); }
                                                                   ^
      744.   
      745.   unsigned long ERR_peek_error_line(const char **file, int *line)

crypto/pem/pem_lib.c:274:7: Taking false branch
    272.   		{
    273.   		if (!PEM_read_bio(bp,&nm,&header,&data,&len)) {
    274.   			if(ERR_GET_REASON(ERR_peek_error()) ==
                 ^
    275.   				PEM_R_NO_START_LINE)
    276.   				ERR_add_error_data(2, "Expecting: ", name);

crypto/pem/pem_lib.c:277:4: 
    275.   				PEM_R_NO_START_LINE)
    276.   				ERR_add_error_data(2, "Expecting: ", name);
    277. > 			return 0;
    278.   		}
    279.   		if(check_pem(nm, name)) break;

crypto/pem/pem_lib.c:300:2: return from a call to PEM_bytes_read_bio
    298.   	if (!ret) OPENSSL_free(data);
    299.   	return ret;
    300.   	}
            ^
    301.   
    302.   #ifndef OPENSSL_NO_FP_API

crypto/pem/pem_pkey.c:84:7: Taking true branch
  82.   	EVP_PKEY *ret=NULL;
  83.   
  84.   	if (!PEM_bytes_read_bio(&data, &len, &nm, PEM_STRING_EVP_PKEY, bp, cb, u))
              ^
  85.   		return NULL;
  86.   	p = data;

crypto/pem/pem_pkey.c:85:3: 
  83.   
  84.   	if (!PEM_bytes_read_bio(&data, &len, &nm, PEM_STRING_EVP_PKEY, bp, cb, u))
  85. > 		return NULL;
  86.   	p = data;
  87.   

crypto/pem/pem_pkey.c:137:2: return from a call to PEM_read_bio_PrivateKey
  135.   	OPENSSL_free(data);
  136.   	return(ret);
  137.   	}
          ^
  138.   
  139.   int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,

crypto/pem/pem_all.c:223:2: 
221.   	EVP_PKEY *pktmp;
222.   	pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u);
223. > 	return pkey_get_dsa(pktmp, dsa);	/* will free pktmp */
224.   }
225.   

DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb,
								void *u)
{
	EVP_PKEY *pktmp;
	pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u);
	return pkey_get_dsa(pktmp, dsa);
}
['DSA *PEM_read_bio_DSAPrivateKey(BIO *bp, DSA **dsa, pem_password_cb *cb,\n\t\t\t\t\t\t\t\tvoid *u)\n{\n\tEVP_PKEY *pktmp;\n\tpktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u);\n\treturn pkey_get_dsa(pktmp, dsa);\n}', 'EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, void *u)\n\t{\n\tchar *nm=NULL;\n\tconst unsigned char *p=NULL;\n\tunsigned char *data=NULL;\n\tlong len;\n\tint slen;\n\tEVP_PKEY *ret=NULL;\n\tif (!PEM_bytes_read_bio(&data, &len, &nm, PEM_STRING_EVP_PKEY, bp, cb, u))\n\t\treturn NULL;\n\tp = data;\n\tif (strcmp(nm,PEM_STRING_PKCS8INF) == 0) {\n\t\tPKCS8_PRIV_KEY_INFO *p8inf;\n\t\tp8inf=d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, len);\n\t\tif(!p8inf) goto p8err;\n\t\tret = EVP_PKCS82PKEY(p8inf);\n\t\tif(x) {\n\t\t\tif(*x) EVP_PKEY_free((EVP_PKEY *)*x);\n\t\t\t*x = ret;\n\t\t}\n\t\tPKCS8_PRIV_KEY_INFO_free(p8inf);\n\t} else if (strcmp(nm,PEM_STRING_PKCS8) == 0) {\n\t\tPKCS8_PRIV_KEY_INFO *p8inf;\n\t\tX509_SIG *p8;\n\t\tint klen;\n\t\tchar psbuf[PEM_BUFSIZE];\n\t\tp8 = d2i_X509_SIG(NULL, &p, len);\n\t\tif(!p8) goto p8err;\n\t\tif (cb) klen=cb(psbuf,PEM_BUFSIZE,0,u);\n\t\telse klen=PEM_def_callback(psbuf,PEM_BUFSIZE,0,u);\n\t\tif (klen <= 0) {\n\t\t\tPEMerr(PEM_F_PEM_READ_BIO_PRIVATEKEY,\n\t\t\t\t\tPEM_R_BAD_PASSWORD_READ);\n\t\t\tX509_SIG_free(p8);\n\t\t\tgoto err;\n\t\t}\n\t\tp8inf = PKCS8_decrypt(p8, psbuf, klen);\n\t\tX509_SIG_free(p8);\n\t\tif(!p8inf) goto p8err;\n\t\tret = EVP_PKCS82PKEY(p8inf);\n\t\tif(x) {\n\t\t\tif(*x) EVP_PKEY_free((EVP_PKEY *)*x);\n\t\t\t*x = ret;\n\t\t}\n\t\tPKCS8_PRIV_KEY_INFO_free(p8inf);\n\t} else if ((slen = pem_check_suffix(nm, "PRIVATE KEY")) > 0)\n\t\t{\n\t\tconst EVP_PKEY_ASN1_METHOD *ameth;\n\t\tameth = EVP_PKEY_asn1_find_str(NULL, nm, slen);\n\t\tif (!ameth || !ameth->old_priv_decode)\n\t\t\tgoto p8err;\n\t\tret=d2i_PrivateKey(ameth->pkey_id,x,&p,len);\n\t\t}\np8err:\n\tif (ret == NULL)\n\t\tPEMerr(PEM_F_PEM_READ_BIO_PRIVATEKEY,ERR_R_ASN1_LIB);\nerr:\n\tOPENSSL_free(nm);\n\tOPENSSL_free(data);\n\treturn(ret);\n\t}', 'int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm, const char *name, BIO *bp,\n\t     pem_password_cb *cb, void *u)\n\t{\n\tEVP_CIPHER_INFO cipher;\n\tchar *nm=NULL,*header=NULL;\n\tunsigned char *data=NULL;\n\tlong len;\n\tint ret = 0;\n\tfor (;;)\n\t\t{\n\t\tif (!PEM_read_bio(bp,&nm,&header,&data,&len)) {\n\t\t\tif(ERR_GET_REASON(ERR_peek_error()) ==\n\t\t\t\tPEM_R_NO_START_LINE)\n\t\t\t\tERR_add_error_data(2, "Expecting: ", name);\n\t\t\treturn 0;\n\t\t}\n\t\tif(check_pem(nm, name)) break;\n\t\tOPENSSL_free(nm);\n\t\tOPENSSL_free(header);\n\t\tOPENSSL_free(data);\n\t\t}\n\tif (!PEM_get_EVP_CIPHER_INFO(header,&cipher)) goto err;\n\tif (!PEM_do_header(&cipher,data,&len,cb,u)) goto err;\n\t*pdata = data;\n\t*plen = len;\n\tif (pnm)\n\t\t*pnm = nm;\n\tret = 1;\nerr:\n\tif (!ret || !pnm) OPENSSL_free(nm);\n\tOPENSSL_free(header);\n\tif (!ret) OPENSSL_free(data);\n\treturn ret;\n\t}', 'int PEM_read_bio(BIO *bp, char **name, char **header, unsigned char **data,\n\t     long *len)\n\t{\n\tEVP_ENCODE_CTX ctx;\n\tint end=0,i,k,bl=0,hl=0,nohead=0;\n\tchar buf[256];\n\tBUF_MEM *nameB;\n\tBUF_MEM *headerB;\n\tBUF_MEM *dataB,*tmpB;\n\tnameB=BUF_MEM_new();\n\theaderB=BUF_MEM_new();\n\tdataB=BUF_MEM_new();\n\tif ((nameB == NULL) || (headerB == NULL) || (dataB == NULL))\n\t\t{\n\t\tBUF_MEM_free(nameB);\n\t\tBUF_MEM_free(headerB);\n\t\tBUF_MEM_free(dataB);\n\t\tPEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);\n\t\treturn(0);\n\t\t}\n\tbuf[254]=\'\\0\';\n\tfor (;;)\n\t\t{\n\t\ti=BIO_gets(bp,buf,254);\n\t\tif (i <= 0)\n\t\t\t{\n\t\t\tPEMerr(PEM_F_PEM_READ_BIO,PEM_R_NO_START_LINE);\n\t\t\tgoto err;\n\t\t\t}\n\t\twhile ((i >= 0) && (buf[i] <= \' \')) i--;\n\t\tbuf[++i]=\'\\n\'; buf[++i]=\'\\0\';\n\t\tif (strncmp(buf,"-----BEGIN ",11) == 0)\n\t\t\t{\n\t\t\ti=strlen(&(buf[11]));\n\t\t\tif (strncmp(&(buf[11+i-6]),"-----\\n",6) != 0)\n\t\t\t\tcontinue;\n\t\t\tif (!BUF_MEM_grow(nameB,i+9))\n\t\t\t\t{\n\t\t\t\tPEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);\n\t\t\t\tgoto err;\n\t\t\t\t}\n\t\t\tmemcpy(nameB->data,&(buf[11]),i-6);\n\t\t\tnameB->data[i-6]=\'\\0\';\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\thl=0;\n\tif (!BUF_MEM_grow(headerB,256))\n\t\t{ PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE); goto err; }\n\theaderB->data[0]=\'\\0\';\n\tfor (;;)\n\t\t{\n\t\ti=BIO_gets(bp,buf,254);\n\t\tif (i <= 0) break;\n\t\twhile ((i >= 0) && (buf[i] <= \' \')) i--;\n\t\tbuf[++i]=\'\\n\'; buf[++i]=\'\\0\';\n\t\tif (buf[0] == \'\\n\') break;\n\t\tif (!BUF_MEM_grow(headerB,hl+i+9))\n\t\t\t{ PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE); goto err; }\n\t\tif (strncmp(buf,"-----END ",9) == 0)\n\t\t\t{\n\t\t\tnohead=1;\n\t\t\tbreak;\n\t\t\t}\n\t\tmemcpy(&(headerB->data[hl]),buf,i);\n\t\theaderB->data[hl+i]=\'\\0\';\n\t\thl+=i;\n\t\t}\n\tbl=0;\n\tif (!BUF_MEM_grow(dataB,1024))\n\t\t{ PEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE); goto err; }\n\tdataB->data[0]=\'\\0\';\n\tif (!nohead)\n\t\t{\n\t\tfor (;;)\n\t\t\t{\n\t\t\ti=BIO_gets(bp,buf,254);\n\t\t\tif (i <= 0) break;\n\t\t\twhile ((i >= 0) && (buf[i] <= \' \')) i--;\n\t\t\tbuf[++i]=\'\\n\'; buf[++i]=\'\\0\';\n\t\t\tif (i != 65) end=1;\n\t\t\tif (strncmp(buf,"-----END ",9) == 0)\n\t\t\t\tbreak;\n\t\t\tif (i > 65) break;\n\t\t\tif (!BUF_MEM_grow_clean(dataB,i+bl+9))\n\t\t\t\t{\n\t\t\t\tPEMerr(PEM_F_PEM_READ_BIO,ERR_R_MALLOC_FAILURE);\n\t\t\t\tgoto err;\n\t\t\t\t}\n\t\t\tmemcpy(&(dataB->data[bl]),buf,i);\n\t\t\tdataB->data[bl+i]=\'\\0\';\n\t\t\tbl+=i;\n\t\t\tif (end)\n\t\t\t\t{\n\t\t\t\tbuf[0]=\'\\0\';\n\t\t\t\ti=BIO_gets(bp,buf,254);\n\t\t\t\tif (i <= 0) break;\n\t\t\t\twhile ((i >= 0) && (buf[i] <= \' \')) i--;\n\t\t\t\tbuf[++i]=\'\\n\'; buf[++i]=\'\\0\';\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\telse\n\t\t{\n\t\ttmpB=headerB;\n\t\theaderB=dataB;\n\t\tdataB=tmpB;\n\t\tbl=hl;\n\t\t}\n\ti=strlen(nameB->data);\n\tif (\t(strncmp(buf,"-----END ",9) != 0) ||\n\t\t(strncmp(nameB->data,&(buf[9]),i) != 0) ||\n\t\t(strncmp(&(buf[9+i]),"-----\\n",6) != 0))\n\t\t{\n\t\tPEMerr(PEM_F_PEM_READ_BIO,PEM_R_BAD_END_LINE);\n\t\tgoto err;\n\t\t}\n\tEVP_DecodeInit(&ctx);\n\ti=EVP_DecodeUpdate(&ctx,\n\t\t(unsigned char *)dataB->data,&bl,\n\t\t(unsigned char *)dataB->data,bl);\n\tif (i < 0)\n\t\t{\n\t\tPEMerr(PEM_F_PEM_READ_BIO,PEM_R_BAD_BASE64_DECODE);\n\t\tgoto err;\n\t\t}\n\ti=EVP_DecodeFinal(&ctx,(unsigned char *)&(dataB->data[bl]),&k);\n\tif (i < 0)\n\t\t{\n\t\tPEMerr(PEM_F_PEM_READ_BIO,PEM_R_BAD_BASE64_DECODE);\n\t\tgoto err;\n\t\t}\n\tbl+=k;\n\tif (bl == 0) goto err;\n\t*name=nameB->data;\n\t*header=headerB->data;\n\t*data=(unsigned char *)dataB->data;\n\t*len=bl;\n\tOPENSSL_free(nameB);\n\tOPENSSL_free(headerB);\n\tOPENSSL_free(dataB);\n\treturn(1);\nerr:\n\tBUF_MEM_free(nameB);\n\tBUF_MEM_free(headerB);\n\tBUF_MEM_free(dataB);\n\treturn(0);\n\t}', 'BUF_MEM *BUF_MEM_new(void)\n\t{\n\tBUF_MEM *ret;\n\tret=OPENSSL_malloc(sizeof(BUF_MEM));\n\tif (ret == NULL)\n\t\t{\n\t\tBUFerr(BUF_F_BUF_MEM_NEW,ERR_R_MALLOC_FAILURE);\n\t\treturn(NULL);\n\t\t}\n\tret->length=0;\n\tret->max=0;\n\tret->data=NULL;\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}', 'void BUF_MEM_free(BUF_MEM *a)\n\t{\n\tif(a == NULL)\n\t    return;\n\tif (a->data != NULL)\n\t\t{\n\t\tmemset(a->data,0,(unsigned int)a->max);\n\t\tOPENSSL_free(a->data);\n\t\t}\n\tOPENSSL_free(a);\n\t}', 'unsigned long ERR_peek_error(void)\n\t{ return(get_error_values(0,0,NULL,NULL,NULL,NULL)); }']