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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-c-0.27.1
    • proton-c-0.28.0
    • python-binding
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: