From e90320f819ad03c2531c654380cbe58789fa0906 Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 24 Mar 2010 01:13:24 +0000 Subject: [PATCH] fix multibyte tag encoding --- fmt_asn1tag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmt_asn1tag.c b/fmt_asn1tag.c index 8189cae..8fa1605 100644 --- a/fmt_asn1tag.c +++ b/fmt_asn1tag.c @@ -4,7 +4,7 @@ /* as used in ASN.1 tags */ size_t fmt_asn1tag(char* dest,enum asn1_tagclass tc,enum asn1_tagtype tt,unsigned long l) { /* encoding is either l%128 or (0x1f,...) */ - size_t needed=(sizeof l)*7/8,i; + size_t needed=((sizeof l)*7)/8,i; if (l<0x1f) { if (dest) *dest=(int)tc+(int)tt+(l&0x1f); return 1;