crypto/rsa/rsa_ossl.c:199: error: BUFFER_OVERRUN_L3
  Offset: [2, +oo] Size: [1, +oo] by call to `RSA_padding_add_SSLv23`.
Showing all 13 steps of the trace


crypto/rsa/rsa_ossl.c:184:11: Call
182.       f = BN_CTX_get(ctx);
183.       ret = BN_CTX_get(ctx);
184.       num = BN_num_bytes(rsa->n);
                 ^
185.       buf = OPENSSL_malloc(num);
186.       if (f == NULL || ret == NULL || buf == NULL) {

crypto/bn/bn_lib.c:221:9: Assignment
  219.   
  220.       if (BN_is_zero(a))
  221.           return 0;
                 ^
  222.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));
  223.   }

crypto/rsa/rsa_ossl.c:184:5: Assignment
182.       f = BN_CTX_get(ctx);
183.       ret = BN_CTX_get(ctx);
184.       num = BN_num_bytes(rsa->n);
           ^
185.       buf = OPENSSL_malloc(num);
186.       if (f == NULL || ret == NULL || buf == NULL) {

crypto/rsa/rsa_ossl.c:185:11: Call
183.       ret = BN_CTX_get(ctx);
184.       num = BN_num_bytes(rsa->n);
185.       buf = OPENSSL_malloc(num);
                 ^
186.       if (f == NULL || ret == NULL || buf == NULL) {
187.           RSAerr(RSA_F_RSA_OSSL_PUBLIC_ENCRYPT, ERR_R_MALLOC_FAILURE);

crypto/mem.c:125:9: Assignment
  123.   
  124.       if (num <= 0)
  125.           return NULL;
                 ^
  126.   
  127.       allow_customize = 0;

crypto/rsa/rsa_ossl.c:185:5: Assignment
183.       ret = BN_CTX_get(ctx);
184.       num = BN_num_bytes(rsa->n);
185.       buf = OPENSSL_malloc(num);
           ^
186.       if (f == NULL || ret == NULL || buf == NULL) {
187.           RSAerr(RSA_F_RSA_OSSL_PUBLIC_ENCRYPT, ERR_R_MALLOC_FAILURE);

crypto/rsa/rsa_ossl.c:199:13: Call
197.           break;
198.       case RSA_SSLV23_PADDING:
199.           i = RSA_padding_add_SSLv23(buf, num, from, flen);
                   ^
200.           break;
201.       case RSA_NO_PADDING:

crypto/rsa/rsa_ssl.c:65:1: <Length trace>
63.   #include <openssl/rand.h>
64.   
65. > int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
66.                              const unsigned char *from, int flen)
67.   {

crypto/rsa/rsa_ssl.c:65:1: Parameter `*to`
  63.   #include <openssl/rand.h>
  64.   
  65. > int RSA_padding_add_SSLv23(unsigned char *to, int tlen,
  66.                              const unsigned char *from, int flen)
  67.   {

crypto/rsa/rsa_ssl.c:77:5: Assignment
  75.       }
  76.   
  77.       p = (unsigned char *)to;
            ^
  78.   
  79.       *(p++) = 0;

crypto/rsa/rsa_ssl.c:79:7: Assignment
  77.       p = (unsigned char *)to;
  78.   
  79.       *(p++) = 0;
              ^
  80.       *(p++) = 2;                 /* Public Key BT (Block Type) */
  81.   

crypto/rsa/rsa_ssl.c:80:7: Assignment
  78.   
  79.       *(p++) = 0;
  80.       *(p++) = 2;                 /* Public Key BT (Block Type) */
              ^
  81.   
  82.       /* pad out with non-zero random data */

crypto/rsa/rsa_ssl.c:88:13: Array access: Offset: [2, +oo] Size: [1, +oo] by call to `RSA_padding_add_SSLv23` 
  86.           return (0);
  87.       for (i = 0; i < j; i++) {
  88.           if (*p == '\0')
                    ^
  89.               do {
  90.                   if (RAND_bytes(p, 1) <= 0)
