summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-08-29 13:12:04 +0200
committerSimon Josefsson <simon@josefsson.org>2008-09-09 18:32:43 +0200
commit5f1ded09b88bb2ea961b591cb5fecbf146a173a3 (patch)
tree03fa408e93c07d7e062a237dd6880b1978cc1ca5
parent18793582a4ae85783e32e4466a1cc81389a920ef (diff)
downloadgnutls-5f1ded09b88bb2ea961b591cb5fecbf146a173a3.tar.gz
Use libtasn1 1.5.
-rw-r--r--NEWS2
-rw-r--r--lib/minitasn1/element.c25
-rw-r--r--lib/minitasn1/libtasn1.h2
3 files changed, 23 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 924d27d840..e43aad58bc 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,8 @@ Fixes crash with libgcrypt 1.4.2. Reported by Ludovic Courtes
** doc/: Fix texinfo markup for old texinfo versions.
+** Included copy of libtasn1 is upgraded to version 1.5.
+
** API and ABI modifications:
No changes since last version.
diff --git a/lib/minitasn1/element.c b/lib/minitasn1/element.c
index 752b40da85..703276c809 100644
--- a/lib/minitasn1/element.c
+++ b/lib/minitasn1/element.c
@@ -420,7 +420,10 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
asn1_length_der (len - k, NULL, &len2);
temp = (unsigned char *) _asn1_malloc (len - k + len2);
if (temp == NULL)
- return ASN1_MEM_ALLOC_ERROR;
+ {
+ _asn1_free (value_temp);
+ return ASN1_MEM_ALLOC_ERROR;
+ }
asn1_octet_der (value_temp + k, len - k, temp, &len2);
_asn1_set_value (node, temp, len2);
@@ -438,7 +441,10 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
default_temp =
(unsigned char *) _asn1_malloc (SIZEOF_UNSIGNED_LONG_INT);
if (default_temp == NULL)
- return ASN1_MEM_ALLOC_ERROR;
+ {
+ _asn1_free (value_temp);
+ return ASN1_MEM_ALLOC_ERROR;
+ }
_asn1_convert_integer (p->value, default_temp,
SIZEOF_UNSIGNED_LONG_INT, &len2);
@@ -446,7 +452,10 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
else
{ /* is an identifier like v1 */
if (!(node->type & CONST_LIST))
- return ASN1_VALUE_NOT_VALID;
+ {
+ _asn1_free (value_temp);
+ return ASN1_VALUE_NOT_VALID;
+ }
p2 = node->down;
while (p2)
{
@@ -458,7 +467,10 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
(unsigned char *)
_asn1_malloc (SIZEOF_UNSIGNED_LONG_INT);
if (default_temp == NULL)
- return ASN1_MEM_ALLOC_ERROR;
+ {
+ _asn1_free (value_temp);
+ return ASN1_MEM_ALLOC_ERROR;
+ }
_asn1_convert_integer (p2->value,
default_temp,
@@ -470,7 +482,10 @@ asn1_write_value (ASN1_TYPE node_root, const char *name,
p2 = p2->right;
}
if (p2 == NULL)
- return ASN1_VALUE_NOT_VALID;
+ {
+ _asn1_free (value_temp);
+ return ASN1_VALUE_NOT_VALID;
+ }
}
diff --git a/lib/minitasn1/libtasn1.h b/lib/minitasn1/libtasn1.h
index fd35867367..d7d4f70a7c 100644
--- a/lib/minitasn1/libtasn1.h
+++ b/lib/minitasn1/libtasn1.h
@@ -31,7 +31,7 @@ extern "C"
{
#endif
-#define LIBTASN1_VERSION "1.4"
+#define LIBTASN1_VERSION "1.5"
#include <sys/types.h>
#include <time.h>