[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU libtasn1 branch, master, updated. libtasn1_2_13-29-g5f2b8fa
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU libtasn1 branch, master, updated. libtasn1_2_13-29-g5f2b8fa |
Date: |
Thu, 20 Sep 2012 16:41:37 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libtasn1".
http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=5f2b8fa3134a2b7a4225a410c4220400b53d5e75
The branch, master has been updated
via 5f2b8fa3134a2b7a4225a410c4220400b53d5e75 (commit)
via 4b008554bb6f4c6b18053e020166bcb24d6fe656 (commit)
from a5042fee63fb88b3132389aa65eeda31aca899fa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5f2b8fa3134a2b7a4225a410c4220400b53d5e75
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Thu Sep 20 18:39:21 2012 +0200
other small fix
commit 4b008554bb6f4c6b18053e020166bcb24d6fe656
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Thu Sep 20 18:34:55 2012 +0200
Some small optimizations and better checking of tree accesses.
-----------------------------------------------------------------------
Summary of changes:
lib/decoding.c | 21 +++++++++++++++++----
lib/parser_aux.c | 5 ++++-
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/lib/decoding.c b/lib/decoding.c
index 4f21d24..c500417 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -728,8 +728,6 @@ _asn1_get_octet_string (const unsigned char *der, ASN1_TYPE
node, int *len)
asn1_length_der (tot_len, temp, &len2);
_asn1_set_value (node, temp, len2);
- tot_len += len2;
-
ret = _asn1_extract_der_octet (node, der, *len);
if (ret != ASN1_SUCCESS)
return ret;
@@ -741,9 +739,10 @@ _asn1_get_octet_string (const unsigned char *der,
ASN1_TYPE node, int *len)
len2 = asn1_get_length_der (der, *len, &len3);
if (len2 < 0)
return ASN1_DER_ERROR;
- if (node)
- _asn1_set_value (node, der, len3 + len2);
+
counter = len3 + len2;
+ if (node)
+ _asn1_set_value (node, der, counter);
}
*len = counter;
@@ -2248,6 +2247,9 @@ asn1_der_decoding_startEnd (ASN1_TYPE element, const void
*ider, int len,
p = node;
while (1)
{
+ if (p == NULL)
+ return ASN1_DER_ERROR;
+
ris = ASN1_SUCCESS;
if (move != UP)
@@ -2255,6 +2257,9 @@ asn1_der_decoding_startEnd (ASN1_TYPE element, const void
*ider, int len,
if (p->type & CONST_SET)
{
p2 = _asn1_find_up (p);
+ if (p2 == NULL)
+ return ASN1_DER_ERROR;
+
len2 = _asn1_strtol (p2->value, NULL, 10);
if (len2 == -1)
{
@@ -2274,7 +2279,9 @@ asn1_der_decoding_startEnd (ASN1_TYPE element, const void
*ider, int len,
}
else if (counter > len2)
return ASN1_DER_ERROR;
+
p2 = p2->down;
+
while (p2)
{
if ((p2->type & CONST_SET) && (p2->type & CONST_NOT_USED))
@@ -2286,6 +2293,9 @@ asn1_der_decoding_startEnd (ASN1_TYPE element, const void
*ider, int len,
else
{
p3 = p2->down;
+ if (p3 == NULL)
+ return ASN1_DER_ERROR;
+
ris =
_asn1_extract_tag_der (p3, der + counter,
len - counter, &len2);
@@ -2309,6 +2319,9 @@ asn1_der_decoding_startEnd (ASN1_TYPE element, const void
*ider, int len,
if (type_field (p->type) == TYPE_CHOICE)
{
p = p->down;
+ if (p == NULL)
+ return ASN1_DER_ERROR;
+
ris =
_asn1_extract_tag_der (p, der + counter, len - counter,
&len2);
diff --git a/lib/parser_aux.c b/lib/parser_aux.c
index 1d22951..7b89355 100644
--- a/lib/parser_aux.c
+++ b/lib/parser_aux.c
@@ -867,7 +867,10 @@ _asn1_check_identifier (ASN1_TYPE node)
p2 = asn1_find_node (node, name2);
if (p2 == NULL)
{
- _asn1_strcpy (_asn1_identifierMissing, p->value);
+ if (p->value)
+ _asn1_strcpy (_asn1_identifierMissing, p->value);
+ else
+ _asn1_strcpy (_asn1_identifierMissing, "(null)");
return ASN1_IDENTIFIER_NOT_FOUND;
}
}
hooks/post-receive
--
GNU libtasn1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU libtasn1 branch, master, updated. libtasn1_2_13-29-g5f2b8fa,
Nikos Mavrogiannopoulos <=