qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Conway (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PROTON-1225) c++: taking address of element 0 of an empty string or vector
Date Thu, 02 Jun 2016 18:37:59 GMT
Alan Conway created PROTON-1225:
-----------------------------------

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