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

Access violation exception was thrown from scanFirst(..) function of SGXMLScanner, it crashes the application.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 2.7.0
    • None
    • Operating System :- Windows -7, Windows 2008 R2 Server
      Software used :- MS Visual Studio 2010-Premium edition
      Hardware :- ACPI x64 based PC, 8GB RAM

    Description

      The following are the code piece that cause the problem.

      string systemid("c:\\projects
      my.xml");
      XMLPScanToken token;

      std::auto_ptr<XMLGrammarPool> poolP(new XMLGrammarPoolImpl (XMLPlatformUtils::fgMemoryManager));
      GrammarResolver grammarResolver(poolP.get());

      SGXMLScanner scanner(0, 0, 0, 0, 0, &grammarResolver);

      scanner.setDoValidation(false);
      scanner.setDoNamespaces(false);
      scanner.setExitOnFirstFatal(true);

      LocalFileInputSource inpSource((const XMLCh *)systemid.c_str());
      scanner.scanFirst(inpSource, token);

      There is an access violation exception was thrown from scanFirst(..) function.

      PS. I would like to submit both the sample that reproduce this issue and the fix in Xerces-C++ that resolves the issue. Please let me know to where I have to upload them. I would love to do it.

      Attachments

        1. XercesBug.h
          1 kB
          Sahayaraj
        2. XercesBug.cpp
          1 kB
          Sahayaraj
        3. SGXMLScanner.cpp
          174 kB
          Sahayaraj

        Activity

          People

            Unassigned Unassigned
            ssahayaraj Sahayaraj
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: