Remove four useless checks in dlls/gdi32/enhmetafile.c (RESEND)

Alexandre Julliard julliard at winehq.org
Mon Dec 3 05:04:49 CST 2007


Gerald Pfeifer <gerald at pfeifer.com> writes:

> Ahhh!  A lightbulb goes on.  Since this is input from the outside, and
> thus completely out of our control, you are worried about overflows, that
> is, the sum of the two values (offset and size) being within range, but
> not the individual parts.  
>
> Is this what you've been after? :-)

It's closer, but overflow should be treated as an error even if the
result is within range.

> Updated patch below.  (Now I only wonder whether the <= in the original
> code shouldn't have been <, and thus the > in my code shouldn't be >=,
> but that's a separate issue.)

It depends if you are testing a position or a size. Please spend some
more time thinking about it, and send a patch with the correct checks.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list