apps/apps.c:2447: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `JPAKE_STEP3A_generate`.
Showing all 10 steps of the trace


apps/apps.c:2447:2: Call
2445.   
2446.   	JPAKE_STEP3A_init(&s3a);
2447.   	JPAKE_STEP3A_generate(&s3a, ctx);
         ^
2448.   	BIO_write(bconn, s3a.hhk, sizeof s3a.hhk);
2449.   	(void)BIO_flush(bconn);

crypto/jpake/jpake.c:427:1: Parameter `ctx->key->top`
  425.       {}
  426.   
  427. > int JPAKE_STEP3A_generate(JPAKE_STEP3A *send, JPAKE_CTX *ctx)
  428.       {
  429.       quickhashbn(send->hhk, ctx->key);

crypto/jpake/jpake.c:429:5: Call
  427.   int JPAKE_STEP3A_generate(JPAKE_STEP3A *send, JPAKE_CTX *ctx)
  428.       {
  429.       quickhashbn(send->hhk, ctx->key);
             ^
  430.       SHA1(send->hhk, sizeof send->hhk, send->hhk);
  431.   

crypto/jpake/jpake.c:415:1: Parameter `bn->top`
    413.       }
    414.   
    415. > static void quickhashbn(unsigned char *md, const BIGNUM *bn)
    416.       {
    417.       SHA_CTX sha;

crypto/jpake/jpake.c:420:5: Call
    418.   
    419.       SHA1_Init(&sha);
    420.       hashbn(&sha, bn);
               ^
    421.       SHA1_Final(md, &sha);
    422.       }

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: <LHS trace>
246.   	}
247.   
248. > int BN_num_bits(const BIGNUM *a)
249.   	{
250.   	int i = a->top - 1;

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/bn/bn_lib.c:250:2: Binary operation: ([0, +oo] - 1):unsigned64 by call to `JPAKE_STEP3A_generate` 
        248.   int BN_num_bits(const BIGNUM *a)
        249.   	{
        250.   	int i = a->top - 1;
                ^
        251.   	bn_check_top(a);
        252.   

int BN_num_bits(const BIGNUM *a)
	{
	int i = a->top - 1;
	bn_check_top(a);
	if (BN_is_zero(a)) return 0;
	return ((i*BN_BITS2) + BN_num_bits_word(a->d[i]));
	}
['static void jpake_send_step3a(BIO *bconn, JPAKE_CTX *ctx)\n\t{\n\tJPAKE_STEP3A s3a;\n\tJPAKE_STEP3A_init(&s3a);\n\tJPAKE_STEP3A_generate(&s3a, ctx);\n\tBIO_write(bconn, s3a.hhk, sizeof s3a.hhk);\n\t(void)BIO_flush(bconn);\n\tJPAKE_STEP3A_release(&s3a);\n\t}', 'int JPAKE_STEP3A_generate(JPAKE_STEP3A *send, JPAKE_CTX *ctx)\n    {\n    quickhashbn(send->hhk, ctx->key);\n    SHA1(send->hhk, sizeof send->hhk, send->hhk);\n    return 1;\n    }', 'static void quickhashbn(unsigned char *md, const BIGNUM *bn)\n    {\n    SHA_CTX sha;\n    SHA1_Init(&sha);\n    hashbn(&sha, bn);\n    SHA1_Final(md, &sha);\n    }', 'static void hashbn(SHA_CTX *sha, const BIGNUM *bn)\n    {\n    size_t l = BN_num_bytes(bn);\n    unsigned char *bin = OPENSSL_malloc(l);\n    hashlength(sha, l);\n    BN_bn2bin(bn, bin);\n    SHA1_Update(sha, bin, l);\n    OPENSSL_free(bin);\n    }', 'int BN_num_bits(const BIGNUM *a)\n\t{\n\tint i = a->top - 1;\n\tbn_check_top(a);\n\tif (BN_is_zero(a)) return 0;\n\treturn ((i*BN_BITS2) + BN_num_bits_word(a->d[i]));\n\t}']