You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Andrew Stitcher (JIRA)" <ji...@apache.org> on 2019/05/14 14:21:00 UTC

[jira] [Commented] (PROTON-2046) pn_connection_set_container should check for null or empty string

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

Andrew Stitcher commented on PROTON-2046:
-----------------------------------------

{{pn_connection_set_container()}} has no return value so there isn't a way to reject a name except to just ignore bad ones.

If you give a null string to {{pn_connection_set_container()}} it will be treated as if it is an empty string. If you don't set any container name it will also be treated as if the container name is an empty string.

Given the lack of error return I don't think we can do any better than this.

> pn_connection_set_container should check for null or empty string
> -----------------------------------------------------------------
>
>                 Key: PROTON-2046
>                 URL: https://issues.apache.org/jira/browse/PROTON-2046
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>            Reporter: michael goulish
>            Priority: Major
>
> pn_connection_set_container() makes no checks of the ID string that gets passed in. This value is expected to be unique, so it should probably check for NULL and empty-string.
> I was passing in empty strings and it was cheerfully accepting them.
>  
>  



--
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