qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PROTON-1225) c++: taking address of element 0 of an empty string or vector
Date Thu, 02 Jun 2016 19:31:59 GMT

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

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

Commit b57e6ea7d7318caf83a36648164637ae2d3afa66 in qpid-proton's branch refs/heads/master
from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=b57e6ea ]

PROTON-1225: c++: taking address of element 0 of an empty string or vector

Added x.empty() checks and assertions to all uses of the &x[0] idiom.


> c++: taking address of element 0 of an empty string or vector
> -------------------------------------------------------------
>
>                 Key: PROTON-1225
>                 URL: https://issues.apache.org/jira/browse/PROTON-1225
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: cpp-binding
>    Affects Versions: 0.12.2
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>            Priority: Blocker
>             Fix For: 0.13.0
>
>
> This bug shows up in a couple places, fixing all. Originally pointed out on the user
list: 
> http://qpid.2158936.n2.nabble.com/Proton-C-0-12-2-C-vector-subscript-out-of-range-in-unit-tests-td7644983.html
> The problem is using the idiom &x[0] to get the address of storage in a string or
vector without first testing that it is not empty. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message