aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_int.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2000-07-27 01:27:22 +0000
committerDr. Stephen Henson <steve@openssl.org>2000-07-27 01:27:22 +0000
commitf6c1c9e95dd7ceadae070bd32e59cfa20726b42e (patch)
treece2abd6e69fe85e764dff4b8fe839f5d47ea96c9 /crypto/asn1/a_int.c
parent2dbef509e27a14a6358d3dd33abfb60320f7c763 (diff)
downloadopenssl-f6c1c9e95dd7ceadae070bd32e59cfa20726b42e.tar.gz
Fix a bug in the new i2d_{ENUMERATED,INTEGER} that
didn't recognise NULL to mean 'don't output anything'
Diffstat (limited to 'crypto/asn1/a_int.c')
-rw-r--r--crypto/asn1/a_int.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/a_int.c b/crypto/asn1/a_int.c
index 45927ffd6e..bb8e9cf8f9 100644
--- a/crypto/asn1/a_int.c
+++ b/crypto/asn1/a_int.c
@@ -77,6 +77,7 @@ int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y)
int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp)
{
int len, ret;
+ if(!a) return 0;
len = i2c_ASN1_INTEGER(a, NULL);
ret=ASN1_object_size(0,len,V_ASN1_INTEGER);
if(pp) {