[PATCH] Fix 16 bit StringFromGUID2 to not use wide characters

Dmitry Timoshkov dmitry at codeweavers.com
Mon May 19 05:58:15 CDT 2008


"Michael Karcher" <wine at mkarcher.dialup.fu-berlin.de> wrote:

> +INT WINAPI StringFromGUID2_16(REFGUID id, LPSTR str, INT cmax)
> +{
> +  char xguid[80];
> +  int           len;
> +
> +  if (WINE_StringFromCLSID( id, xguid ))
> +  return 0;
> +  
> +  len = strlen( xguid ) + 1; /* The terminating zero counts */
> +  if (len > cmax)
> +        return 0;
> +        
> +  strcpy( str, xguid );
> +  return len;
> +}

This is not an equivalent of the old implementation, is it really
supposed to fail if the buffer length is shorter than the guid?

-- 
Dmitry.



More information about the wine-devel mailing list