test/bntest.c:1282: error: BUFFER_OVERRUN_L2
  Offset: [0, 18446744073709551615] Size: 256 by call to `BN_div_word`.
Showing all 14 steps of the trace


test/bntest.c:1263:10: Call
1261.           goto err;
1262.   
1263.       if (!TEST_true(BN_div(ret, ret2, a, b, ctx))
                 ^
1264.               || !equalBN("A / B", quotient, ret)
1265.               || !equalBN("A % B", remainder, ret2)

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

test/bntest.c:1275:14: Call
1273.        * small enough.
1274.        */
1275.       b_word = BN_get_word(b);
                     ^
1276.       if (!BN_is_negative(b) && b_word != (BN_ULONG)-1) {
1277.           BN_ULONG remainder_word = BN_get_word(remainder);

crypto/bn/bn_lib.c:377:9: Assignment
  375.   {
  376.       if (a->top > 1)
  377.           return BN_MASK2;
                 ^
  378.       else if (a->top == 1)
  379.           return a->d[0];

test/bntest.c:1275:5: Assignment
1273.        * small enough.
1274.        */
1275.       b_word = BN_get_word(b);
            ^
1276.       if (!BN_is_negative(b) && b_word != (BN_ULONG)-1) {
1277.           BN_ULONG remainder_word = BN_get_word(remainder);

test/bntest.c:1282:20: Call
1280.           if (!TEST_ptr(BN_copy(ret, a)))
1281.               goto err;
1282.           ret_word = BN_div_word(ret, b_word);
                           ^
1283.           if (ret_word != remainder_word) {
1284.   #ifdef BN_DEC_FMT1

crypto/bn/bn_word.c:61:1: Parameter `w`
  59.   }
  60.   
  61. > BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w)
  62.   {
  63.       BN_ULONG ret = 0;

crypto/bn/bn_word.c:67:5: Assignment
  65.   
  66.       bn_check_top(a);
  67.       w &= BN_MASK2;
            ^
  68.   
  69.       if (!w)

crypto/bn/bn_word.c:76:20: Call
  74.   
  75.       /* normalize input (so bn_div_words doesn't complain) */
  76.       j = BN_BITS2 - BN_num_bits_word(w);
                           ^
  77.       w <<= j;
  78.       if (!BN_lshift(a, a, j))

crypto/bn/bn_lib.c:89:1: <Offset trace>
87.   }
88.   
89. > int BN_num_bits_word(BN_ULONG l)
90.   {
91.       static const unsigned char bits[256] = {

crypto/bn/bn_lib.c:89:1: Parameter `l`
    87.   }
    88.   
    89. > int BN_num_bits_word(BN_ULONG l)
    90.   {
    91.       static const unsigned char bits[256] = {

crypto/bn/bn_lib.c:91:5: <Length trace>
89.   int BN_num_bits_word(BN_ULONG l)
90.   {
91.       static const unsigned char bits[256] = {
          ^
92.           0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
93.           5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,

crypto/bn/bn_lib.c:91:5: Array declaration
    89.   int BN_num_bits_word(BN_ULONG l)
    90.   {
    91.       static const unsigned char bits[256] = {
              ^
    92.           0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
    93.           5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,

crypto/bn/bn_lib.c:114:25: Array access: Offset: [0, 18446744073709551615] Size: 256 by call to `BN_div_word` 
    112.           if (l & 0xffff000000000000L) {
    113.               if (l & 0xff00000000000000L) {
    114.                   return (bits[(int)(l >> 56)] + 56);
                                   ^
    115.               } else
    116.                   return (bits[(int)(l >> 48)] + 48);
