[PATCH 3/6] odbccp32: Clean up SQLGetInstalledDrivers().

Zebediah Figura z.figura12 at gmail.com
Tue May 22 10:06:09 CDT 2018


On 22/05/18 09:46, Alexandre Julliard wrote:
> Zebediah Figura <z.figura12 at gmail.com> writes:
> 
>> +    RegQueryInfoKeyW(drivers, 0, 0, 0, 0, 0, 0, 0, &valuelen, 0, 0, 0);
>> +    value = heap_alloc(++valuelen * sizeof(WCHAR));
> 
> I'll put this is for now, but note that using RegQueryInfoKey() is
> almost always a bug. There's no guarantee that the maximum size won't
> change, so the right way is to grow the buffer as needed.
> 

Thanks, I'll send a patch to fix it after today's commits.



More information about the wine-devel mailing list