summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ Stern <zalman@google.com>2020-05-12 13:32:09 -0700
committerZ Stern <zalman@google.com>2020-05-13 11:25:06 -0700
commitff80ee8239cf84e7a75fa8ef9818fd38d28e2214 (patch)
tree5b0d0aef7376bb98bf5eafbe400a16d467ea54fe
parent125e7e881b3f739a3f15853fefba7d96dc6b9d68 (diff)
downloaddng_sdk-ff80ee8239cf84e7a75fa8ef9818fd38d28e2214.tar.gz
Targeted minimal fix for security issue in CVE-2020-9589.
(Second commit to fix doubled clause in predicate due to cut and paste error. Does not change behavior. Commits squashed.) Change-Id: I380c158e465a995a5b0f88021cbf10bbf050db00
-rw-r--r--source/dng_lossless_jpeg.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/dng_lossless_jpeg.cpp b/source/dng_lossless_jpeg.cpp
index e3b0576..9d0d01a 100644
--- a/source/dng_lossless_jpeg.cpp
+++ b/source/dng_lossless_jpeg.cpp
@@ -2277,7 +2277,7 @@ void dng_lossless_decoder::DecodeImage ()
#if qSupportHasselblad_3FR
- if (info.Ss == 8)
+ if (info.Ss == 8 && (numCOL & 1) == 0)
{
fHasselblad3FR = true;
@@ -2412,7 +2412,7 @@ void dng_lossless_decoder::DecodeImage ()
// For the rest of the column on this row, predictor
// calculations are based on PSV.
- if (compsInScan == 2 && info.Ss == 1)
+ if (compsInScan == 2 && info.Ss == 1 && numCOL > 1)
{
// This is the combination used by both the Canon and Kodak raw formats.