summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ Stern <zalman@google.com>2020-05-12 13:32:09 -0700
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-05-17 21:09:54 +0000
commit2e8f1f0dc5ca3db8a7035938752dd230608e17ab (patch)
treed2bd15857f5bff3e418772dffcfb6d6782663730
parent021f4f74994635d7739d637f206aca1949eadc0a (diff)
downloaddng_sdk-2e8f1f0dc5ca3db8a7035938752dd230608e17ab.tar.gz
Targeted minimal fix for security issue in CVE-2020-9589.
Bug: 156261521 Test: If0722deb96def186fcd0a2d97e57647a1b5987f8 Change-Id: I380c158e465a995a5b0f88021cbf10bbf050db00 Merged-In: I380c158e465a995a5b0f88021cbf10bbf050db00 (cherry picked from commit 8051967ac143c7e07ee636315cee8b56874e22c3)
-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.