apps/s_client.c:345: 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:326:9: Call
324.           BIO_printf(bio_err, "SRP parameters:\n");
325.           BIO_printf(bio_err, "\tN=");
326.           BN_print(bio_err, N);
               ^
327.           BIO_printf(bio_err, "\n\tg=");
328.           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:328:9: Call
326.           BN_print(bio_err, N);
327.           BIO_printf(bio_err, "\n\tg=");
328.           BN_print(bio_err, g);
               ^
329.           BIO_printf(bio_err, "\n");
330.       }

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:332:9: Call
330.       }
331.   
332.       if (SRP_check_known_gN_param(g, N))
               ^
333.           return 1;
334.   

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

apps/s_client.c:345:13: Call
343.            * has already been tested.
344.            */
345.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                   ^
346.               return 1;
347.       }

crypto/bn/bn_lib.c:166:9: Call
  164.       bn_check_top(a);
  165.   
  166.       if (BN_is_zero(a))
                 ^
  167.           return 0;
  168.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));

crypto/bn/bn_lib.c:855:1: Parameter `a->top`
    853.   }
    854.   
    855. > int BN_is_zero(const BIGNUM *a)
    856.   {
    857.       return a->top == 0;

apps/s_client.c:345:42: Call
343.            * has already been tested.
344.            */
345.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                                                ^
346.               return 1;
347.       }

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

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

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

crypto/bn/bn_exp.c:146:15: Call
    144.   #ifdef RECP_MUL_MOD
    145.       {
    146.           ret = BN_mod_exp_recp(r, a, p, m, ctx);
                         ^
    147.       }
    148.   #else

crypto/bn/bn_exp.c:158:1: Parameter `a->top`
      156.   }
      157.   
      158. > int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
      159.                       const BIGNUM *m, BN_CTX *ctx)
      160.   {

crypto/bn/bn_exp.c:205:10: Call
      203.       }
      204.   
      205.       if (!BN_nnmod(val[0], a, m, ctx))
                      ^
      206.           goto err;               /* 1 */
      207.       if (BN_is_zero(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: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:323:1: <Offset trace>
321.   }
322.   
323. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
324.   {
325.       bn_check_top(b);

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

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

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

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

crypto/bn/bn_lib.c:951:1: Parameter `*a->d`
              949.   }
              950.   
              951. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
              952.   {
              953.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:333:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `srp_Verify_N_and_g` 
            331.   
            332.       if (b->top > 0)
            333.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                           ^
            334.   
            335.       if (BN_get_flags(b, BN_FLG_CONSTTIME) != 0)
