support gcc 5 builtins for multiplication overflow in safemult.h

fix copypasted comment in fmt_asn1dertag
add man pages for add_of, sub_of and assign
This commit is contained in:
leitner
2015-09-29 14:42:40 +00:00
parent 6cfc16fc40
commit fb1f19042f
11 changed files with 141 additions and 1 deletions

View File

@@ -3,7 +3,7 @@
/* write int in least amount of bytes, return number of bytes */
/* as used in ASN.1 DER tag */
size_t fmt_asn1dertag(char* dest,unsigned long long l) {
/* encoding is either l%128 or (0x80+number of bytes,bytes) */
/* high bit says if more bytes are coming, lower 7 bits are payload; big endian */
size_t n=0,i;
unsigned long long t;
for (t=l, n=1; t>0x7f; t>>=7) ++n;