You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/05/07 13:34:00 UTC

[jira] [Commented] (PROTON-2038) [Python] ubyte (and other unsigned types) can hold negative value

    [ https://issues.apache.org/jira/browse/PROTON-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16834764#comment-16834764 ] 

ASF subversion and git services commented on PROTON-2038:
---------------------------------------------------------

Commit 4067cf5265ef1b8fbf70e05545e2a88053c10805 in qpid-proton's branch refs/heads/master from Kim van der Riet
[ https://gitbox.apache.org/repos/asf?p=qpid-proton.git;h=4067cf5 ]

PROTON-2038: A simple fix for preventing the initialization of unsigned proton types with negative values. A test has also been added.


> [Python] ubyte (and other unsigned types) can hold negative value
> -----------------------------------------------------------------
>
>                 Key: PROTON-2038
>                 URL: https://issues.apache.org/jira/browse/PROTON-2038
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Major
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org