Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-3148

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • None
    • None
    • C++ Broker
    • None
    • C++ Broker 0.8

    Description

      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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            qpid-http http
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: