summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-06-02 17:10:32 +0200
committerDavid Tardon <dtardon@redhat.com>2014-06-02 17:10:32 +0200
commit6fb847a013c351af04125b4c7e5a9aaab861afde (patch)
tree53259c005e9f3aa12aaeea24ccede99ef4c73734
parentd731971eba5bac0859a7be23249842d1ff572f7a (diff)
coverity#1219715 dereference after null check
Change-Id: I36ddbef50da52dcf1e22b47d94a759606fd818a2
-rw-r--r--src/lib/libmspub_utils.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libmspub_utils.cpp b/src/lib/libmspub_utils.cpp
index 9749902..3628e14 100644
--- a/src/lib/libmspub_utils.cpp
+++ b/src/lib/libmspub_utils.cpp
@@ -255,7 +255,11 @@ uint8_t libmspub::readU8(librevenge::RVNGInputStream *input)
{
if (!input || input->isEnd())
{
- MSPUB_DEBUG_MSG(("Something bad happened here!Tell: %ld\n", input->tell()));
+ MSPUB_DEBUG_MSG(("Something bad happened here!"));
+ if (input)
+ {
+ MSPUB_DEBUG_MSG((" Tell: %ld\n", input->tell()));
+ }
throw EndOfStreamException();
}
unsigned long numBytesRead;