summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ Stern <zalman@google.com>2020-05-15 15:51:22 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-15 15:51:22 +0000
commit221ebf384edb610d16fd449794846ba0e9037865 (patch)
tree5b0d0aef7376bb98bf5eafbe400a16d467ea54fe
parentb9fdfc4cf8d3b1be47282c48b769c2bbece37052 (diff)
parentb6815a19d102c5ba320fe8af86caea66286afc5b (diff)
downloaddng_sdk-221ebf384edb610d16fd449794846ba0e9037865.tar.gz
Targeted minimal fix for security issue in CVE-2020-9589. am: 8051967ac1 am: 17f4b85725 am: ab47f56729 am: 0d886a49d3 am: ecb2edbc9a am: dd40fd0c8c am: 234929445c am: a3a89a2c0a am: b6815a19d1
Change-Id: I711e9e385591fa43f84b7360a9a7f5f2e8c3bd91
-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.