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:844:1: Parameter `a->top`
    842.   }
    843.   
    844. > int BN_is_zero(const BIGNUM *a)
    845.   {
    846.       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: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:149:15: Call
    147.   #ifdef RECP_MUL_MOD
    148.       {
    149.           ret = BN_mod_exp_recp(r, a, p, m, ctx);
                         ^
    150.       }
    151.   #else

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

crypto/bn/bn_exp.c:210:10: Call
      208.       }
      209.   
      210.       if (!BN_nnmod(val[0], a, m, ctx))
                      ^
      211.           goto err;               /* 1 */
      212.       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: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:312:1: <Offset trace>
310.   }
311.   
312. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
313.   {
314.       bn_check_top(b);

crypto/bn/bn_lib.c:312:1: Parameter `b->top`
            310.   }
            311.   
            312. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
            313.   {
            314.       bn_check_top(b);

crypto/bn/bn_lib.c:312:1: <Length trace>
310.   }
311.   
312. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
313.   {
314.       bn_check_top(b);

crypto/bn/bn_lib.c:312:1: Parameter `*a->d`
            310.   }
            311.   
            312. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
            313.   {
            314.       bn_check_top(b);

crypto/bn/bn_lib.c:318:9: Call
            316.       if (a == b)
            317.           return a;
            318.       if (bn_wexpand(a, b->top) == NULL)
                           ^
            319.           return NULL;
            320.   

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

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