Author: dgorbachev
Date: Thu Sep 6 21:11:44 2012
New Revision: 57248
URL:
http://svn.reactos.org/svn/reactos?rev=57248&view=rev
Log:
[MOUNTMGR][NDIS]
Fix some string length calculations.
[CRT]
Declare variables extern.
[DMUSIC]
Fix a bug, already fixed in Wine.
Modified:
trunk/reactos/dll/directx/dmusic/collection.c
trunk/reactos/drivers/filters/mountmgr/mountmgr.c
trunk/reactos/drivers/network/ndis/ndis/misc.c
trunk/reactos/lib/sdk/crt/locale/locale.c
Modified: trunk/reactos/dll/directx/dmusic/collection.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dmusic/collect…
==============================================================================
--- trunk/reactos/dll/directx/dmusic/collection.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/dmusic/collection.c [iso-8859-1] Thu Sep 6 21:11:44 2012
@@ -209,8 +209,8 @@
if (pDesc->dwValidData & DMUS_OBJ_DATE)
This->pDesc->ftDate = pDesc->ftDate;
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) {
- memcpy (&This->pDesc->llMemLength, &pDesc->llMemLength, sizeof
(pDesc->llMemLength));
- memcpy (This->pDesc->pbMemData, pDesc->pbMemData, sizeof
(pDesc->pbMemData));
+ This->pDesc->llMemLength = pDesc->llMemLength;
+ memcpy (This->pDesc->pbMemData, pDesc->pbMemData, pDesc->llMemLength);
}
if (pDesc->dwValidData & DMUS_OBJ_STREAM) {
/* according to MSDN, we copy the stream */
Modified: trunk/reactos/drivers/filters/mountmgr/mountmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filters/mountmgr/m…
==============================================================================
--- trunk/reactos/drivers/filters/mountmgr/mountmgr.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filters/mountmgr/mountmgr.c [iso-8859-1] Thu Sep 6 21:11:44
2012
@@ -38,7 +38,7 @@
KEVENT UnloadEvent;
LONG Unloading;
-PWSTR Cunc = L"\\??\\C:";
+static const WCHAR Cunc[] = L"\\??\\C:";
/*
* TODO:
Modified: trunk/reactos/drivers/network/ndis/ndis/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/misc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/misc.c [iso-8859-1] Thu Sep 6 21:11:44 2012
@@ -139,7 +139,7 @@
return (NDIS_HANDLE)obj;
}
-const WCHAR* NDIS_FILE_FOLDER = L"\\SystemRoot\\System32\\Drivers\\";
+static const WCHAR NDIS_FILE_FOLDER[] = L"\\SystemRoot\\System32\\Drivers\\";
/*
* @implemented
@@ -242,8 +242,8 @@
*Status = NDIS_STATUS_SUCCESS;
FullFileName.Buffer = NULL;
- FullFileName.Length = sizeof(NDIS_FILE_FOLDER);
- FullFileName.MaximumLength = FileName->MaximumLength + sizeof(NDIS_FILE_FOLDER);
+ FullFileName.Length = sizeof(NDIS_FILE_FOLDER) - sizeof(UNICODE_NULL);
+ FullFileName.MaximumLength = FileName->MaximumLength + FullFileName.Length;
FullFileName.Buffer = ExAllocatePool ( NonPagedPool, FullFileName.MaximumLength );
if ( !FullFileName.Buffer )
Modified: trunk/reactos/lib/sdk/crt/locale/locale.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/locale/locale.…
==============================================================================
--- trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] Thu Sep 6 21:11:44 2012
@@ -74,8 +74,8 @@
LANGID found_lang_id;
} locale_search_t;
-unsigned int __setlc_active;
-unsigned int __unguarded_readlc_active;
+extern unsigned int __setlc_active;
+extern unsigned int __unguarded_readlc_active;
int _current_category; /* used by setlocale */
const char *_current_locale;