Commit fbeaa3c4 authored by Bodo Möller's avatar Bodo Möller
Browse files

Update util/ck_errf.pl script, and have it run automatically

during "make errors" and thus during "make update".

Fix lots of bugs that util/ck_errf.pl can detect automatically.
Various others of these are still left to fix; that's why
"make update" will complain loudly when run now.
parent ee2262b8
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -366,6 +366,7 @@ tags:
errors:
errors:
	$(PERL) util/mkerr.pl -recurse -write
	$(PERL) util/mkerr.pl -recurse -write
	(cd engines; $(MAKE) PERL=$(PERL) errors)
	(cd engines; $(MAKE) PERL=$(PERL) errors)
	$(PERL) util/ck_errf.pl */*.c */*/*.c


stacks:
stacks:
	$(PERL) util/mkstack.pl -write
	$(PERL) util/mkstack.pl -write
+13 −0
Original line number Original line Diff line number Diff line
@@ -600,6 +600,19 @@ pkcs8.o: ../include/openssl/safestack.h ../include/openssl/sha.h
pkcs8.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
pkcs8.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
pkcs8.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
pkcs8.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
pkcs8.o: ../include/openssl/x509_vfy.h apps.h pkcs8.c
pkcs8.o: ../include/openssl/x509_vfy.h apps.h pkcs8.c
prime.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
prime.o: ../include/openssl/bn.h ../include/openssl/buffer.h
prime.o: ../include/openssl/conf.h ../include/openssl/crypto.h
prime.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
prime.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
prime.o: ../include/openssl/engine.h ../include/openssl/evp.h
prime.o: ../include/openssl/lhash.h ../include/openssl/obj_mac.h
prime.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
prime.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
prime.o: ../include/openssl/pkcs7.h ../include/openssl/safestack.h
prime.o: ../include/openssl/sha.h ../include/openssl/stack.h
prime.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
prime.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h prime.c
rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
rand.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h
rand.o: ../include/openssl/buffer.h ../include/openssl/conf.h
rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
rand.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
+6 −6
Original line number Original line Diff line number Diff line
@@ -127,7 +127,7 @@ void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x)


        if ((b=BIO_new(BIO_s_file())) == NULL)
        if ((b=BIO_new(BIO_s_file())) == NULL)
		{
		{
		ASN1err(ASN1_F_ASN1_D2I_FP,ERR_R_BUF_LIB);
		ASN1err(ASN1_F_ASN1_ITEM_D2I_FP,ERR_R_BUF_LIB);
                return(NULL);
                return(NULL);
		}
		}
        BIO_set_fp(b,in,BIO_NOCLOSE);
        BIO_set_fp(b,in,BIO_NOCLOSE);
@@ -158,7 +158,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
	b=BUF_MEM_new();
	b=BUF_MEM_new();
	if (b == NULL)
	if (b == NULL)
		{
		{
		ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
		ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ERR_R_MALLOC_FAILURE);
		return -1;
		return -1;
		}
		}


@@ -171,13 +171,13 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)


			if (!BUF_MEM_grow_clean(b,len+want))
			if (!BUF_MEM_grow_clean(b,len+want))
				{
				{
				ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
				ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ERR_R_MALLOC_FAILURE);
				goto err;
				goto err;
				}
				}
			i=BIO_read(in,&(b->data[len]),want);
			i=BIO_read(in,&(b->data[len]),want);
			if ((i < 0) && ((len-off) == 0))
			if ((i < 0) && ((len-off) == 0))
				{
				{
				ASN1err(ASN1_F_ASN1_D2I_BIO,ASN1_R_NOT_ENOUGH_DATA);
				ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ASN1_R_NOT_ENOUGH_DATA);
				goto err;
				goto err;
				}
				}
			if (i > 0)
			if (i > 0)
@@ -226,7 +226,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
				want-=(len-off);
				want-=(len-off);
				if (!BUF_MEM_grow_clean(b,len+want))
				if (!BUF_MEM_grow_clean(b,len+want))
					{
					{
					ASN1err(ASN1_F_ASN1_D2I_BIO,ERR_R_MALLOC_FAILURE);
					ASN1err(ASN1_F_ASN1_D2I_READ_BIO,ERR_R_MALLOC_FAILURE);
					goto err;
					goto err;
					}
					}
				while (want > 0)
				while (want > 0)
@@ -234,7 +234,7 @@ static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
					i=BIO_read(in,&(b->data[len]),want);
					i=BIO_read(in,&(b->data[len]),want);
					if (i <= 0)
					if (i <= 0)
						{
						{
						ASN1err(ASN1_F_ASN1_D2I_BIO,
						ASN1err(ASN1_F_ASN1_D2I_READ_BIO,
						    ASN1_R_NOT_ENOUGH_DATA);
						    ASN1_R_NOT_ENOUGH_DATA);
						goto err;
						goto err;
						}
						}
+1 −1
Original line number Original line Diff line number Diff line
@@ -101,7 +101,7 @@ void *ASN1_item_dup(const ASN1_ITEM *it, void *x)


	i=ASN1_item_i2d(x,&b,it);
	i=ASN1_item_i2d(x,&b,it);
	if (b == NULL)
	if (b == NULL)
		{ ASN1err(ASN1_F_ASN1_DUP,ERR_R_MALLOC_FAILURE); return(NULL); }
		{ ASN1err(ASN1_F_ASN1_ITEM_DUP,ERR_R_MALLOC_FAILURE); return(NULL); }
	p= b;
	p= b;
	ret=ASN1_item_d2i(NULL,&p,i, it);
	ret=ASN1_item_d2i(NULL,&p,i, it);
	OPENSSL_free(b);
	OPENSSL_free(b);
+2 −2
Original line number Original line Diff line number Diff line
@@ -124,7 +124,7 @@ int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x)


        if ((b=BIO_new(BIO_s_file())) == NULL)
        if ((b=BIO_new(BIO_s_file())) == NULL)
		{
		{
		ASN1err(ASN1_F_ASN1_I2D_FP,ERR_R_BUF_LIB);
		ASN1err(ASN1_F_ASN1_ITEM_I2D_FP,ERR_R_BUF_LIB);
                return(0);
                return(0);
		}
		}
        BIO_set_fp(b,out,BIO_NOCLOSE);
        BIO_set_fp(b,out,BIO_NOCLOSE);
@@ -142,7 +142,7 @@ int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x)
	n = ASN1_item_i2d(x, &b, it);
	n = ASN1_item_i2d(x, &b, it);
	if (b == NULL)
	if (b == NULL)
		{
		{
		ASN1err(ASN1_F_ASN1_I2D_BIO,ERR_R_MALLOC_FAILURE);
		ASN1err(ASN1_F_ASN1_ITEM_I2D_BIO,ERR_R_MALLOC_FAILURE);
		return(0);
		return(0);
		}
		}


Loading