[PATCH] comctl32: Fixed strncpy (Coverity)

David Laight david at l8s.co.uk
Tue Jun 28 12:09:30 CDT 2011


On Tue, Jun 28, 2011 at 09:37:39AM +0200, Michael Stefaniuc wrote:
> Hello Marcus,
> 
> On 06/28/2011 09:15 AM, Marcus Meissner wrote:
> > This is a 2 CHAR buffer, and we copy in 1 CHAR and \0. So just do that
> > via strcpy() and dont confuse the static checker.
...
> > -    strncpy(buff, "x", sizeof(buff)/sizeof(CHAR));
> > +    strcpy(buff, "x");

What is wrong with:
	buff[0] = 'x';
	buff[1] = 0;

	David

-- 
David Laight: david at l8s.co.uk



More information about the wine-patches mailing list