mirror of https://gerrit.osmocom.org/asn1c
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:
parent
6f3a88fc0f
commit
b1790312da
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue