[PATCH 3/6] odbccp32: Clean up SQLGetInstalledDrivers().
Alexandre Julliard
julliard at winehq.org
Tue May 22 09:46:42 CDT 2018
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.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list