crypto/bn/bn_lib.c:453: error: NULL_DEREFERENCE
  pointer `b` last assigned on line 449 could be null and is dereferenced at line 453, column 8.
Showing all 6 steps of the trace


crypto/bn/bn_lib.c:432:1: start of procedure bn_expand2()
430.    * NULL is returned. If not, 'b' is returned. */
431.   
432. > BIGNUM *bn_expand2(BIGNUM *b, int words)
433.   	{
434.   	BN_ULONG *A;

crypto/bn/bn_lib.c:437:6: Taking true branch
435.   	int i;
436.   
437.   	if (words > b->dmax)
            ^
438.   		{
439.   		BN_ULONG *a = bn_expand_internal(b, words);

crypto/bn/bn_lib.c:439:3: Skipping bn_expand_internal(): empty list of specs
437.   	if (words > b->dmax)
438.   		{
439.   		BN_ULONG *a = bn_expand_internal(b, words);
         ^
440.   
441.   		if (a)

crypto/bn/bn_lib.c:441:7: Taking false branch
439.   		BN_ULONG *a = bn_expand_internal(b, words);
440.   
441.   		if (a)
             ^
442.   			{
443.   			if (b->d)

crypto/bn/bn_lib.c:449:4: 
447.   			}
448.   		else
449. > 			b = NULL;
450.   		}
451.   	

crypto/bn/bn_lib.c:453:2: 
451.   	
452.   	/* NB: bn_wexpand() calls this only if the BIGNUM really has to grow */
453. > 	A = &(b->d[b->top]);
454.   	for (i=(words - b->top)>>3; i>0; i--,A+=8)
455.   		{

BIGNUM *bn_expand2(BIGNUM *b, int words)
	{
	BN_ULONG *A;
	int i;
	if (words > b->dmax)
		{
		BN_ULONG *a = bn_expand_internal(b, words);
		if (a)
			{
			if (b->d)
				OPENSSL_free(b->d);
			b->d=a;
			b->dmax=words;
			}
		else
			b = NULL;
		}
	A = &(b->d[b->top]);
	for (i=(words - b->top)>>3; i>0; i--,A+=8)
		{
		A[0]=0; A[1]=0; A[2]=0; A[3]=0;
		A[4]=0; A[5]=0; A[6]=0; A[7]=0;
		}
	for (i=(words - b->top)&7; i>0; i--,A++)
		A[0]=0;
	return b;
	}
['BIGNUM *bn_expand2(BIGNUM *b, int words)\n\t{\n\tBN_ULONG *A;\n\tint i;\n\tif (words > b->dmax)\n\t\t{\n\t\tBN_ULONG *a = bn_expand_internal(b, words);\n\t\tif (a)\n\t\t\t{\n\t\t\tif (b->d)\n\t\t\t\tOPENSSL_free(b->d);\n\t\t\tb->d=a;\n\t\t\tb->dmax=words;\n\t\t\t}\n\t\telse\n\t\t\tb = NULL;\n\t\t}\n\tA = &(b->d[b->top]);\n\tfor (i=(words - b->top)>>3; i>0; i--,A+=8)\n\t\t{\n\t\tA[0]=0; A[1]=0; A[2]=0; A[3]=0;\n\t\tA[4]=0; A[5]=0; A[6]=0; A[7]=0;\n\t\t}\n\tfor (i=(words - b->top)&7; i>0; i--,A++)\n\t\tA[0]=0;\n\treturn b;\n\t}']