diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-07-27 01:27:22 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-07-27 01:27:22 +0000 |
commit | f6c1c9e95dd7ceadae070bd32e59cfa20726b42e (patch) | |
tree | ce2abd6e69fe85e764dff4b8fe839f5d47ea96c9 /crypto/asn1/a_enum.c | |
parent | 2dbef509e27a14a6358d3dd33abfb60320f7c763 (diff) |
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_enum.c')
-rw-r--r-- | crypto/asn1/a_enum.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/a_enum.c b/crypto/asn1/a_enum.c index 34b1a38c49..53b30f2b56 100644 --- a/crypto/asn1/a_enum.c +++ b/crypto/asn1/a_enum.c @@ -75,6 +75,7 @@ void ASN1_ENUMERATED_free(ASN1_ENUMERATED *x) int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *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_ENUMERATED); if(pp) { |