Alexandre Julliard : gdi32: Avoid overflows for invalid coordinates in line clipping.
cdavis at mymail.mines.edu
Wed Feb 22 15:30:07 CST 2012
On Feb 22, 2012, at 1:27 PM, Alexandre Julliard wrote:
> --- a/dlls/gdi32/dibdrv/objects.c
> +++ b/dlls/gdi32/dibdrv/objects.c
> @@ -372,7 +372,8 @@ static inline DWORD calc_outcode(const POINT *pt, const RECT *clip)
> int clip_line(const POINT *start, const POINT *end, const RECT *clip,
> const bres_params *params, POINT *pt1, POINT *pt2)
> - int m, n;
> + INT64 m, n; /* 64-bit to avoid overflows (FIXME: find a more efficient way) */
What about MulDiv()? As I recall, this is the sort of situation for which it was designed. Or is that not efficient?
More information about the wine-devel