gdi32: Avoid overflows for invalid coordinates in line clipping.

This commit is contained in:
Alexandre Julliard 2012-02-22 11:27:58 +01:00
parent f20e07b77b
commit 556267bde4
1 changed files with 2 additions and 1 deletions

View File

@ -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) */
BOOL clipped = FALSE;
DWORD start_oc, end_oc;
const int bias = params->bias;