buffer too small for currency

Alexandre Julliard julliard at winehq.org
Tue Feb 24 15:23:40 CST 2004


Fabian Cenedese <Cenedese at indel.ch> writes:

> The found value (info->Data) should only be copied to (buffer) if its length (len)
> is big enough. len is given in bytes (8 for the above call with a buffer of 4 WCHARs).
> But the length of the data (ret) is in WCHAR units. So the comparison here
> is completely wrong. Ok, I could change this to len/sizeof(WCHAR). But that's
> still not enough because of the comparison before about info->Data[ret-1].

len is supposed to be in WCHARs too, most likely the caller is not
passing the correct size.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list