Seg fault caused by Buffer::putRawData(const string &s)
-------------------------------------------------------

                 Key: QPID-3148
                 URL: https://issues.apache.org/jira/browse/QPID-3148
             Project: Qpid
          Issue Type: Improvement
         Environment: C++ Broker 0.8
            Reporter: http


I have the problem while using Header exchange.The queue and binding to header 
exhcange are created.The args of binding is very long,so have Seg fault.And 
then I find the bad point at Buffer::putRawData(const string &s)
The code as follows:
uint32_t len = s.length();
s.copy(data + position, len);
position +=len;

If the length of string s is greater than the length of data, then error 
occurrs. Why don't check the length and then copy?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to