mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
bugfix: UNICODE_STRING objects are not null-terminated by default, but LoadLibraryW expects a null-terminated string.
svn path=/trunk/; revision=5444
This commit is contained in:
@@ -191,9 +191,14 @@ INT LoadProvider(
|
||||
WS_DbgPrint(MAX_TRACE, ("Loading provider at (0x%X) Name (%wZ).\n",
|
||||
Provider, &Provider->LibraryName));
|
||||
|
||||
if (Provider->hModule == INVALID_HANDLE_VALUE) {
|
||||
/* DLL is not loaded so load it now */
|
||||
Provider->hModule = LoadLibrary(Provider->LibraryName.Buffer);
|
||||
if (Provider->hModule == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
/* DLL is not loaded so load it now
|
||||
* UNICODE_STRING objects are not null-terminated, but LoadLibraryW
|
||||
* expects a null-terminated string
|
||||
*/
|
||||
Provider->LibraryName.Buffer[Provider->LibraryName.Length] = L'\0';
|
||||
Provider->hModule = LoadLibraryW(Provider->LibraryName.Buffer);
|
||||
if (Provider->hModule != INVALID_HANDLE_VALUE) {
|
||||
Provider->WSPStartup = (LPWSPSTARTUP)GetProcAddress(
|
||||
Provider->hModule,
|
||||
|
||||
Reference in New Issue
Block a user