summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-09-13 21:10:23 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-09-13 21:10:23 +0000
commit110bbb0e349dc9b2c00c2d64ed9a270a7587ec2c (patch)
treed49fb775bdf32dcb66fe70a228c476446d4fbe31
parent16536429c0cdc1e5530ed847872d452e74aef553 (diff)
parentdd092c6c8a0f76a38cf89168a4f5db04583caecb (diff)
downloaddng_sdk-110bbb0e349dc9b2c00c2d64ed9a270a7587ec2c.tar.gz
Merge cherrypicks of [2890126, 2889507, 2890138, 2890127, 2890128, 2891029, 2891030, 2891031, 2891032, 2891033, 2891034, 2891036, 2891037, 2891038, 2891039, 2891040, 2890763, 2890764, 2890765, 2890766, 2890767, 2890768, 2891129, 2891130, 2891131, 2890139, 2890140, 2890141, 2890142, 2890143, 2890144, 2890145, 2890536, 2891066, 2890146, 2891133, 2891134, 2891135, 2891452, 2891453, 2891454, 2891455, 2891456, 2891457, 2891458, 2890150, 2890151, 2891459, 2891460, 2891461, 2891462, 2891633, 2891638, 2891639, 2891790, 2891808, 2891849, 2891850, 2891759, 2891760, 2891929, 2891930, 2891643, 2891743, 2891716] into nyc-bugfix-releaseandroid-7.0.0_r36android-7.0.0_r35android-7.0.0_r34nougat-mr0.5-release
Change-Id: Id21d4e40aac66684bc89466b63ec95a50fb42dee
-rw-r--r--source/dng_ifd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/dng_ifd.cpp b/source/dng_ifd.cpp
index 317ebf9..7f22065 100644
--- a/source/dng_ifd.cpp
+++ b/source/dng_ifd.cpp
@@ -3979,7 +3979,7 @@ uint32 dng_ifd::TilesAcross () const
if (fTileWidth)
{
- return (fImageWidth + fTileWidth - 1) / fTileWidth;
+ return (SafeUint32Sub(SafeUint32Add(fImageWidth, fTileWidth), 1)) / fTileWidth;
}
@@ -3995,7 +3995,7 @@ uint32 dng_ifd::TilesDown () const
if (fTileLength)
{
- return (fImageLength + fTileLength - 1) / fTileLength;
+ return (SafeUint32Sub(SafeUint32Add(fImageLength, fTileLength), 1)) / fTileLength;
}