Skip to content

Commit

Permalink
Also fail when the user provides a preview image that has a zero size…
Browse files Browse the repository at this point in the history
… coordinate (#1164)

oss fuzz 39399

Signed-off-by: Kimball Thurston <kdt3rd@gmail.com>
  • Loading branch information
kdt3rd authored and cary-ilm committed Oct 24, 2021
1 parent ca29a70 commit 4552f2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/OpenEXRCore/parse_header.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ extract_attr_preview (
sz[0],
sz[1]);

if (fsize > 0 && bytes >= (uint64_t) fsize)
if (bytes == 0 || (fsize > 0 && bytes >= (uint64_t) fsize))
{
return ctxt->print_error (
ctxt,
Expand Down

0 comments on commit 4552f2e

Please sign in to comment.