Module: wine Branch: master Commit: b5e9aed2681d0a4944c1623a55964c9de22992a0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b5e9aed2681d0a4944c1623a55...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Fri Aug 29 16:03:51 2008 -0400
richedit: Prevent integer overflow in wrapping code with no wrap.
---
dlls/riched20/wrap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index a3c5d54..6f6e32c 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -377,7 +377,7 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) }
/* will current run fit? */ - if (wc->pt.x + run->nWidth > wc->context->pt.x + wc->nAvailWidth) + if (wc->pt.x + run->nWidth - wc->context->pt.x > wc->nAvailWidth) { int loc = wc->context->pt.x + wc->nAvailWidth - wc->pt.x; /* total white run ? */