Project

General

Profile

Actions

Bug #4167

closed

tlv::writeNonNegativeInteger suboptimal encoding of 253-255

Added by Junxiao Shi almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Base
Target version:
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 #1

Updated by Junxiao Shi almost 7 years ago

  • Status changed from In Progress to Code review
Actions #2

Updated by Junxiao Shi almost 7 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF