test/bntest.c:1916: error: BUFFER_OVERRUN_L3
  Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, 8388607] by call to `BN_lshift1`.
Showing all 15 steps of the trace


test/bntest.c:1913:5: Call
1911.       c = BN_new();
1912.   
1913.       BN_bntest_rand(a, 200, 0, 0);
            ^
1914.       a->neg = rand_neg();
1915.       for (i = 0; i < num0; i++) {

crypto/bn/bn_rand.c:209:1: Parameter `*rnd->d`
  207.   }
  208.   
  209. > int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)
  210.   {
  211.       return bnrand(2, rnd, bits, top, bottom);

crypto/bn/bn_rand.c:211:12: Call
  209.   int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom)
  210.   {
  211.       return bnrand(2, rnd, bits, top, bottom);
                    ^
  212.   }
  213.   

crypto/bn/bn_rand.c:118:1: Parameter `*rnd->d`
    116.   #include <openssl/sha.h>
    117.   
    118. > static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
    119.   {
    120.       unsigned char *buf = NULL;

test/bntest.c:1916:9: Call
1914.       a->neg = rand_neg();
1915.       for (i = 0; i < num0; i++) {
1916.           BN_lshift1(b, a);
                ^
1917.           if (bp != NULL) {
1918.               if (!results) {

crypto/bn/bn_shift.c:61:1: Parameter `*r->d`
  59.   #include "bn_lcl.h"
  60.   
  61. > int BN_lshift1(BIGNUM *r, const BIGNUM *a)
  62.   {
  63.       register BN_ULONG *ap, *rp, t, c;

crypto/bn/bn_shift.c:75:13: Call
  73.           r->top = a->top;
  74.       } else {
  75.           if (bn_wexpand(r, a->top + 1) == NULL)
                    ^
  76.               return (0);
  77.       }

crypto/bn/bn_lib.c:994:1: Parameter `*a->d`
    992.   }
    993.   
    994. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
    995.   {
    996.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:996:37: Call
    994.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
    995.   {
    996.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                               ^
    997.   }
    998.   

crypto/bn/bn_lib.c:389:1: Parameter `*b->d`
      387.    */
      388.   
      389. > BIGNUM *bn_expand2(BIGNUM *b, int words)
      390.   {
      391.       bn_check_top(b);

crypto/bn/bn_lib.c:394:23: Call
      392.   
      393.       if (words > b->dmax) {
      394.           BN_ULONG *a = bn_expand_internal(b, words);
                                   ^
      395.           if (!a)
      396.               return NULL;

crypto/bn/bn_lib.c:299:1: <Length trace>
297.   /* This is used by bn_expand2() */
298.   /* The caller MUST check that words > b->dmax before calling this */
299. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
300.   {
301.       BN_ULONG *A, *a = NULL;

crypto/bn/bn_lib.c:299:1: Parameter `*b->d`
        297.   /* This is used by bn_expand2() */
        298.   /* The caller MUST check that words > b->dmax before calling this */
        299. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
        300.   {
        301.       BN_ULONG *A, *a = NULL;

crypto/bn/bn_lib.c:334:5: Assignment
        332.   
        333.   #if 1
        334.       B = b->d;
                   ^
        335.       /* Check if the previous number needs to be copied */
        336.       if (B != NULL) {

crypto/bn/bn_lib.c:351:18: Array access: Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, 8388607] by call to `BN_lshift1` 
        349.               a1 = B[1];
        350.               a2 = B[2];
        351.               a3 = B[3];
                                ^
        352.               A[0] = a0;
        353.               A[1] = a1;
