aboutsummaryrefslogtreecommitdiff
path: root/projects/openexr
diff options
context:
space:
mode:
authorseabeepea <seabeepea@gmail.com>2020-08-06 06:10:51 -0700
committerGitHub <noreply@github.com>2020-08-06 06:10:51 -0700
commit9743eb4bf3370f2e9b823558693160dd4956e464 (patch)
treea2dcea3d879bd8887b6367e522e82ad07d369a41 /projects/openexr
parent65a83e21258a636eb00ec8291b873e7c35a46ab2 (diff)
downloadoss-fuzz-9743eb4bf3370f2e9b823558693160dd4956e464.tar.gz
Catch all exceptions via (...) rather than by explicit type (#4260)
The purpose of the fuzzer is to very that an exception is thrown, not to validate that the correct *type* of exception is thrown. That is the responsibility of the project's traditional test suite. Therefore, the exception type is inconsequential. Signed-off-by: Cary Phillips <seabeepea@gmail.com>
Diffstat (limited to 'projects/openexr')
-rw-r--r--projects/openexr/openexr_deepscanlines_fuzzer.cc4
-rw-r--r--projects/openexr/openexr_deeptiles_fuzzer.cc2
-rw-r--r--projects/openexr/openexr_exrenvmap_fuzzer.cc5
-rw-r--r--projects/openexr/openexr_exrheader_fuzzer.cc4
4 files changed, 5 insertions, 10 deletions
diff --git a/projects/openexr/openexr_deepscanlines_fuzzer.cc b/projects/openexr/openexr_deepscanlines_fuzzer.cc
index 93ef29b76..a91671e4b 100644
--- a/projects/openexr/openexr_deepscanlines_fuzzer.cc
+++ b/projects/openexr/openexr_deepscanlines_fuzzer.cc
@@ -122,7 +122,7 @@ static void readFileSingle(IStream& is, uint64_t width, uint64_t height) {
try {
readFile(file);
- } catch (std::exception &e) {
+ } catch (...) {
}
delete file;
@@ -145,7 +145,7 @@ static void readFileMulti(IStream& is) {
}
try {
readFile(inpart);
- } catch (std::exception &e) {
+ } catch (...) {
}
delete inpart;
}
diff --git a/projects/openexr/openexr_deeptiles_fuzzer.cc b/projects/openexr/openexr_deeptiles_fuzzer.cc
index b4f0e056f..27a79faea 100644
--- a/projects/openexr/openexr_deeptiles_fuzzer.cc
+++ b/projects/openexr/openexr_deeptiles_fuzzer.cc
@@ -126,7 +126,7 @@ static void readFileSingle(IStream& is) {
try {
readFile(file);
- } catch (std::exception &e) {
+ } catch (...) {
}
delete file;
diff --git a/projects/openexr/openexr_exrenvmap_fuzzer.cc b/projects/openexr/openexr_exrenvmap_fuzzer.cc
index bb1b81717..b9be068df 100644
--- a/projects/openexr/openexr_exrenvmap_fuzzer.cc
+++ b/projects/openexr/openexr_exrenvmap_fuzzer.cc
@@ -85,10 +85,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
compression, mapWidth,
filterRadius, numSamples,
false);
- } catch (IEX_NAMESPACE::InputExc& e) {
- ;
- } catch (IEX_NAMESPACE::ArgExc& e) {
- ;
+ } catch (...) {
}
unlink(file);
diff --git a/projects/openexr/openexr_exrheader_fuzzer.cc b/projects/openexr/openexr_exrheader_fuzzer.cc
index 45cec2d37..33c8534b1 100644
--- a/projects/openexr/openexr_exrheader_fuzzer.cc
+++ b/projects/openexr/openexr_exrheader_fuzzer.cc
@@ -222,9 +222,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
try {
dumpInfo(is);
- } catch (IEX_NAMESPACE::InputExc& e) {
- ;
- } catch (IEX_NAMESPACE::ArgExc& e) {
+ } catch (...) {
;
}