crypto/jpake/jpake.c:280: error: INTEGER_OVERFLOW_L2
  ([0, `ctx->p.g->top`] - 1):unsigned64 by call to `generate_step_part`.
Showing all 33 steps of the trace


crypto/jpake/jpake.c:276:1: Parameter `ctx->p.g->top`
274.       }
275.   
276. > int JPAKE_STEP1_generate(JPAKE_STEP1 *send, JPAKE_CTX *ctx)
277.       {
278.       genrand(ctx);

crypto/jpake/jpake.c:279:5: Call
277.       {
278.       genrand(ctx);
279.       generate_step_part(&send->p1, ctx->xa, ctx->p.g, ctx);
           ^
280.       generate_step_part(&send->p2, ctx->xb, ctx->p.g, ctx);
281.   

crypto/jpake/jpake.c:247:1: Parameter `g->top`
  245.       }    
  246.   
  247. > static void generate_step_part(JPAKE_STEP_PART *p, const BIGNUM *x,
  248.   			       const BIGNUM *g, JPAKE_CTX *ctx)
  249.       {

crypto/jpake/jpake.c:250:5: Call
  248.   			       const BIGNUM *g, JPAKE_CTX *ctx)
  249.       {
  250.       BN_mod_exp(p->gx, g, x, ctx->p.p, ctx->ctx);
             ^
  251.       generate_zkp(p, x, g, ctx);
  252.       }

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

crypto/jpake/jpake.c:251:5: Call
  249.       {
  250.       BN_mod_exp(p->gx, g, x, ctx->p.p, ctx->ctx);
  251.       generate_zkp(p, x, g, ctx);
             ^
  252.       }
  253.   

crypto/jpake/jpake.c:186:1: Parameter `zkpg->top`
    184.    * Note that p->gx has already been calculated
    185.    */
    186. > static void generate_zkp(JPAKE_STEP_PART *p, const BIGNUM *x,
    187.   			 const BIGNUM *zkpg, JPAKE_CTX *ctx)
    188.       {

crypto/jpake/jpake.c:199:5: Call
    197.       BN_rand_range(r, ctx->p.q);
    198.      /* g^r */
    199.       BN_mod_exp(p->zkpx.gr, zkpg, r, ctx->p.p, ctx->ctx);
               ^
    200.   
    201.      /* h=hash... */

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

crypto/jpake/jpake.c:202:5: Call
    200.   
    201.      /* h=hash... */
    202.       zkp_hash(h, zkpg, p, ctx->p.name);
               ^
    203.   
    204.      /* b = r - x*h */

crypto/jpake/jpake.c:162:1: Parameter `zkpg->top`
      160.   
      161.   /* h=hash(g, g^r, g^x, name) */
      162. > static void zkp_hash(BIGNUM *h, const BIGNUM *zkpg, const JPAKE_STEP_PART *p,
      163.   		     const char *proof_name)
      164.       {

crypto/jpake/jpake.c:173:5: Call
      171.       */
      172.       SHA1_Init(&sha);
      173.       hashbn(&sha, zkpg);
                 ^
      174.       OPENSSL_assert(!BN_is_zero(p->zkpx.gr));
      175.       hashbn(&sha, p->zkpx.gr);

crypto/jpake/jpake.c:150:1: Parameter `bn->top`
        148.       }
        149.   
        150. > static void hashbn(SHA_CTX *sha, const BIGNUM *bn)
        151.       {
        152.       size_t l = BN_num_bytes(bn);

crypto/jpake/jpake.c:152:16: Call
        150.   static void hashbn(SHA_CTX *sha, const BIGNUM *bn)
        151.       {
        152.       size_t l = BN_num_bytes(bn);
                              ^
        153.       unsigned char *bin = OPENSSL_malloc(l);
        154.   

crypto/bn/bn_lib.c:248:1: Parameter `a->top`
          246.   	}
          247.   
          248. > int BN_num_bits(const BIGNUM *a)
          249.   	{
          250.   	int i = a->top - 1;

crypto/jpake/jpake.c:156:5: Call
        154.   
        155.       hashlength(sha, l);
        156.       BN_bn2bin(bn, bin);
                   ^
        157.       SHA1_Update(sha, bin, l);
        158.       OPENSSL_free(bin);

crypto/bn/bn_lib.c:641:1: Parameter `a->top`
          639.   
          640.   /* ignore negative */
          641. > int BN_bn2bin(const BIGNUM *a, unsigned char *to)
          642.   	{
          643.   	int n,i;

crypto/bn/bn_lib.c:647:6: Call
          645.   
          646.   	bn_check_top(a);
          647.   	n=i=BN_num_bytes(a);
                      ^
          648.   	while (i--)
          649.   		{

crypto/bn/bn_lib.c:248:1: Parameter `a->top`
            246.   	}
            247.   
            248. > int BN_num_bits(const BIGNUM *a)
            249.   	{
            250.   	int i = a->top - 1;

crypto/jpake/jpake.c:280:5: Call
278.       genrand(ctx);
279.       generate_step_part(&send->p1, ctx->xa, ctx->p.g, ctx);
280.       generate_step_part(&send->p2, ctx->xb, ctx->p.g, ctx);
           ^
281.   
282.       return 1;

crypto/jpake/jpake.c:247:1: Parameter `g->top`
  245.       }    
  246.   
  247. > static void generate_step_part(JPAKE_STEP_PART *p, const BIGNUM *x,
  248.   			       const BIGNUM *g, JPAKE_CTX *ctx)
  249.       {

crypto/jpake/jpake.c:250:5: Call
  248.   			       const BIGNUM *g, JPAKE_CTX *ctx)
  249.       {
  250.       BN_mod_exp(p->gx, g, x, ctx->p.p, ctx->ctx);
             ^
  251.       generate_zkp(p, x, g, ctx);
  252.       }

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

crypto/bn/bn_exp.c:223:8: Call
    221.   		else
    222.   #  endif
    223.   			ret=BN_mod_exp_mont(r,a,p,m,ctx,NULL);
                  ^
    224.   		}
    225.   	else

crypto/bn/bn_exp.c:371:1: Parameter `a->top`
      369.   
      370.   
      371. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      372.   		    const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
      373.   	{

crypto/bn/bn_exp.c:384:10: Call
      382.   	if (BN_get_flags(p, BN_FLG_CONSTTIME) != 0)
      383.   		{
      384.   		return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                      ^
      385.   		}
      386.   

crypto/bn/bn_exp.c:574:1: Parameter `a->top`
        572.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
        573.    */
        574. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
        575.   		    const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
        576.   	{

crypto/bn/bn_exp.c:650:8: Call
        648.   	if (a->neg || BN_ucmp(a,m) >= 0)
        649.   		{
        650.   		if (!BN_mod(am,a,m,ctx))
                      ^
        651.   			goto err;
        652.   		aa= am;

crypto/bn/bn_div.c:181:1: Parameter `num->top`
          179.   static int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
          180.           const BIGNUM *divisor, BN_CTX *ctx);
          181. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
          182.   	   BN_CTX *ctx)
          183.   	{

crypto/bn/bn_div.c:218:6: Call
          216.   		}
          217.   
          218.   	if (BN_ucmp(num,divisor) < 0)
                      ^
          219.   		{
          220.   		if (rm != NULL)

crypto/bn/bn_lib.c:656:1: <LHS trace>
654.   	}
655.   
656. > int BN_ucmp(const BIGNUM *a, const BIGNUM *b)
657.   	{
658.   	int i;

crypto/bn/bn_lib.c:656:1: Parameter `a->top`
            654.   	}
            655.   
            656. > int BN_ucmp(const BIGNUM *a, const BIGNUM *b)
            657.   	{
            658.   	int i;

crypto/bn/bn_lib.c:668:7: Binary operation: ([0, ctx->p.g->top] - 1):unsigned64 by call to `generate_step_part` 
            666.   	ap=a->d;
            667.   	bp=b->d;
            668.   	for (i=a->top-1; i>=0; i--)
                         ^
            669.   		{
            670.   		t1= ap[i];
