Jeffrey Smith (@whydoubt) commented about dlls/gdiplus/image.c:
+ if ((paramsize-size > 0) || (((size-paramsize)%sizeof(RECT)) != 0)) + return InvalidParameter; + } + else + { + if (paramsize != size) + return InvalidParameter; + } + + effect->params = realloc(effect->params, size); + if (effect->type == RedEyeCorrectionEffect) + { + num = (size-paramsize)/sizeof(RECT); + ((struct RedEyeCorrectionParams *)effect->params)->numberOfAreas = num; + ((struct RedEyeCorrectionParams *)effect->params)->areas = malloc(num*sizeof(RECT)); + memcpy(((struct RedEyeCorrectionParams *)params)->areas, ((struct RedEyeCorrectionParams *)effect->params)->areas, num*sizeof(RECT)); `((struct RedEyeCorrectionParams *)effect->params)` appears in all three of these lines. It might improve readability here to make a variable out of this.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4661#note_62707