aboutsummaryrefslogtreecommitdiff
path: root/projects/openexr
diff options
context:
space:
mode:
authormetamerism <70122622+metamerism@users.noreply.github.com>2020-08-24 18:13:33 +1200
committerGitHub <noreply@github.com>2020-08-23 23:13:33 -0700
commitbe6237a51693a016041386baa96b03c6404bb909 (patch)
tree1a43fde28a96fd3a6060a380df42a50a8297aa10 /projects/openexr
parenta02946e8f46d5e4fcbd456ec9799ed398e0480c5 (diff)
downloadoss-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.cc6
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));