[vlc-commits] dash: Fixing a crash with invalid XML documents.

Hugo Beauzée-Luyssen git at videolan.org
Wed Nov 30 01:21:17 CET 2011


vlc/vlc-1.2 | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Mon Nov 28 14:10:20 2011 +0100| [d5c041349e3cdc3bb3855718898755a86734a369] | committer: Jean-Baptiste Kempf

dash: Fixing a crash with invalid XML documents.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 5e7910c3766da1568b2be169e6733f1dd6e7f7e7)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=d5c041349e3cdc3bb3855718898755a86734a369
---

 modules/stream_filter/dash/xml/DOMParser.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/stream_filter/dash/xml/DOMParser.cpp b/modules/stream_filter/dash/xml/DOMParser.cpp
index 1616167..c522de3 100644
--- a/modules/stream_filter/dash/xml/DOMParser.cpp
+++ b/modules/stream_filter/dash/xml/DOMParser.cpp
@@ -71,7 +71,7 @@ Node*   DOMParser::processNode              ()
 {
     const char *data;
     int type = xml_ReaderNextNode(this->vlc_reader, &data);
-    if(type != XML_READER_TEXT && type != XML_READER_NONE && type != XML_READER_ENDELEM)
+    if(type != -1 && type != XML_READER_TEXT && type != XML_READER_NONE && type != XML_READER_ENDELEM)
     {
         Node *node = new Node();
 



More information about the vlc-commits mailing list