apps/s_client.c:412: error: BUFFER_OVERRUN_L3
  Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `srp_Verify_N_and_g`.
Showing all 34 steps of the trace


apps/s_client.c:393:9: Call
391.           BIO_printf(bio_err, "SRP parameters:\n");
392.           BIO_printf(bio_err, "\tN=");
393.           BN_print(bio_err, N);
               ^
394.           BIO_printf(bio_err, "\n\tg=");
395.           BN_print(bio_err, g);

crypto/bn/bn_print.c:348:1: Parameter `a->top`
  346.   # endif
  347.   
  348. > int BN_print(BIO *bp, const BIGNUM *a)
  349.   {
  350.       int i, j, v, z = 0;

apps/s_client.c:395:9: Call
393.           BN_print(bio_err, N);
394.           BIO_printf(bio_err, "\n\tg=");
395.           BN_print(bio_err, g);
               ^
396.           BIO_printf(bio_err, "\n");
397.       }

crypto/bn/bn_print.c:348:1: Parameter `a->top`
  346.   # endif
  347.   
  348. > int BN_print(BIO *bp, const BIGNUM *a)
  349.   {
  350.       int i, j, v, z = 0;

apps/s_client.c:399:9: Call
397.       }
398.   
399.       if (SRP_check_known_gN_param(g, N))
               ^
400.           return 1;
401.   

crypto/srp/srp_lib.c:339:1: Parameter `g->top`
  337.    * from the ietf-tls-srp draft version 8
  338.    */
  339. > char *SRP_check_known_gN_param(BIGNUM *g, BIGNUM *N)
  340.   {
  341.       size_t i;

apps/s_client.c:412:13: Call
410.            * has already been tested.
411.            */
412.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                   ^
413.               return 1;
414.       }

crypto/bn/bn_lib.c:219:9: Call
  217.       bn_check_top(a);
  218.   
  219.       if (BN_is_zero(a))
                 ^
  220.           return 0;
  221.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));

crypto/bn/bn_lib.c:971:1: Parameter `a->top`
    969.   }
    970.   
    971. > int BN_is_zero(const BIGNUM *a)
    972.   {
    973.       return a->top == 0;

apps/s_client.c:412:42: Call
410.            * has already been tested.
411.            */
412.           if (BN_num_bits(g) <= BN_BITS && srp_Verify_N_and_g(N, g))
                                                ^
413.               return 1;
414.       }

apps/s_client.c:345:1: Parameter `g->top`
  343.   # define SRP_NUMBER_ITERATIONS_FOR_PRIME 64
  344.   
  345. > static int srp_Verify_N_and_g(const BIGNUM *N, const BIGNUM *g)
  346.   {
  347.       BN_CTX *bn_ctx = BN_CTX_new();

apps/s_client.c:358:9: Call
  356.           r != NULL &&
  357.           /* verify g^((N-1)/2) == -1 (mod N) */
  358.           BN_mod_exp(r, g, p, N, bn_ctx) &&
                 ^
  359.           BN_add_word(r, 1) && BN_cmp(r, N) == 0;
  360.   

crypto/bn/bn_exp.c:191:1: Parameter `a->top`
    189.   }
    190.   
    191. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
    192.                  BN_CTX *ctx)
    193.   {

crypto/bn/bn_exp.c:251:19: Call
    249.           } else
    250.   # endif
    251.               ret = BN_mod_exp_mont(r, a, p, m, ctx, NULL);
                             ^
    252.       } else
    253.   #endif

crypto/bn/bn_exp.c:401:1: Parameter `a->top`
      399.   }
      400.   
      401. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      402.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
      403.   {

crypto/bn/bn_exp.c:413:16: Call
      411.   
      412.       if (BN_get_flags(p, BN_FLG_CONSTTIME) != 0) {
      413.           return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                            ^
      414.       }
      415.   

crypto/bn/bn_exp.c:693:1: Parameter `a->top`
        691.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
        692.    */
        693. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
        694.                                 const BIGNUM *m, BN_CTX *ctx,
        695.                                 BN_MONT_CTX *in_mont)

crypto/bn/bn_exp.c:850:17: Call
        848.           if (!BN_to_montgomery(&am, &am, mont, ctx))
        849.               goto err;
        850.       } else if (!BN_to_montgomery(&am, a, mont, ctx))
                               ^
        851.           goto err;
        852.   

crypto/bn/bn_lib.c:996:1: Parameter `a->top`
          994.   }
          995.   
          996. > int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
          997.                        BN_CTX *ctx)
          998.   {

crypto/bn/bn_lib.c:999:12: Call
          997.                        BN_CTX *ctx)
          998.   {
          999.       return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx);
                             ^
          1000.   }
          1001.   

crypto/bn/bn_mont.c:127:1: Parameter `a->top`
            125.   #endif
            126.   
            127. > int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
            128.                             BN_MONT_CTX *mont, BN_CTX *ctx)
            129.   {

crypto/bn/bn_mont.c:154:14: Call
            152.       bn_check_top(tmp);
            153.       if (a == b) {
            154.           if (!BN_sqr(tmp, a, ctx))
                                ^
            155.               goto err;
            156.       } else {

crypto/bn/bn_sqr.c:65:1: Parameter `a->top`
              63.    * I've just gone over this and it is now %20 faster on x86 - eay - 27 Jun 96
              64.    */
              65. > int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
              66.   {
              67.       int max, al;

crypto/bn/bn_sqr.c:73:5: Assignment
              71.       bn_check_top(a);
              72.   
              73.       al = a->top;
                        ^
              74.       if (al <= 0) {
              75.           r->top = 0;

crypto/bn/bn_sqr.c:122:17: Call
              120.                   if (bn_wexpand(tmp, max) == NULL)
              121.                       goto err;
              122.                   bn_sqr_normal(rr->d, a->d, al, tmp->d);
                                     ^
              123.               }
              124.           }

crypto/bn/bn_sqr.c:152:1: <Offset trace>
150.   
151.   /* tmp must have 2*n words */
152. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
153.   {
154.       int i, j, max;

crypto/bn/bn_sqr.c:152:1: Parameter `n`
                150.   
                151.   /* tmp must have 2*n words */
                152. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
                153.   {
                154.       int i, j, max;

crypto/bn/bn_sqr.c:163:5: Assignment
                161.       rp[0] = rp[max - 1] = 0;
                162.       rp++;
                163.       j = n;
                           ^
                164.   
                165.       if (--j > 0) {

crypto/bn/bn_sqr.c:165:9: Assignment
                163.       j = n;
                164.   
                165.       if (--j > 0) {
                               ^
                166.           ap++;
                167.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);

crypto/bn/bn_sqr.c:152:1: <Length trace>
150.   
151.   /* tmp must have 2*n words */
152. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
153.   {
154.       int i, j, max;

crypto/bn/bn_sqr.c:152:1: Parameter `*r`
                150.   
                151.   /* tmp must have 2*n words */
                152. > void bn_sqr_normal(BN_ULONG *r, const BN_ULONG *a, int n, BN_ULONG *tmp)
                153.   {
                154.       int i, j, max;

crypto/bn/bn_sqr.c:160:5: Assignment
                158.       max = n * 2;
                159.       ap = a;
                160.       rp = r;
                           ^
                161.       rp[0] = rp[max - 1] = 0;
                162.       rp++;

crypto/bn/bn_sqr.c:162:5: Assignment
                160.       rp = r;
                161.       rp[0] = rp[max - 1] = 0;
                162.       rp++;
                           ^
                163.       j = n;
                164.   

crypto/bn/bn_sqr.c:167:9: Array access: Offset: [16, +oo] (⇐ 1 + [15, +oo]) Size: [0, 8388607] by call to `srp_Verify_N_and_g` 
                165.       if (--j > 0) {
                166.           ap++;
                167.           rp[j] = bn_mul_words(rp, ap, j, ap[-1]);
                               ^
                168.           rp += 2;
                169.       }
