26 Jan
2024
26 Jan
'24
7:47 p.m.
Esme Povirk (@madewokherd) commented about dlls/gdiplus/image.c:
+ + if (effect->type == RedEyeCorrectionEffect) + { + if ((paramsize-size > 0) || (((size-paramsize)%sizeof(RECT)) != 0)) + return InvalidParameter; + } + else + { + if (paramsize != size) + return InvalidParameter; + } + + if (!effect->params) + effect->params = malloc(size); + else + effect->params = realloc(effect->params, size); The if statement is not needed, `realloc` works in both cases.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4661#note_59202