OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

mqtt message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [OASIS Issue Tracker] (MQTT-296) Variable Byte Integer decode does not check for shortest encoding

    [ https://issues.oasis-open.org/browse/MQTT-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=63365#comment-63365 ] 

Ken Borgendale commented on MQTT-296:

It is actually a pretty simple check that the first byte of the Variable Byte Integer is not 0x80.  

It would be fine with me to say the sender MUST use the minimum length encoding, which then implies that the receiver MAY check it.  I think the current text implies this but it would be better to spell this out explicitly.  In V3.1.1 our tendency was to require that the receiver check most things so this is a bit of an anomaly. 

> Variable Byte Integer decode does not check for shortest encoding
> -----------------------------------------------------------------
>                 Key: MQTT-296
>                 URL: https://issues.oasis-open.org/browse/MQTT-296
>             Project: OASIS Message Queuing Telemetry Transport (MQTT) TC
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 5
>            Reporter: Ken Borgendale
> The algorithm shown for decoding a Variable Byte Integer (section 1.5.5) does not check for non-minimal length encodings.  For instance the byte sequence 0x80,0x80,0x80,0x01 would decode the value 1 even though this encoding does not match the requirements in the normative text.
> If we mean to allow non-minimal length encodings of Variable Byte Integer then we should say so, otherwise we should clearly state the only the minimum length encoding is allowed, and change the decode algorithm to detect this and throw an error.

This message was sent by Atlassian JIRA

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]