apps/s_client.c:341: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `srp_Verify_N_and_g`.
Showing all 27 steps of the trace


apps/s_client.c:322:9: Call
320.           BIO_printf(bio_err, "SRP parameters:\n");
321.           BIO_printf(bio_err, "\tN=");
322.           BN_print(bio_err, N);
               ^
323.           BIO_printf(bio_err, "\n\tg=");
324.           BN_print(bio_err, g);

crypto/bn/bn_print.c:304:1: Parameter `a->top`
  302.   # endif
  303.   
  304. > int BN_print(BIO *bp, const BIGNUM *a)
  305.   {
  306.       int i, j, v, z = 0;

apps/s_client.c:324:9: Call
322.           BN_print(bio_err, N);
323.           BIO_printf(bio_err, "\n\tg=");
324.           BN_print(bio_err, g);
               ^
325.           BIO_printf(bio_err, "\n");
326.       }

crypto/bn/bn_print.c:304:1: Parameter `a->top`
  302.   # endif
  303.   
  304. > int BN_print(BIO *bp, const BIGNUM *a)
  305.   {
  306.       int i, j, v, z = 0;

apps/s_client.c:328:9: Call
326.       }
327.   
328.       if (SRP_check_known_gN_param(g, N))
               ^
329.           return 1;
330.   

crypto/srp/srp_lib.c:259:1: Parameter `g->top`
  257.    * from the ietf-tls-srp draft version 8
  258.    */
  259. > char *SRP_check_known_gN_param(const BIGNUM *g, const BIGNUM *N)
  260.   {
  261.       size_t i;

apps/s_client.c:341:13: Call
339.            * has already been tested.
340.            */
341.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                   ^
342.               return 1;
343.       }

crypto/bn/bn_lib.c:139:9: Call
  137.       bn_check_top(a);
  138.   
  139.       if (BN_is_zero(a))
                 ^
  140.           return 0;
  141.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));

crypto/bn/bn_lib.c:846:1: Parameter `a->top`
    844.   }
    845.   
    846. > int BN_is_zero(const BIGNUM *a)
    847.   {
    848.       return a->top == 0;

apps/s_client.c:341:42: Call
339.            * has already been tested.
340.            */
341.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                                                ^
342.               return 1;
343.       }

apps/s_client.c:274:1: Parameter `g->top`
  272.   # define SRP_NUMBER_ITERATIONS_FOR_PRIME 64
  273.   
  274. > static int srp_Verify_N_and_g(const BIGNUM *N, const BIGNUM *g)
  275.   {
  276.       BN_CTX *bn_ctx = BN_CTX_new();

apps/s_client.c:287:9: Call
  285.           r != NULL &&
  286.           /* verify g^((N-1)/2) == -1 (mod N) */
  287.           BN_mod_exp(r, g, p, N, bn_ctx) &&
                 ^
  288.           BN_add_word(r, 1) && BN_cmp(r, N) == 0;
  289.   

crypto/bn/bn_exp.c:89:1: Parameter `a->top`
    87.   }
    88.   
    89. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
    90.                  BN_CTX *ctx)
    91.   {

crypto/bn/bn_exp.c:144:19: Call
    142.           } else
    143.   # endif
    144.               ret = BN_mod_exp_mont(r, a, p, m, ctx, NULL);
                             ^
    145.       } else
    146.   #endif

crypto/bn/bn_exp.c:296:1: Parameter `a->top`
      294.   }
      295.   
      296. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      297.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
      298.   {

crypto/bn/bn_exp.c:354:14: Call
      352.   
      353.       if (a->neg || BN_ucmp(a, m) >= 0) {
      354.           if (!BN_nnmod(val[0], a, m, ctx))
                          ^
      355.               goto err;
      356.           aa = val[0];

crypto/bn/bn_mod.c:13:1: Parameter `*r->d`
        11.   #include "bn_lcl.h"
        12.   
        13. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
        14.   {
        15.       /*

crypto/bn/bn_mod.c:20:11: Call
        18.        */
        19.   
        20.       if (!(BN_mod(r, m, d, ctx)))
                        ^
        21.           return 0;
        22.       if (!r->neg)

crypto/bn/bn_div.c:137:1: Parameter `*rm->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.   {

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

crypto/bn/bn_lib.c:280:1: <Offset trace>
278.   }
279.   
280. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
281.   {
282.       bn_check_top(b);

crypto/bn/bn_lib.c:280:1: Parameter `b->top`
            278.   }
            279.   
            280. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
            281.   {
            282.       bn_check_top(b);

crypto/bn/bn_lib.c:280:1: <Length trace>
278.   }
279.   
280. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
281.   {
282.       bn_check_top(b);

crypto/bn/bn_lib.c:280:1: Parameter `*a->d`
            278.   }
            279.   
            280. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
            281.   {
            282.       bn_check_top(b);

crypto/bn/bn_lib.c:286:9: Call
            284.       if (a == b)
            285.           return a;
            286.       if (bn_wexpand(a, b->top) == NULL)
                           ^
            287.           return NULL;
            288.   

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

crypto/bn/bn_lib.c:290:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `srp_Verify_N_and_g` 
            288.   
            289.       if (b->top > 0)
            290.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                           ^
            291.   
            292.       a->neg = b->neg;
