summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-05-24 22:53:41 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-05-24 22:53:41 +0000
commit781748f0dc905a3a322500ed8ccc715b332f5f31 (patch)
treed49fb775bdf32dcb66fe70a228c476446d4fbe31
parent0420a20d94d620f471e47cf3f8c40facca5de58e (diff)
parent0680ae97c3f699e6f84661262a3ef2a6b88ae1e7 (diff)
downloaddng_sdk-nougat-mr2.3-release.tar.gz
Merge cherrypicks of [2310999, 2310925, 2310891, 2311000, 2310892, 2310858, 2310986, 2310963, 2311043, 2310928, 2311044, 2310990, 2311022, 2311023, 2310917, 2310994, 2311024, 2311045, 2310967, 2310995, 2311003, 2311059, 2311025, 2311060, 2310953, 2311061, 2311004, 2311046, 2311005, 2311047, 2311006, 2311079, 2310954, 2311026, 2310896, 2310898, 2310997, 2311062, 2310955, 2311029, 2310998, 2311080, 2311119, 2311030, 2310933, 2311140, 2311063, 2310934, 2311049, 2311050, 2311084, 2311031, 2311145, 2311164] into nyc-mr2-security-c-releaseandroid-7.1.2_r33android-7.1.2_r27nougat-mr2.3-release
Change-Id: I3910c6cc814c56e5dc69e513312fa640c8e9a59e
-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;
}