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

Xerces-C++ is not 64-bit safe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 3.1.0
    • 4.0.0
    • Build
    • None

    Description

      There are a number of places in DOM where unsigned int and unsigned long are used for indexes and sizes. These should be changed to XMLSize_t. Here is the grep result:

      DOMDocument.hpp: const unsigned long lineNum,
      DOMDocument.hpp: const unsigned long columnNum) = 0;
      DOMDocumentTraversal.hpp: unsigned long whatToShow,
      DOMDocumentTraversal.hpp: unsigned long whatToShow,
      DOMLocator.hpp: virtual unsigned long getLineNumber() const = 0;
      DOMLocator.hpp: virtual unsigned long getColumnNumber() const = 0;
      DOMLSParserFilter.hpp: virtual unsigned long getWhatToShow() const = 0;
      DOMLSSerializerFilter.hpp: virtual unsigned long getWhatToShow() const =0;
      DOMLSSerializerFilter.hpp: // unsigned long fWhatToShow;
      DOMNodeIterator.hpp: virtual unsigned long getWhatToShow() = 0;
      DOMTreeWalker.hpp: virtual unsigned long getWhatToShow()= 0;
      DOMTypeInfo.hpp: virtual bool isDerivedFrom(const XMLCh* typeNamespaceArg, const XMLCh* typeNameArg, unsigned long derivationMethod) const = 0;
      DOMXPathResult.hpp: virtual unsigned long getSnapshotLength() const = 0;
      DOMXPathResult.hpp: * @param index of type unsigned long - Index into the snapshot collection.
      DOMXPathResult.hpp: virtual const DOMNode* snapshotItem(unsigned long index) const = 0;

      DOMImplementationList.hpp: virtual DOMImplementation *item(unsigned int index) const = 0;
      DOMImplementationList.hpp: virtual unsigned int getLength() const = 0;
      DOMLSParser.hpp: virtual const XMLCh* getURIText(unsigned int uriId) const = 0;
      DOMNamedNodeMap.hpp: virtual DOMNode *item(unsigned int index) const = 0;
      DOMNamedNodeMap.hpp: virtual unsigned int getLength() const = 0;
      DOMNodeList.hpp: virtual DOMNode *item(unsigned int index) const = 0;
      DOMNodeList.hpp: virtual unsigned int getLength() const = 0;
      DOMStringList.hpp: virtual const XMLCh *item(unsigned int index) const = 0;
      DOMStringList.hpp: virtual unsigned int getLength() const = 0;

      Ideally, we should do such an audit of the entire codebase.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bsk Boris Kolpackov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: