From c21b18b668b9efc0dc14257e1e43a85c1ccea807 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 13 Dec 2012 12:13:14 +0100 Subject: [PATCH] coverity: do not let CMXDocument::isSupported throw --- src/lib/CMXDocument.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/CMXDocument.cpp b/src/lib/CMXDocument.cpp index 35d361d..9845552 100644 --- a/src/lib/CMXDocument.cpp +++ b/src/lib/CMXDocument.cpp @@ -45,6 +45,7 @@ Analyzes the content of an input stream to see if it can be parsed stream is a Corel Draw Document that libcdr is able to parse */ bool libcdr::CMXDocument::isSupported(WPXInputStream *input) +try { input->seek(0, WPX_SEEK_SET); unsigned riff = readU32(input); @@ -62,6 +63,10 @@ bool libcdr::CMXDocument::isSupported(WPXInputStream *input) return false; return true; } +catch (...) +{ + return false; +} /** Parses the input stream content. It will make callbacks to the functions provided by a -- 1.8.0.1