crypto/rsa/rsa_oaep.c:115: error: BUFFER_OVERRUN_L2
  Offset: [20, -21+max(41, `num`)] Size: [-21+max(42, `num`), `num` - 21].
Showing all 9 steps of the trace


crypto/rsa/rsa_oaep.c:103:10: <Offset trace>
101.     
102.       MGF1(db, dblen, seed, SHA_DIGEST_LENGTH);
103.       for (i = 0; i < dblen; i++)
                ^
104.   	db[i] ^= maskeddb[i];
105.   

crypto/rsa/rsa_oaep.c:103:10: Assignment
101.     
102.       MGF1(db, dblen, seed, SHA_DIGEST_LENGTH);
103.       for (i = 0; i < dblen; i++)
                ^
104.   	db[i] ^= maskeddb[i];
105.   

crypto/rsa/rsa_oaep.c:72:1: <Length trace>
70.       }
71.   
72. > int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
73.   	     unsigned char *from, int flen, int num, unsigned char *param,
74.   	     int plen)

crypto/rsa/rsa_oaep.c:72:1: Parameter `num`
70.       }
71.   
72. > int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
73.   	     unsigned char *from, int flen, int num, unsigned char *param,
74.   	     int plen)

crypto/rsa/rsa_oaep.c:81:9: Assignment
79.       unsigned char *db, seed[SHA_DIGEST_LENGTH], phash[SHA_DIGEST_LENGTH];
80.   
81.       if (--num < 2 * SHA_DIGEST_LENGTH + 1)
              ^
82.   	{
83.   	RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, RSA_R_OAEP_DECODING_ERROR);

crypto/rsa/rsa_oaep.c:87:5: Assignment
85.   	}
86.   
87.       dblen = num - SHA_DIGEST_LENGTH;
          ^
88.       db = Malloc(dblen);
89.       if (db == NULL)

crypto/rsa/rsa_oaep.c:88:10: Array declaration
86.   
87.       dblen = num - SHA_DIGEST_LENGTH;
88.       db = Malloc(dblen);
               ^
89.       if (db == NULL)
90.   	{

crypto/rsa/rsa_oaep.c:88:5: Assignment
86.   
87.       dblen = num - SHA_DIGEST_LENGTH;
88.       db = Malloc(dblen);
          ^
89.       if (db == NULL)
90.   	{

crypto/rsa/rsa_oaep.c:115:6: Array access: Offset: [20, -21+max(41, num)] Size: [-21+max(42, num), num - 21]
113.   	    if (db[i] != 0x00)
114.   		break;
115.   	if (db[i] != 0x01 || i++ >= dblen)
            ^
116.   	    RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP,
117.   		   RSA_R_OAEP_DECODING_ERROR);
