aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/asn1
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-30 08:46:36 +0200
committermarha <marha@users.sourceforge.net>2011-09-30 08:46:36 +0200
commit73d82f7ac0d1add2697128c2e26c2432ffe172a5 (patch)
treec6436b57a2191c57320396c37449109ebad745ec /openssl/crypto/asn1
parent4a9e1f51655e03da1507dabce7c4c3960e7ca607 (diff)
parent60adbfdea1ee754341d64454274e7aa83bae8971 (diff)
downloadvcxsrv-73d82f7ac0d1add2697128c2e26c2432ffe172a5.tar.gz
vcxsrv-73d82f7ac0d1add2697128c2e26c2432ffe172a5.tar.bz2
vcxsrv-73d82f7ac0d1add2697128c2e26c2432ffe172a5.zip
Merge remote-tracking branch 'origin/released'
Conflicts: openssl/Makefile
Diffstat (limited to 'openssl/crypto/asn1')
-rw-r--r--openssl/crypto/asn1/a_object.c4
-rw-r--r--openssl/crypto/asn1/bio_ndef.c3
-rw-r--r--openssl/crypto/asn1/x_name.c7
3 files changed, 7 insertions, 7 deletions
diff --git a/openssl/crypto/asn1/a_object.c b/openssl/crypto/asn1/a_object.c
index e5fbe7cbb..3978c9150 100644
--- a/openssl/crypto/asn1/a_object.c
+++ b/openssl/crypto/asn1/a_object.c
@@ -139,7 +139,7 @@ int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num)
ASN1err(ASN1_F_A2D_ASN1_OBJECT,ASN1_R_INVALID_DIGIT);
goto err;
}
- if (!use_bn && l > (ULONG_MAX / 10L))
+ if (!use_bn && l >= ((ULONG_MAX - 80) / 10L))
{
use_bn = 1;
if (!bl)
@@ -293,7 +293,7 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
/* Sanity check OID encoding: can't have leading 0x80 in
* subidentifiers, see: X.690 8.19.2
*/
- for (i = 0, p = *pp + 1; i < len - 1; i++, p++)
+ for (i = 0, p = *pp; i < len; i++, p++)
{
if (*p == 0x80 && (!i || !(p[-1] & 0x80)))
{
diff --git a/openssl/crypto/asn1/bio_ndef.c b/openssl/crypto/asn1/bio_ndef.c
index 370389b1e..b91f97a1b 100644
--- a/openssl/crypto/asn1/bio_ndef.c
+++ b/openssl/crypto/asn1/bio_ndef.c
@@ -57,9 +57,6 @@
#include <openssl/bio.h>
#include <openssl/err.h>
-#ifndef OPENSSL_SYSNAME_NETWARE
-#include <memory.h>
-#endif
#include <stdio.h>
/* Experimental NDEF ASN1 BIO support routines */
diff --git a/openssl/crypto/asn1/x_name.c b/openssl/crypto/asn1/x_name.c
index caa4409fe..49be08b4d 100644
--- a/openssl/crypto/asn1/x_name.c
+++ b/openssl/crypto/asn1/x_name.c
@@ -214,7 +214,9 @@ static int x509_name_ex_d2i(ASN1_VALUE **val,
*val = nm.a;
*in = p;
return ret;
- err:
+err:
+ if (nm.x != NULL)
+ X509_NAME_free(nm.x);
ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR);
return 0;
}
@@ -464,7 +466,8 @@ static int asn1_string_canon(ASN1_STRING *out, ASN1_STRING *in)
}
else
{
- *to++ = tolower(*from++);
+ *to++ = tolower(*from);
+ from++;
i++;
}
}