asn1_write_value: allow SET_OF elements deletion
authorJean-Louis Thekekara <jean-louis.thekekara@openwide.fr>
Tue, 25 Mar 2014 12:41:37 +0000 (13:41 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 28 Mar 2014 13:44:07 +0000 (14:44 +0100)
SET_OF elements could just be deleted as SEQUENCE_OF ones.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
lib/element.c

index 8604c24..3e26d84 100644 (file)
@@ -290,7 +290,7 @@ asn1_write_value (asn1_node node_root, const char *name,
 
   type = type_field (node->type);
 
-  if ((type == ASN1_ETYPE_SEQUENCE_OF) && (value == NULL) && (len == 0))
+  if ((type == ASN1_ETYPE_SEQUENCE_OF || type == ASN1_ETYPE_SET_OF) && (value == NULL) && (len == 0))
     {
       p = node->down;
       while ((type_field (p->type) == ASN1_ETYPE_TAG)