summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ Stern <zalman@google.com>2020-05-14 16:40:04 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-14 16:40:04 +0000
commitab47f56729930f6fdaeb751ebe16c99093bfee6a (patch)
tree69e166f9fb255929d7df2ccd70f3fb6a8759e70e
parent759bdc15304df2bf53d8d1707f3aea3d5a6bbf37 (diff)
parent17f4b85725e3efd6efd83d44ed2439b9b706409c (diff)
downloaddng_sdk-ab47f56729930f6fdaeb751ebe16c99093bfee6a.tar.gz
Targeted minimal fix for security issue in CVE-2020-9589. am: 8051967ac1 am: 17f4b85725
Change-Id: I802d25a18c01dd363636e88157fa223143e70dd6
-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.