[Libreoffice-commits] libvisio.git: src/lib
David Tardon
dtardon at redhat.com
Thu Apr 20 14:06:52 UTC 2017
src/lib/libvisio_xml.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit ce4e77cc8c716db1080bdebd63393268ff075aa6
Author: David Tardon <dtardon at 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;
}
More information about the Libreoffice-commits
mailing list