Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1236

DOMCharacterDataImpl::DOMCharacterDataImpl don't put termination zero.(when reuse string)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.6.0
    • Component/s: DOM
    • Labels:
      None
    • Environment:
      MSVC++ 7.1 STLport 4.6.2

      Description

      Autotest tests\DOM\Normalizer\Normalizer.cpp fails.

      Reason:
      See: src\xercesc\dom\impl\DOMCharacterDataImpl.cpp

      DOMCharacterDataImpl::DOMCharacterDataImpl(DOMDocument *doc, const XMLCh *dat)
      : fDataBuf(0)
      , fDoc(0)
      {
      fDoc = (DOMDocumentImpl*)doc;

      fDataBuf = fDoc->popBuffer();
      if (!fDataBuf)
      fDataBuf = new (fDoc) DOMBuffer(fDoc, dat);// null terminated
      else

      { fDataBuf->set(dat); fDataBuf->chop(fDataBuf->getLen());// FIX! should manually terminate raw buffer. }

      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sealaunch Denis Badikov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: