Gerald Pfeifer <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]