src/lib/libvisio_xml.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ce4e77cc8c716db1080bdebd63393268ff075aa6
Author: David Tardon <dtar...@redhat.com>
Date:   Thu Apr 20 16:04:09 2017 +0200

    avoid possible null ptr deref.
    
    Change-Id: I61807799dd0a36d9796d4580d85068207e92e26b

diff --git a/src/lib/libvisio_xml.cpp b/src/lib/libvisio_xml.cpp
index 18214b2..225d42f 100644
--- a/src/lib/libvisio_xml.cpp
+++ b/src/lib/libvisio_xml.cpp
@@ -96,7 +96,8 @@ void XMLErrorWatcher::setError()
 xmlTextReaderPtr xmlReaderForStream(librevenge::RVNGInputStream *input, const 
char *URL, const char *encoding, int options, XMLErrorWatcher *const watcher)
 {
   xmlTextReaderPtr reader = xmlReaderForIO(vsdxInputReadFunc, 
vsdxInputCloseFunc, (void *)input, URL, encoding, options);
-  xmlTextReaderSetErrorHandler(reader, vsdxReaderErrorFunc, watcher);
+  if (reader)
+    xmlTextReaderSetErrorHandler(reader, vsdxReaderErrorFunc, watcher);
   return reader;
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to