diff options
author | metamerism <70122622+metamerism@users.noreply.github.com> | 2020-08-24 18:13:33 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-23 23:13:33 -0700 |
commit | be6237a51693a016041386baa96b03c6404bb909 (patch) | |
tree | 1a43fde28a96fd3a6060a380df42a50a8297aa10 /projects/openexr | |
parent | a02946e8f46d5e4fcbd456ec9799ed398e0480c5 (diff) | |
download | oss-fuzz-be6237a51693a016041386baa96b03c6404bb909.tar.gz |
[openexr] fix memleak in scanlinefuzzer with wide images (#4356)
Diffstat (limited to 'projects/openexr')
-rw-r--r-- | projects/openexr/openexr_scanlines_fuzzer.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/projects/openexr/openexr_scanlines_fuzzer.cc b/projects/openexr/openexr_scanlines_fuzzer.cc index 26623a1fc..bb9f51089 100644 --- a/projects/openexr/openexr_scanlines_fuzzer.cc +++ b/projects/openexr/openexr_scanlines_fuzzer.cc @@ -77,8 +77,10 @@ static void readMulti(IStream& is) { int w = dw.max.x - dw.min.x + 1; int dx = dw.min.x; - if (w > (1 << 24)) return; - + if (w > (1 << 24)) + { + throw std::logic_error("ignoring - very wide datawindow\n"); + } Array<Rgba> pixels(w); FrameBuffer i; i.insert("R", Slice(HALF, (char *)&(pixels[-dx].r), sizeof(Rgba), 0)); |