_asn1_expand_object_id: addressed crash when no value is present is node
With a specially crafted ASN.1 description _asn1_expand_object_id,
passes a null pointer as p4->value to the function _asn1_str_cat,
which expects a pointer to a string. This patch addresses the issue.
Reported by Pascal Cuoq.
diff --git a/lib/parser_aux.c b/lib/parser_aux.c
index a42cdd2..52700c6 100644
--- a/lib/parser_aux.c
+++ b/lib/parser_aux.c
@@ -792,6 +792,9 @@
{
if (type_field (p4->type) == ASN1_ETYPE_CONSTANT)
{
+ if (p4->value == NULL)
+ return ASN1_VALUE_NOT_FOUND;
+
if (name2[0])
_asn1_str_cat (name2, sizeof (name2), ".");
_asn1_str_cat (name2, sizeof (name2),