summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-06-24 11:37:49 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-06-24 11:37:49 -0700
commit9a52eb09edf2f5001f33f2227cc3888ef2e8c338 (patch)
tree9b213e19915db9bc559c9d22fec010305fb25e37
parent6c673585ed6bcb9e330ea5ab716f496c5d5f37b4 (diff)
downloadpdfium-9a52eb09edf2f5001f33f2227cc3888ef2e8c338.tar.xz
Fix and integer overflow issue in SDK's QuickSort
BUG=382639 R=mdempsky@chromium.org Review URL: https://codereview.chromium.org/354673002
-rw-r--r--fpdfsdk/include/fsdk_mgr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index bb25b35e97..e6a9219c88 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -564,7 +564,7 @@ private:
return;
}
- FX_UINT m = (nStartPos + nStopPos) / 2;
+ FX_UINT m = nStartPos + (nStopPos - nStartPos) / 2;
FX_UINT i = nStartPos;
TYPE Value = this->GetAt(m);