Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Unified Diff: fpdfsdk/include/fsdk_mgr.h

Issue 354673002: Fix and integer overflow issue in SDK's QuickSort (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/fsdk_mgr.h
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index bb25b35e976d4f6f84c63bc93482df7f53f3284b..e6a9219c88301920c698732aca401c25b10d7fed 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698