[PATCH] gdiplus: Handle some degenerate cases with GdipCreatePath2.
Jeff Smith
whydoubt at gmail.com
Thu Apr 9 23:30:38 CDT 2020
On Thu, Apr 9, 2020 at 3:22 PM Nikolay Sivov <nsivov at codeweavers.com> wrote:
>
> On 4/9/20 10:52 PM, Jeff Smith wrote:
> > + if(count <= 0) {
> > + *path = NULL;
> > + return OutOfMemory;
> > + }
> Could this be a side effect of treating count as unsigned? By the way,
> actual allocations of point or types arrays are not checked.
First, 0 results in the same behaviour as -1.
Second, some hacky tests I did further suggest that it is being
treated as signed.
I've found no evidence to suggest it is being handled as unsigned.
> > #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
> > #define expectf(expected, got) ok(fabs(expected - got) < 2.0, "Expected %.2f, got %.2f\n", expected, got)
> > +#define expectp(expected, got) ok(got == expected, "Expected %p, got %p\n", expected, got)
> > #define POINT_TYPE_MAX_LEN (75)
> In my opinion we should get rid of such macros, not add more. Especially
> for floating point tests.
I don't mind dropping this one. I only use it a few times anyway.
More information about the wine-devel
mailing list