r21979 by craig - Coverity 253655: Dereference before NULL check in imported WPG library

scribus-commit scribus-commit at lists.scribus.net
Sun Apr 23 08:19:59 UTC 2017


Author: craig
Date: Sun Apr 23 08:19:59 2017
New Revision: 21979

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21979
Log:
Coverity 253655: Dereference before NULL check in imported WPG library

Modified:
    trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp

Modified: trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21979&path=/trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp	(original)
+++ trunk/Scribus/scribus/third_party/wpg/WPGStreamImplementation.cpp	Sun Apr 23 08:19:59 2017
@@ -403,6 +403,8 @@
 ::WPXInputStream* WPGMemoryStream::getDocumentOLEStream(const char * name)
 {
 	Storage *tmpStorage = new Storage( d->buffer );
+	if (!tmpStorage)
+		return (::WPXInputStream*)0;
 	Stream tmpStream( tmpStorage, name );
 	if (!tmpStorage || (tmpStorage->result() != Storage::Ok)  || !tmpStream.size())
 	{




More information about the scribus-commit mailing list