Actions
Bug #4167
closedtlv::writeNonNegativeInteger suboptimal encoding of 253-255
Start date:
07/06/2017
Due date:
% Done:
0%
Estimated time:
1.50 h
Description
tlv::writeNonNegativeInteger
and tlv::sizeOfNonNegativeInteger
contain an incorrect condition, causing 253, 254, or 255 to be encoded as 2-octets instead of 1-octets.
NonNegativeInteger spec gives the example 255 => TT01FF
although it does not forbid using more than minimally necessary octets to encode a value, and therefore this encoding is suboptimal but still valid.
Actions