Uploaded image for project: 'OASIS Message Queuing Telemetry Transport (MQTT) TC'
  1. OASIS Message Queuing Telemetry Transport (MQTT) TC
  2. MQTT-296

Variable Byte Integer decode does not check for shortest encoding

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              edbriggs Ed Briggs [X] (Inactive)
              Reporter:
              ken.borgendale Ken Borgendale (Inactive)
            • Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: