You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alan Conway (JIRA)" <ji...@apache.org> on 2016/06/02 18:37:59 UTC
[jira] [Created] (PROTON-1225) c++: taking address of element 0 of
an empty string or vector
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