projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1546fb7
)
Encode INTEGER correctly.
author
Dr. Stephen Henson
<steve@openssl.org>
Mon, 18 Mar 2013 14:19:40 +0000
(14:19 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Mon, 18 Mar 2013 14:19:40 +0000
(14:19 +0000)
If an ASN1_INTEGER structure is allocated but not explicitly set encode
it as zero: don't generate an invalid zero length INTEGER.
crypto/asn1/a_int.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/a_int.c
b/crypto/asn1/a_int.c
index f551bdbaadd3ec3c458a13e6f926491391375cf9..ee26c31bca4bbc835bb801691f92e5969ef2a3e7 100644
(file)
--- 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;