crypto/rsa/rsa_eay.c:120: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, +oo] by call to `RSA_padding_add_PKCS1_OAEP`.
Showing all 14 steps of the trace


crypto/rsa/rsa_eay.c:106:6: Call
104.   	BN_init(&ret);
105.   	if ((ctx=BN_CTX_new()) == NULL) goto err;
106.   	num=BN_num_bytes(rsa->n);
            ^
107.   	if ((buf=(unsigned char *)Malloc(num)) == NULL)
108.   		{

crypto/bn/bn_lib.c:245:19: Assignment
  243.   	bn_check_top(a);
  244.   
  245.   	if (a->top == 0) return(0);
                           ^
  246.   	l=a->d[a->top-1];
  247.   	i=(a->top-1)*BN_BITS2;

crypto/rsa/rsa_eay.c:106:2: Assignment
104.   	BN_init(&ret);
105.   	if ((ctx=BN_CTX_new()) == NULL) goto err;
106.   	num=BN_num_bytes(rsa->n);
        ^
107.   	if ((buf=(unsigned char *)Malloc(num)) == NULL)
108.   		{

crypto/rsa/rsa_eay.c:107:28: Array declaration
105.   	if ((ctx=BN_CTX_new()) == NULL) goto err;
106.   	num=BN_num_bytes(rsa->n);
107.   	if ((buf=(unsigned char *)Malloc(num)) == NULL)
                                  ^
108.   		{
109.   		RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT,ERR_R_MALLOC_FAILURE);

crypto/rsa/rsa_eay.c:107:7: Assignment
105.   	if ((ctx=BN_CTX_new()) == NULL) goto err;
106.   	num=BN_num_bytes(rsa->n);
107.   	if ((buf=(unsigned char *)Malloc(num)) == NULL)
             ^
108.   		{
109.   		RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT,ERR_R_MALLOC_FAILURE);

crypto/rsa/rsa_eay.c:120:12: Call
118.   #ifndef NO_SHA
119.   	case RSA_PKCS1_OAEP_PADDING:
120.   	        i=RSA_padding_add_PKCS1_OAEP(buf,num,from,flen,NULL,0);
                  ^
121.   		break;
122.   #endif

crypto/rsa/rsa_oaep.c:17:1: Parameter `*to`
  15.   int MGF1(unsigned char *mask, long len, unsigned char *seed, long seedlen);
  16.   
  17. > int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
  18.   	     unsigned char *from, int flen, unsigned char *param, int plen)
  19.       {

crypto/rsa/rsa_oaep.c:45:5: Assignment
  43.   
  44.       to[0] = 0;
  45.       seed = to + 1;
            ^
  46.       db = to + SHA_DIGEST_LENGTH + 1;
  47.   

crypto/rsa/rsa_oaep.c:60:5: Call
  58.   #endif
  59.   
  60.       MGF1(dbmask, emlen - SHA_DIGEST_LENGTH, seed, SHA_DIGEST_LENGTH);
            ^
  61.       for (i = 0; i < emlen - SHA_DIGEST_LENGTH; i++)
  62.   	db[i] ^= dbmask[i];

crypto/rsa/rsa_oaep.c:134:1: Parameter `*seed`
    132.       }
    133.   
    134. > int MGF1(unsigned char *mask, long len, unsigned char *seed, long seedlen)
    135.       {
    136.       long i, outlen = 0;

crypto/rsa/rsa_oaep.c:146:2: Call
    144.   	  cnt[2] = (i >> 8) & 255, cnt[3] = i & 255;
    145.   	SHA1_Init(&c);
    146.   	SHA1_Update(&c, seed, seedlen);
            ^
    147.   	SHA1_Update(&c, cnt, 4);
    148.   	if (outlen + SHA_DIGEST_LENGTH <= len)

crypto/sha/sha1dgst.c:117:1: <Length trace>
115.   	}
116.   
117. > void SHA1_Update(SHA_CTX *c, register const unsigned char *data,
118.   	     unsigned long len)
119.   	{

crypto/sha/sha1dgst.c:117:1: Parameter `*data`
      115.   	}
      116.   
      117. > void SHA1_Update(SHA_CTX *c, register const unsigned char *data,
      118.   	     unsigned long len)
      119.   	{

crypto/sha/sha1dgst.c:252:4: Array access: Offset: [1, +oo] Size: [0, +oo] by call to `RSA_padding_add_PKCS1_OAEP` 
      250.   		for (sw=(SHA_LBLOCK/4); sw; sw--)
      251.   			{
      252.   			M_c2nl(data,l); p[0]=l;
                ^
      253.   			M_c2nl(data,l); p[1]=l;
      254.   			M_c2nl(data,l); p[2]=l;
