stricter bounds checking

git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1109 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2006-04-16 08:57:39 +00:00
parent 6f3a88fc0f
commit b1790312da
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ der_tlv_length_serialize(ber_tlv_len_t len, void *bufp, size_t size) {
break;
}
if(size < required_size)
if(size <= required_size)
return required_size + 1;
*buf++ = (uint8_t)(0x80 | required_size); /* Length of the encoding */