crypto/bn/bn_prime.c:442: error: UNINITIALIZED_VALUE
  The value read from mods[_] was never initialized.
Showing all 1 steps of the trace


crypto/bn/bn_prime.c:442:8: 
440.   			/* check that rnd is not a prime and also
441.   			 * that gcd(rnd-1,primes) == 1 (except for 2) */
442. > 			if (((mods[i]+delta)%primes[i]) <= 1)
443.   				{
444.   				delta+=2;

static int probable_prime(BIGNUM *rnd, int bits)
	{
	int i;
	prime_t mods[NUMPRIMES];
	BN_ULONG delta;
	BN_ULONG maxdelta = BN_MASK2 - primes[NUMPRIMES-1];
	char is_single_word = bits <= BN_BITS2;
again:
	if (!BN_rand(rnd,bits,1,1)) return(0);
	for (i=1; i<NUMPRIMES; i++)
		mods[i]=(prime_t)BN_mod_word(rnd,(BN_ULONG)primes[i]);
	if (is_single_word)
		{
		BN_ULONG size_limit = (((BN_ULONG) 1) << bits) - BN_get_word(rnd) - 1;
		if (size_limit < maxdelta)
			maxdelta = size_limit;
		}
	delta=0;
	loop:
	if (is_single_word)
		{
		BN_ULONG rnd_word = BN_get_word(rnd);
		for (i=1; i<NUMPRIMES && primes[i]<rnd_word; i++)
			{
			if ((mods[i]+delta)%primes[i] == 0)
				{
				delta+=2;
				if (delta > maxdelta) goto again;
				goto loop;
				}
			}
		}
	else
		{
		for (i=1; i<NUMPRIMES; i++)
			{
			if (((mods[i]+delta)%primes[i]) <= 1)
				{
				delta+=2;
				if (delta > maxdelta) goto again;
				goto loop;
				}
			}
		}
	if (!BN_add_word(rnd,delta)) return(0);
	if (BN_num_bits(rnd) != bits)
		goto again;
	bn_check_top(rnd);
	return(1);
	}
['static int probable_prime(BIGNUM *rnd, int bits)\n\t{\n\tint i;\n\tprime_t mods[NUMPRIMES];\n\tBN_ULONG delta;\n\tBN_ULONG maxdelta = BN_MASK2 - primes[NUMPRIMES-1];\n\tchar is_single_word = bits <= BN_BITS2;\nagain:\n\tif (!BN_rand(rnd,bits,1,1)) return(0);\n\tfor (i=1; i<NUMPRIMES; i++)\n\t\tmods[i]=(prime_t)BN_mod_word(rnd,(BN_ULONG)primes[i]);\n\tif (is_single_word)\n\t\t{\n\t\tBN_ULONG size_limit = (((BN_ULONG) 1) << bits) - BN_get_word(rnd) - 1;\n\t\tif (size_limit < maxdelta)\n\t\t\tmaxdelta = size_limit;\n\t\t}\n\tdelta=0;\n\tloop:\n\tif (is_single_word)\n\t\t{\n\t\tBN_ULONG rnd_word = BN_get_word(rnd);\n\t\tfor (i=1; i<NUMPRIMES && primes[i]<rnd_word; i++)\n\t\t\t{\n\t\t\tif ((mods[i]+delta)%primes[i] == 0)\n\t\t\t\t{\n\t\t\t\tdelta+=2;\n\t\t\t\tif (delta > maxdelta) goto again;\n\t\t\t\tgoto loop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\telse\n\t\t{\n\t\tfor (i=1; i<NUMPRIMES; i++)\n\t\t\t{\n\t\t\tif (((mods[i]+delta)%primes[i]) <= 1)\n\t\t\t\t{\n\t\t\t\tdelta+=2;\n\t\t\t\tif (delta > maxdelta) goto again;\n\t\t\t\tgoto loop;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\tif (!BN_add_word(rnd,delta)) return(0);\n\tif (BN_num_bits(rnd) != bits)\n\t\tgoto again;\n\tbn_check_top(rnd);\n\treturn(1);\n\t}']