Commit 9abdf266 authored by Lev Walkin's avatar Lev Walkin

bits unused constraint failure

parent 2c23dcaf
...@@ -50,7 +50,8 @@ BIT_STRING_constraint(asn_TYPE_descriptor_t *td, const void *sptr, ...@@ -50,7 +50,8 @@ BIT_STRING_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
if(st && st->buf) { if(st && st->buf) {
if(st->size == 1 && st->bits_unused) { if((st->size == 0 && st->bits_unused)
|| st->bits_unused < 0 || st->bits_unused > 7) {
_ASN_CTFAIL(app_key, td, sptr, _ASN_CTFAIL(app_key, td, sptr,
"%s: invalid padding byte (%s:%d)", "%s: invalid padding byte (%s:%d)",
td->name, __FILE__, __LINE__); td->name, __FILE__, __LINE__);
......
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