Commit abb7133c authored by Vasil Velichkov's avatar Vasil Velichkov Committed by Lev Walkin

Fix UPER encoding of empty SEQUENCE OF

A length determinant was not added when the SEQUENCE OF was empty
according to the X.691 #20.6 and #11.9.4.1.

This fixes a failure in 16-SEQUENCE-bundle

Decoding 1 bytes of T yielded RC_WMORE after byte 0
Original random structure:
T ::= {
    list: list ::= {
    }
    guard: 01
}
parent 5fcbb286
......@@ -183,6 +183,14 @@ SEQUENCE_OF_encode_uper(const asn_TYPE_descriptor_t *td,
ct->effective_bits))
ASN__ENCODE_FAILED;
}
} else if (list->count == 0) {
/* When the list is empty add only the length determinant
* X.691, #20.6 and #11.9.4.1
*/
if (uper_put_length(po, 0, 0)) {
ASN__ENCODE_FAILED;
}
ASN__ENCODED_OK(er);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment