crypto/asn1/p5_pbe.c:144: error: BUFFER_OVERRUN_L3
  Offset: [2, +oo] (⇐ [2, +oo] + [0, +oo]) Size: [0, +oo] by call to `i2d_PBEPARAM`.
Showing all 22 steps of the trace


crypto/asn1/p5_pbe.c:135:15: Call
133.   	if (salt) memcpy (pbe->salt->data, salt, saltlen);
134.   	else RAND_bytes (pbe->salt->data, saltlen);
135.   	if (!(plen = i2d_PBEPARAM (pbe, NULL))) {
                     ^
136.   		ASN1err(ASN1_F_ASN1_PBE_SET,ASN1_R_ENCODE_ERROR);
137.   		return NULL;

crypto/asn1/p5_pbe.c:70:2: Assignment
  68.   int i2d_PBEPARAM(PBEPARAM *a, unsigned char **pp)
  69.   {
  70.   	M_ASN1_I2D_vars(a);
         ^
  71.   	M_ASN1_I2D_len (a->salt, i2d_ASN1_OCTET_STRING);
  72.   	M_ASN1_I2D_len (a->iter, i2d_ASN1_INTEGER);

crypto/asn1/p5_pbe.c:135:8: Assignment
133.   	if (salt) memcpy (pbe->salt->data, salt, saltlen);
134.   	else RAND_bytes (pbe->salt->data, saltlen);
135.   	if (!(plen = i2d_PBEPARAM (pbe, NULL))) {
              ^
136.   		ASN1err(ASN1_F_ASN1_PBE_SET,ASN1_R_ENCODE_ERROR);
137.   		return NULL;

crypto/asn1/p5_pbe.c:139:16: Array declaration
137.   		return NULL;
138.   	}
139.   	if (!(pdata = Malloc (plen))) {
                      ^
140.   		ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE);
141.   		return NULL;

crypto/asn1/p5_pbe.c:139:8: Assignment
137.   		return NULL;
138.   	}
139.   	if (!(pdata = Malloc (plen))) {
              ^
140.   		ASN1err(ASN1_F_ASN1_PBE_SET,ERR_R_MALLOC_FAILURE);
141.   		return NULL;

crypto/asn1/p5_pbe.c:143:2: Assignment
141.   		return NULL;
142.   	}
143.   	ptmp = pdata;
        ^
144.   	i2d_PBEPARAM (pbe, &ptmp);
145.   	PBEPARAM_free (pbe);

crypto/asn1/p5_pbe.c:144:2: Call
142.   	}
143.   	ptmp = pdata;
144.   	i2d_PBEPARAM (pbe, &ptmp);
        ^
145.   	PBEPARAM_free (pbe);
146.   

crypto/asn1/p5_pbe.c:68:1: Parameter `**pp`
  66.   #define PKCS5_SALT_LEN	8
  67.   
  68. > int i2d_PBEPARAM(PBEPARAM *a, unsigned char **pp)
  69.   {
  70.   	M_ASN1_I2D_vars(a);

crypto/asn1/p5_pbe.c:74:2: Assignment
  72.   	M_ASN1_I2D_len (a->iter, i2d_ASN1_INTEGER);
  73.   
  74.   	M_ASN1_I2D_seq_total ();
         ^
  75.   
  76.   	M_ASN1_I2D_put (a->salt, i2d_ASN1_OCTET_STRING);

crypto/asn1/p5_pbe.c:74:2: Call
  72.   	M_ASN1_I2D_len (a->iter, i2d_ASN1_INTEGER);
  73.   
  74.   	M_ASN1_I2D_seq_total ();
         ^
  75.   
  76.   	M_ASN1_I2D_put (a->salt, i2d_ASN1_OCTET_STRING);

crypto/asn1/asn1_lib.c:180:1: Parameter `**pp`
    178.   /* class 0 is constructed
    179.    * constructed == 2 for indefinitle length constructed */
    180. > void ASN1_put_object(unsigned char **pp, int constructed, int length, int tag,
    181.   	     int xclass)
    182.   	{

crypto/asn1/asn1_lib.c:183:2: Assignment
    181.   	     int xclass)
    182.   	{
    183.   	unsigned char *p= *pp;
            ^
    184.   	int i;
    185.   

crypto/asn1/asn1_lib.c:189:5: Assignment
    187.   	i|=(xclass&V_ASN1_PRIVATE);
    188.   	if (tag < 31)
    189.   		*(p++)=i|(tag&V_ASN1_PRIMATIVE_TAG);
               ^
    190.   	else
    191.   		{

crypto/asn1/asn1_lib.c:203:3: Call
    201.   		*(p++)=0x80; /* der_put_length would output 0 instead */
    202.   	else
    203.   		asn1_put_length(&p,length);
             ^
    204.   	*pp=p;
    205.   	}

crypto/asn1/asn1_lib.c:216:8: <Offset trace>
214.   		{
215.   		l=length;
216.   		for (i=0; l > 0; i++)
              ^
217.   			l>>=8;
218.   		*(p++)=i|0x80;

crypto/asn1/asn1_lib.c:216:8: Assignment
      214.   		{
      215.   		l=length;
      216.   		for (i=0; l > 0; i++)
                    ^
      217.   			l>>=8;
      218.   		*(p++)=i|0x80;

crypto/asn1/asn1_lib.c:220:10: Assignment
      218.   		*(p++)=i|0x80;
      219.   		l=i;
      220.   		while (i-- > 0)
                      ^
      221.   			{
      222.   			p[i]=length&0xff;

crypto/asn1/asn1_lib.c:207:1: <Length trace>
205.   	}
206.   
207. > static void asn1_put_length(unsigned char **pp, int length)
208.   	{
209.   	unsigned char *p= *pp;

crypto/asn1/asn1_lib.c:207:1: Parameter `**pp`
      205.   	}
      206.   
      207. > static void asn1_put_length(unsigned char **pp, int length)
      208.   	{
      209.   	unsigned char *p= *pp;

crypto/asn1/asn1_lib.c:209:2: Assignment
      207.   static void asn1_put_length(unsigned char **pp, int length)
      208.   	{
      209.   	unsigned char *p= *pp;
              ^
      210.   	int i,l;
      211.   	if (length <= 127)

crypto/asn1/asn1_lib.c:218:5: Assignment
      216.   		for (i=0; l > 0; i++)
      217.   			l>>=8;
      218.   		*(p++)=i|0x80;
                 ^
      219.   		l=i;
      220.   		while (i-- > 0)

crypto/asn1/asn1_lib.c:222:4: Array access: Offset: [2, +oo] (⇐ [2, +oo] + [0, +oo]) Size: [0, +oo] by call to `i2d_PBEPARAM` 
      220.   		while (i-- > 0)
      221.   			{
      222.   			p[i]=length&0xff;
                ^
      223.   			length>>=8;
      224.   			}
