richedit: Prevent integer overflow in wrapping code with no wrap

Dylan Smith dylan.ah.smith at gmail.com
Fri Aug 29 15:03:51 CDT 2008


The integer nAvailWidth get set to the largest possible number to avoid
wrapping when wrapping is turned off. This means that adding anything
to this integer will cause an overflow. This integer overflow can be
handled by subtracting from the left side of the comparison rather than
adding to the right side which overflows.

This patch attempts to fix Bug 15020.
---
 dlls/riched20/wrap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-richedit-Prevent-integer-overflow-in-wrapping-co.diff.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20080829/b367b8d3/attachment.txt 


More information about the wine-patches mailing list