Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-2038

[Python] ubyte (and other unsigned types) can hold negative value

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: proton-c-0.27.1
    • Fix Version/s: proton-c-0.28.0
    • Component/s: python-binding
    • Labels:
      None

      Description

      Python representations of:

      proton.ubyte
      proton.ushort
      proton.uint
      proton.ulong

      can hold a negative value, even though they should be unsigned.

      import proton
      print proton.ubyte(-1)
      print proton.ushort(-1)
      print proton.uint(-1)
      print proton.ulong(-1)

      results in

      -1
      -1
      -1
      -1

       If an unsigned type containing a negative value is used in a message in any context, it can cause an Overflow exception to be thrown within Proton.

        Attachments

          Activity

            People

            • Assignee:
              kpvdr Kim van der Riet
              Reporter:
              kpvdr Kim van der Riet
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: