SHA256
1
0
forked from pool/xerces-c
xerces-c/xerces-c-CVE-2016-2099.patch
Ismail Dönmez 4ede327720 Accepting request 402773 from home:pjanouch:branches:devel:libraries:c_c++
- added xerces-c-CVE-2016-2099.patch
  Exception handling mistake causing use after free
  (bsc#979208, CVE-2016-2099)
- xerces-c-CVE-2016-0729.patch
  Fix for mishandling certain kinds of malformed input documents,
  resulting in buffer overlows during processing and error reporting.
  The overflows can manifest as a segmentation fault or as memory
  corruption during a parse operation. (bsc#966822, CVE-2016-0729)

OBS-URL: https://build.opensuse.org/request/show/402773
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/xerces-c?expand=0&rev=21
2016-06-18 16:00:10 +00:00

20 lines
682 B
Diff

--- src/xercesc/validators/DTD/DTDScanner.cpp (revision 1741478)
+++ src/xercesc/validators/DTD/DTDScanner.cpp (working copy)
@@ -2509,7 +2509,15 @@
{
while (true)
{
- const XMLCh nextCh = fReaderMgr->peekNextChar();
+ XMLCh nextCh;
+
+ try {
+ nextCh = fReaderMgr->peekNextChar();
+ }
+ catch (XMLException& ex) {
+ fScanner->emitError(XMLErrs::XMLException_Fatal, ex.getCode(), ex.getMessage(), NULL, NULL);
+ nextCh = chNull;
+ }
if (!nextCh)
{