[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU libtasn1 branch, master, updated. libtasn1_3_4-13-g4f80477
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU libtasn1 branch, master, updated. libtasn1_3_4-13-g4f80477 |
Date: |
Tue, 15 Apr 2014 10:12:21 +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=4f804770ddc711b0033dc13d4cbe89cd39efc8e4
The branch, master has been updated
via 4f804770ddc711b0033dc13d4cbe89cd39efc8e4 (commit)
from e6d1e6050560eb30fef592d33ca130a48edf29ab (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 4f804770ddc711b0033dc13d4cbe89cd39efc8e4
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Tue Apr 15 12:12:06 2014 +0200
fixed several coverity reported bugs.
-----------------------------------------------------------------------
Summary of changes:
lib/coding.c | 16 ++++++++++------
lib/parser_aux.c | 4 ++--
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/lib/coding.c b/lib/coding.c
index ef2f96f..70cd14f 100644
--- a/lib/coding.c
+++ b/lib/coding.c
@@ -474,6 +474,8 @@ _asn1_complete_explicit_tag (asn1_node node, unsigned char
*der,
if (node->type & CONST_TAG)
{
p = node->down;
+ if (p == NULL)
+ return ASN1_DER_ERROR;
/* When there are nested tags we must complete them reverse to
the order they were created. This is because completing a tag
modifies all data within it, including the incomplete tags
@@ -708,7 +710,7 @@ _asn1_ordering_set (unsigned char *der, int der_len,
asn1_node node)
struct vet *first, *last, *p_vet, *p2_vet;
asn1_node p;
unsigned char class, *temp;
- unsigned long tag;
+ unsigned long tag, t;
counter = 0;
@@ -716,8 +718,8 @@ _asn1_ordering_set (unsigned char *der, int der_len,
asn1_node node)
return;
p = node->down;
- while ((type_field (p->type) == ASN1_ETYPE_TAG)
- || (type_field (p->type) == ASN1_ETYPE_SIZE))
+ while (p && ((type_field (p->type) == ASN1_ETYPE_TAG) ||
+ (type_field (p->type) == ASN1_ETYPE_SIZE)))
p = p->right;
if ((p == NULL) || (p->right == NULL))
@@ -743,7 +745,9 @@ _asn1_ordering_set (unsigned char *der, int der_len,
asn1_node node)
(der + counter, der_len - counter, &class, &len2,
&tag) != ASN1_SUCCESS)
return;
- p_vet->value = (class << 24) | tag;
+
+ t = class << 24;
+ p_vet->value = t | tag;
counter += len2;
/* extraction and length */
@@ -829,8 +833,8 @@ _asn1_ordering_set_of (unsigned char *der, int der_len,
asn1_node node)
return;
p = node->down;
- while ((type_field (p->type) == ASN1_ETYPE_TAG)
- || (type_field (p->type) == ASN1_ETYPE_SIZE))
+ while (p && ((type_field (p->type) == ASN1_ETYPE_TAG) ||
+ (type_field (p->type) == ASN1_ETYPE_SIZE)))
p = p->right;
p = p->right;
diff --git a/lib/parser_aux.c b/lib/parser_aux.c
index fccfed5..6690f49 100644
--- a/lib/parser_aux.c
+++ b/lib/parser_aux.c
@@ -131,7 +131,7 @@ asn1_find_node (asn1_node pointer, const char *name)
while (p)
{
- if ((p->name) && nhash == p->name_hash && (!strcmp (p->name, n)))
+ if (nhash == p->name_hash && (!strcmp (p->name, n)))
break;
else
p = p->right;
@@ -909,7 +909,7 @@ _asn1_check_identifier (asn1_node node)
p = node;
while (p)
{
- if (type_field (p->type) == ASN1_ETYPE_IDENTIFIER)
+ if (p->value && type_field (p->type) == ASN1_ETYPE_IDENTIFIER)
{
_asn1_str_cpy (name2, sizeof (name2), node->name);
_asn1_str_cat (name2, sizeof (name2), ".");
hooks/post-receive
--
GNU libtasn1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU libtasn1 branch, master, updated. libtasn1_3_4-13-g4f80477,
Nikos Mavrogiannopoulos <=