diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-19 13:10:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-19 14:49:56 +0200 |
commit | f02cee05a815f91d69626d18461dc384af089dfa (patch) | |
tree | c58ba87ba16d0c849ed5fadf7cbfaef13db409ef /vcl | |
parent | dc49b07446f15dd68a7469d4619954f5e13f6c17 (diff) |
ofz#3427: boost::bad_rational
I'm quite content for an exception on bogus input
Change-Id: Ie08396b3479114159e546395dca5370aed380378
Reviewed-on: https://gerrit.libreoffice.org/42469
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/workben/tiffuzzer.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vcl/workben/tiffuzzer.cxx b/vcl/workben/tiffuzzer.cxx index 200c0d339c03..b6d3df71f157 100644 --- a/vcl/workben/tiffuzzer.cxx +++ b/vcl/workben/tiffuzzer.cxx @@ -21,9 +21,15 @@ extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ); - Graphic aGraphic; - (void)itiGraphicImport(aStream, aGraphic, nullptr); + try + { + SvMemoryStream aStream(const_cast<uint8_t*>(data), size, StreamMode::READ); + Graphic aGraphic; + (void)itiGraphicImport(aStream, aGraphic, nullptr); + } + catch (...) + { + } return 0; } |