summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2013-03-18 14:19:40 +0000
committerDr. Stephen Henson <steve@openssl.org>2013-03-18 14:21:03 +0000
commit64841ed746dd1c507b208c99c7251b675fec5941 (patch)
tree10cfe14e5d030b5762b6185bf27d2c525d25f691 /crypto/asn1
parent901554b3553f1cd9053e03016a6431d9787179b0 (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. (cherry picked from commit 1643edc63c3e15b6db5a15a728bc288f2cc2bbc7)
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/a_int.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/a_int.c b/crypto/asn1/a_int.c
index ad0d2506f6..297c45a9ff 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;