test/bntest.c:1964: error: BUFFER_OVERRUN_L3
  Offset added: 8 Size: [0, 536870848] by call to `BN_div`.
Showing all 12 steps of the trace


test/bntest.c:1964:22: Call
1962.       BN_zero(zero);
1963.   
1964.       if (BN_div(a, b, BN_value_one(), zero, ctx)) {
                             ^
1965.           fprintf(stderr, "Division by zero succeeded!\n");
1966.           goto err;

crypto/bn/bn_lib.c:84:9: Assignment
  82.       static const BN_ULONG data_one = 1L;
  83.       static const BIGNUM const_one =
  84.           { (BN_ULONG *)&data_one, 1, 1, 0, BN_FLG_STATIC_DATA };
                ^
  85.   
  86.       return (&const_one);

test/bntest.c:1964:9: Call
1962.       BN_zero(zero);
1963.   
1964.       if (BN_div(a, b, BN_value_one(), zero, ctx)) {
                ^
1965.           fprintf(stderr, "Division by zero succeeded!\n");
1966.           goto err;

crypto/bn/bn_div.c:140:1: Parameter `*rm->d`
  138.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
  139.    */
  140. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
  141.              BN_CTX *ctx)
  142.   {

crypto/bn/bn_div.c:185:17: Call
  183.       if (!no_branch && BN_ucmp(num, divisor) < 0) {
  184.           if (rm != NULL) {
  185.               if (BN_copy(rm, num) == NULL)
                         ^
  186.                   return (0);
  187.           }

crypto/bn/bn_lib.c:322:1: <Offset trace>
320.   }
321.   
322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
323.   {
324.       bn_check_top(b);

crypto/bn/bn_lib.c:322:1: Parameter `b->top`
    320.   }
    321.   
    322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    323.   {
    324.       bn_check_top(b);

crypto/bn/bn_lib.c:322:1: <Length trace>
320.   }
321.   
322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
323.   {
324.       bn_check_top(b);

crypto/bn/bn_lib.c:322:1: Parameter `*a->d`
    320.   }
    321.   
    322. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
    323.   {
    324.       bn_check_top(b);

crypto/bn/bn_lib.c:328:9: Call
    326.       if (a == b)
    327.           return a;
    328.       if (bn_wexpand(a, b->top) == NULL)
                   ^
    329.           return NULL;
    330.   

crypto/bn/bn_lib.c:946:1: Parameter `*a->d`
      944.   }
      945.   
      946. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
      947.   {
      948.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:331:5: Array access: Offset added: 8 Size: [0, 536870848] by call to `BN_div` 
    329.           return NULL;
    330.   
    331.       memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
               ^
    332.   
    333.       a->top = b->top;
