test/bntest.c:288: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_div_recp`.
Showing all 16 steps of the trace


test/bntest.c:287:9: Call
285.           BN_set_negative(a, rand_neg());
286.           BN_set_negative(b, rand_neg());
287.           BN_RECP_CTX_set(recp, b, ctx);
               ^
288.           BN_div_recp(d, c, a, recp, ctx);
289.           BN_mul(e, d, b, ctx);

crypto/bn/bn_recp.c:45:1: Parameter `*recp->Nr.d`
  43.   }
  44.   
  45. > int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx)
  46.   {
  47.       if (!BN_copy(&(recp->N), d))

test/bntest.c:288:9: Call
286.           BN_set_negative(b, rand_neg());
287.           BN_RECP_CTX_set(recp, b, ctx);
288.           BN_div_recp(d, c, a, recp, ctx);
               ^
289.           BN_mul(e, d, b, ctx);
290.           BN_add(d, e, c);

crypto/bn/bn_recp.c:84:1: Parameter `*recp->Nr.d`
  82.   }
  83.   
  84. > int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
  85.                   BN_RECP_CTX *recp, BN_CTX *ctx)
  86.   {

crypto/bn/bn_recp.c:121:23: Call
  119.       /* Nr := round(2^i / N) */
  120.       if (i != recp->shift)
  121.           recp->shift = BN_reciprocal(&(recp->Nr), &(recp->N), i, ctx);
                               ^
  122.       /* BN_reciprocal could have returned -1 for an error */
  123.       if (recp->shift == -1)

crypto/bn/bn_recp.c:174:1: Parameter `*r->d`
    172.    */
    173.   /* r := 2^len / m */
    174. > int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx)
    175.   {
    176.       int ret = -1;

crypto/bn/bn_recp.c:186:10: Call
    184.           goto err;
    185.   
    186.       if (!BN_div(r, NULL, t, m, ctx))
                    ^
    187.           goto err;
    188.   

crypto/bn/bn_div.c:229:11: Call
      227.       }
      228.   
      229.       ret = bn_div_fixed_top(dv, rm, num, divisor, ctx);
                       ^
      230.   
      231.       if (ret) {

crypto/bn/bn_div.c:264:1: Parameter `dv->top`
        262.    *       divisor's length is considered public;
        263.    */
        264. > int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
        265.                        const BIGNUM *divisor, BN_CTX *ctx)
        266.   {

crypto/bn/bn_div.c:233:13: Call
      231.       if (ret) {
      232.           if (dv != NULL)
      233.               bn_correct_top(dv);
                         ^
      234.           if (rm != NULL)
      235.               bn_correct_top(rm);

crypto/bn/bn_lib.c:944:1: <Offset trace>
942.   }
943.   
944. > void bn_correct_top(BIGNUM *a)
945.   {
946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:944:1: Parameter `a->top`
        942.   }
        943.   
        944. > void bn_correct_top(BIGNUM *a)
        945.   {
        946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:947:5: Assignment
        945.   {
        946.       BN_ULONG *ftl;
        947.       int tmp_top = a->top;
                   ^
        948.   
        949.       if (tmp_top > 0) {

crypto/bn/bn_lib.c:944:1: <Length trace>
942.   }
943.   
944. > void bn_correct_top(BIGNUM *a)
945.   {
946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:944:1: Parameter `*a->d`
        942.   }
        943.   
        944. > void bn_correct_top(BIGNUM *a)
        945.   {
        946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:950:14: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_div_recp` 
        948.   
        949.       if (tmp_top > 0) {
        950.           for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
                            ^
        951.               ftl--;
        952.               if (*ftl != 0)
