mirror of https://gerrit.osmocom.org/asn1c
X.691 specifies an octet full of zeroes as a valid complete encoding.
This commit is contained in:
parent
109ade5f81
commit
a6dd57a927
|
@ -106,7 +106,9 @@ uper_open_type_get_simple(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td,
|
|||
if(rv.code == RC_OK) {
|
||||
/* Check padding validity */
|
||||
padding = spd.nbits - spd.nboff;
|
||||
if(padding < 8 && per_get_few_bits(&spd, padding) == 0) {
|
||||
if (((rv.consumed == 0 && padding == 8) /* X.691#10.1.3 */
|
||||
|| padding < 8) &&
|
||||
per_get_few_bits(&spd, padding) == 0) {
|
||||
/* Everything is cool */
|
||||
FREEMEM(buf);
|
||||
return rv;
|
||||
|
|
Loading…
Reference in New Issue