From 9abdf266322ed0824af16ff43478f175704d3fb2 Mon Sep 17 00:00:00 2001 From: Lev Walkin Date: Wed, 21 Feb 2007 19:27:45 +0000 Subject: [PATCH] bits unused constraint failure --- skeletons/BIT_STRING.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skeletons/BIT_STRING.c b/skeletons/BIT_STRING.c index 8acea86c..9b982712 100644 --- a/skeletons/BIT_STRING.c +++ b/skeletons/BIT_STRING.c @@ -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; 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, "%s: invalid padding byte (%s:%d)", td->name, __FILE__, __LINE__);