diff --git a/common/tlv.c b/common/tlv.c index 6813c585a..0058b67ca 100644 --- a/common/tlv.c +++ b/common/tlv.c @@ -214,9 +214,9 @@ parse_ber_header (unsigned char const **buffer, size_t *size, else { unsigned long len = 0; - int count = c & 0x7f; + int count = (c & 0x7f); - if (count > sizeof (len) || count > sizeof (size_t)) + if (count > (sizeof(len)= 'a' && *pattern <= 'z')