From 9a52eb09edf2f5001f33f2227cc3888ef2e8c338 Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Tue, 24 Jun 2014 11:37:49 -0700 Subject: Fix and integer overflow issue in SDK's QuickSort BUG=382639 R=mdempsky@chromium.org Review URL: https://codereview.chromium.org/354673002 --- fpdfsdk/include/fsdk_mgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3