diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2013-03-18 14:19:40 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2013-03-18 14:19:40 +0000 |
commit | 1643edc63c3e15b6db5a15a728bc288f2cc2bbc7 (patch) | |
tree | 891564a1e7aa3b0458873dbd8d62a78079cc3c03 /crypto | |
parent | 1546fb780bc11556a18d70c5fb29af4a9d5beaff (diff) |
Encode INTEGER correctly.
If an ASN1_INTEGER structure is allocated but not explicitly set encode
it as zero: don't generate an invalid zero length INTEGER.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asn1/a_int.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/a_int.c b/crypto/asn1/a_int.c index f551bdbaad..ee26c31bca 100644 --- a/crypto/asn1/a_int.c +++ b/crypto/asn1/a_int.c @@ -116,7 +116,7 @@ int i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp) int pad=0,ret,i,neg; unsigned char *p,*n,pb=0; - if ((a == NULL) || (a->data == NULL)) return(0); + if (a == NULL) return(0); neg=a->type & V_ASN1_NEG; if (a->length == 0) ret=1; |