summaryrefslogtreecommitdiffstats
path: root/apps/x509.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2002-11-13 15:43:43 +0000
committerBen Laurie <ben@openssl.org>2002-11-13 15:43:43 +0000
commit54a656ef081f72a740c550ebd8099b40b8b5cde0 (patch)
tree9b3638b56848c7f0648b84cfa7ad056116b37a1b /apps/x509.c
parent8f797f14b8ff7d3d5cb04443284259a0c94860b3 (diff)
Security fixes brought forward from 0.9.7.
Diffstat (limited to 'apps/x509.c')
-rw-r--r--apps/x509.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 8e4462dae7..0f6e9ad907 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -770,10 +770,11 @@ bad:
int y,z;
X509_NAME_oneline(X509_get_subject_name(x),
- buf,256);
+ buf,sizeof buf);
BIO_printf(STDout,"/* subject:%s */\n",buf);
m=X509_NAME_oneline(
- X509_get_issuer_name(x),buf,256);
+ X509_get_issuer_name(x),buf,
+ sizeof buf);
BIO_printf(STDout,"/* issuer :%s */\n",buf);
z=i2d_X509(x,NULL);
@@ -1086,7 +1087,7 @@ static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
}
else
{
- if (!a2i_ASN1_INTEGER(io,bs,buf2,1024))
+ if (!a2i_ASN1_INTEGER(io,bs,buf2,sizeof buf2))
{
BIO_printf(bio_err,"unable to load serial number from %s\n",buf);
ERR_print_errors(bio_err);