From e6faab594c83be12f57a51d418fee36a4547213c Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sat, 20 Jan 2018 12:40:35 +0100 Subject: [PATCH] Moved methods that can throw an exception inside the try/catch block. --- Magick++/fuzz/crop_fuzzer.cc | 2 +- Magick++/fuzz/rotate_fuzzer.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Magick++/fuzz/crop_fuzzer.cc b/Magick++/fuzz/crop_fuzzer.cc index d25714839..88093eac0 100644 --- a/Magick++/fuzz/crop_fuzzer.cc +++ b/Magick++/fuzz/crop_fuzzer.cc @@ -18,10 +18,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { Magick::Image image; try { image.read(blob); + image.crop(Magick::Geometry(Width, Height)); } catch (Magick::Exception &e) { return 0; } - image.crop(Magick::Geometry(Width, Height)); return 0; } diff --git a/Magick++/fuzz/rotate_fuzzer.cc b/Magick++/fuzz/rotate_fuzzer.cc index d4a03a7cc..205f91a96 100644 --- a/Magick++/fuzz/rotate_fuzzer.cc +++ b/Magick++/fuzz/rotate_fuzzer.cc @@ -17,10 +17,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { Magick::Image image; try { image.read(blob); + image.rotate(Degrees); } catch (Magick::Exception &e) { return 0; } - image.rotate(Degrees); return 0; } -- 2.40.0