OpenEXR/CVE-2021-23169.patch
2021-06-22 15:26:04 +08:00

35 lines
1.3 KiB
Diff

From ae6d203892cc9311917a7f4f05354ef792b3e58e Mon Sep 17 00:00:00 2001
From: peterhillman <peterh@wetafx.co.nz>
Date: Thu, 3 Dec 2020 10:53:32 +1300
Subject: [PATCH] Handle xsampling and bad seekg() calls in exrcheck (#872)
* fix exrcheck xsampling!=1
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
* fix handling bad seekg() calls in exrcheck
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
* fix deeptile detection in multipart files
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
---
src/lib/OpenEXR/ImfDeepTiledInputFile.cpp | 2 +-
src/lib/OpenEXRUtil/ImfCheckFile.cpp | 20 ++++++++++++--------
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/lib/OpenEXR/ImfDeepTiledInputFile.cpp b/src/lib/OpenEXR/ImfDeepTiledInputFile.cpp
index f5abe9c6a..94452905c 100644
--- a/IlmImf/ImfDeepTiledInputFile.cpp
+++ b/IlmImf/ImfDeepTiledInputFile.cpp
@@ -960,7 +960,7 @@ DeepTiledInputFile::compatibilityInitialize(OPENEXR_IMF_INTERNAL_NAMESPACE::IStr
void
DeepTiledInputFile::multiPartInitialize(InputPartData* part)
{
- if (isTiled(part->header.type()) == false)
+ if (part->header.type() != DEEPTILE)
THROW (IEX_NAMESPACE::ArgExc, "Can't build a DeepTiledInputFile from a part of type " << part->header.type());
_data->_streamData = part->mutex;