[jira] [Updated] (XERCESC-1701) Xerces-C++ Allows junk after root element (null characters)

2022-09-08 Thread Benjamin Fritz (Jira)


 [ 
https://issues.apache.org/jira/browse/XERCESC-1701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Fritz updated XERCESC-1701:

Attachment: basic_bad_bytes3.xml

> Xerces-C++ Allows junk after root element (null characters)
> ---
>
> Key: XERCESC-1701
> URL: https://issues.apache.org/jira/browse/XERCESC-1701
> Project: Xerces-C++
>  Issue Type: Bug
>  Components: Non-Validating Parser
>Affects Versions: 3.0.1
> Environment: WindowsXP
>Reporter: Maarten Koskamp
>Priority: Major
> Attachments: basic_bad_bytes3.xml, sample.xml, version.incl
>
>
> Xerces-C allows a sequence of null characters after the document root at the 
> end of the xml instance.
> XML Specifiction states that only white-space is allowed after the document 
> root. 
> See attached sample for details.
> Info about the affected version of the parser is also added as an attachment 
> to this issue.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org



Re: [jira] Updated: (XERCESC-1701) Xerces-C++ Allows junk after root element (null characters)

2012-08-23 Thread Denis Excoffier

Still a problem in 3.1.1. Patch included.

Regards,

Denis Excoffier.

On Tue, Nov 03, 2009 at 09:36:00AM +, Boris Kolpackov (JIRA) wrote:
 
  [ 
 https://issues.apache.org/jira/browse/XERCESC-1701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
  ]
 
 Boris Kolpackov updated XERCESC-1701:
 -
 
 Affects Version/s: (was: 2.7.0)
3.0.1
 
 Still a problem in 3.0.1.
 
  Xerces-C++ Allows junk after root element (null characters)
  ---
 
  Key: XERCESC-1701
  URL: https://issues.apache.org/jira/browse/XERCESC-1701
  Project: Xerces-C++
   Issue Type: Bug
   Components: Non-Validating Parser
 Affects Versions: 3.0.1
  Environment: WindowsXP
 Reporter: Maarten Koskamp
  Attachments: sample.xml, version.incl
 
 
  Xerces-C allows a sequence of null characters after the document root at 
  the end of the xml instance.
  XML Specifiction states that only white-space is allowed after the 
  document root. 
  See attached sample for details.
  Info about the affected version of the parser is also added as an 
  attachment to this issue.
 
 -- 
 This message is automatically generated by JIRA.
 -
 You can reply to this email to add a comment to the issue online.
 
 
 -
 To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
 For additional commands, e-mail: c-dev-h...@xerces.apache.org
 
 
 
diff -uNr xerces-c-3.1.1o/src/xercesc/internal/DGXMLScanner.cpp 
xerces-c-3.1.1p/src/xercesc/internal/DGXMLScanner.cpp
--- xerces-c-3.1.1o/src/xercesc/internal/DGXMLScanner.cpp   2009-11-05 
14:21:03.0 +0059
+++ xerces-c-3.1.1p/src/xercesc/internal/DGXMLScanner.cpp   2012-08-06 
10:45:26.765625000 +0159
@@ -1407,7 +1407,7 @@
 
 //  It was some special case character so do all of the checks and
 //  deal with it.
-if (!nextCh)
+if (!nextCh  fReaderMgr.atEOF())
 ThrowXMLwithMemMgr(UnexpectedEOFException, 
XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
 
 if (nextCh == chForwardSlash)
@@ -1858,7 +1858,7 @@
 
 //  It was some special case character so do all of the checks and
 //  deal with it.
-if (!nextCh)
+if (!nextCh  fReaderMgr.atEOF())
 ThrowXMLwithMemMgr(UnexpectedEOFException, 
XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
 
 if (nextCh == chForwardSlash)
@@ -2812,7 +2812,7 @@
 {
 nextCh = fReaderMgr.getNextChar();
 
-if (!nextCh)
+if (!nextCh  fReaderMgr.atEOF())
 ThrowXMLwithMemMgr(UnexpectedEOFException, 
XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
 
 // Check for our ending quote in the same entity
@@ -3021,7 +3021,7 @@
 const XMLCh nextCh = fReaderMgr.getNextChar();
 
 // Watch for unexpected end of file
-if (!nextCh)
+if (!nextCh  fReaderMgr.atEOF())
 {
 emitError(XMLErrs::UnterminatedCDATASection);
 ThrowXMLwithMemMgr(UnexpectedEOFException, 
XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
diff -uNr xerces-c-3.1.1o/src/xercesc/internal/IGXMLScanner.cpp 
xerces-c-3.1.1p/src/xercesc/internal/IGXMLScanner.cpp
--- xerces-c-3.1.1o/src/xercesc/internal/IGXMLScanner.cpp   2009-11-20 
14:43:50.0 +0059
+++ xerces-c-3.1.1p/src/xercesc/internal/IGXMLScanner.cpp   2012-08-06 
10:46:25.703125000 +0159
@@ -762,7 +762,7 @@
 
 //  It was some special case character so do all of the checks and
 //  deal with it.
-if (!nextCh)
+if (!nextCh  fReaderMgr.atEOF())
 ThrowXMLwithMemMgr(UnexpectedEOFException, 
XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
 
 if (nextCh == chForwardSlash)
@@ -1910,7 +1910,7 @@
 
 //  It was some special case character so do all of the checks and
 //  deal with it.
-if (!nextCh)
+if (!nextCh  fReaderMgr.atEOF())
 ThrowXMLwithMemMgr(UnexpectedEOFException, 
XMLExcepts::Gen_UnexpectedEOF, fMemoryManager);
 
 if (nextCh == chForwardSlash)
diff -uNr xerces-c-3.1.1o/src/xercesc/internal/IGXMLScanner2.cpp 
xerces-c-3.1.1p/src/xercesc/internal/IGXMLScanner2.cpp
--- xerces-c-3.1.1o/src/xercesc/internal/IGXMLScanner2.cpp  2010-03-19 
15:29:23.0 +0059
+++ xerces-c-3.1.1p/src/xercesc/internal/IGXMLScanner2.cpp  2012-08-06 
10:47:39.46875 +0159
@@ -2271,7 +2271,7 @@
 // Its got to at least be a valid XML character
 if 
(!fReaderMgr.getCurrentReader()-isXMLChar(nextCh))
 {
-if (nextCh == 0)
+if (nextCh == 0  fReaderMgr.atEOF())
 

[jira] Updated: (XERCESC-1701) Xerces-C++ Allows junk after root element (null characters)

2009-11-03 Thread Boris Kolpackov (JIRA)

 [ 
https://issues.apache.org/jira/browse/XERCESC-1701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Boris Kolpackov updated XERCESC-1701:
-

Affects Version/s: (was: 2.7.0)
   3.0.1

Still a problem in 3.0.1.

 Xerces-C++ Allows junk after root element (null characters)
 ---

 Key: XERCESC-1701
 URL: https://issues.apache.org/jira/browse/XERCESC-1701
 Project: Xerces-C++
  Issue Type: Bug
  Components: Non-Validating Parser
Affects Versions: 3.0.1
 Environment: WindowsXP
Reporter: Maarten Koskamp
 Attachments: sample.xml, version.incl


 Xerces-C allows a sequence of null characters after the document root at the 
 end of the xml instance.
 XML Specifiction states that only white-space is allowed after the document 
 root. 
 See attached sample for details.
 Info about the affected version of the parser is also added as an attachment 
 to this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org



[jira] Updated: (XERCESC-1701) Xerces-C++ Allows junk after root element (null characters)

2007-05-10 Thread Maarten Koskamp (JIRA)

 [ 
https://issues.apache.org/jira/browse/XERCESC-1701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maarten Koskamp updated XERCESC-1701:
-

Attachment: sample.xml

Sample document containin null characters after the document element

 Xerces-C++ Allows junk after root element (null characters)
 ---

 Key: XERCESC-1701
 URL: https://issues.apache.org/jira/browse/XERCESC-1701
 Project: Xerces-C++
  Issue Type: Bug
  Components: Non-Validating Parser
Affects Versions: 2.7.0
 Environment: WindowsXP
Reporter: Maarten Koskamp
 Attachments: sample.xml, version.incl


 Xerces-C allows a sequence of null characters after the document root at the 
 end of the xml instance.
 XML Specifiction states that only white-space is allowed after the document 
 root. 
 See attached sample for details.
 Info about the affected version of the parser is also added as an attachment 
 to this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Updated: (XERCESC-1701) Xerces-C++ Allows junk after root element (null characters)

2007-05-10 Thread Maarten Koskamp (JIRA)

 [ 
https://issues.apache.org/jira/browse/XERCESC-1701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maarten Koskamp updated XERCESC-1701:
-

Attachment: version.incl

Information regarding the affected version of Xalan-C++

 Xerces-C++ Allows junk after root element (null characters)
 ---

 Key: XERCESC-1701
 URL: https://issues.apache.org/jira/browse/XERCESC-1701
 Project: Xerces-C++
  Issue Type: Bug
  Components: Non-Validating Parser
Affects Versions: 2.7.0
 Environment: WindowsXP
Reporter: Maarten Koskamp
 Attachments: sample.xml, version.incl


 Xerces-C allows a sequence of null characters after the document root at the 
 end of the xml instance.
 XML Specifiction states that only white-space is allowed after the document 
 root. 
 See attached sample for details.
 Info about the affected version of the parser is also added as an attachment 
 to this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]