[PATCH] cryptui: fixed bad sizeof() (Coverity)

Vitaliy Margolen wine-devel at kievinfo.com
Wed Feb 23 08:29:41 CST 2011


On 02/22/2011 09:30 PM, Marcus Meissner wrote:
> Hi,
>
> CID 1181. copying a pointer to a struct into a struct is likely bad,
> fixed.
>
> -    memcpy(&infoW,&info, sizeof(info));
> +    memcpy(&infoW, info, sizeof(*info));
Should probably use direct struct copying instead:
infoW = *info;

Vitaliy.



More information about the wine-devel mailing list