Author: akhaldi
Date: Sun Sep 17 22:56:55 2017
New Revision: 75894
URL:
http://svn.reactos.org/svn/reactos?rev=75894&view=rev
Log:
[PROPSYS] Sync with Wine Staging 2.16. CORE-13762
7960ed9 propsys: Don't use the format string size as buffer size.
Modified:
trunk/reactos/dll/win32/propsys/propvar.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/propsys/propvar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/propsys/propvar.…
==============================================================================
--- trunk/reactos/dll/win32/propsys/propvar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/propsys/propvar.c [iso-8859-1] Sun Sep 17 22:56:55 2017
@@ -34,22 +34,16 @@
switch (vt)
{
case VT_LPSTR:
- {
- static const char format[] = "%04d/%02d/%02d:%02d:%02d:%02d.%03d";
-
- ppropvarDest->u.pszVal = HeapAlloc(GetProcessHeap(), 0,
- sizeof(format));
+ ppropvarDest->u.pszVal = HeapAlloc(GetProcessHeap(), 0, 64);
if (!ppropvarDest->u.pszVal)
return E_OUTOFMEMORY;
- snprintf( ppropvarDest->u.pszVal, sizeof(format),
- format,
+ sprintf( ppropvarDest->u.pszVal,
"%04d/%02d/%02d:%02d:%02d:%02d.%03d",
time.wYear, time.wMonth, time.wDay,
time.wHour, time.wMinute, time.wSecond,
time.wMilliseconds );
return S_OK;
- }
default:
FIXME("Unhandled target type: %d\n", vt);
@@ -102,14 +96,24 @@
*res = 0;
break;
case VT_LPSTR:
- *res = _strtoi64(pv->u.pszVal, NULL, 0);
+ {
+ char *end;
+ *res = _strtoi64(pv->u.pszVal, &end, 0);
+ if (pv->u.pszVal == end)
+ return DISP_E_TYPEMISMATCH;
src_signed = *res < 0;
break;
+ }
case VT_LPWSTR:
case VT_BSTR:
- *res = strtolW(pv->u.pwszVal, NULL, 0);
+ {
+ WCHAR *end;
+ *res = strtolW(pv->u.pwszVal, &end, 0);
+ if (pv->u.pwszVal == end)
+ return DISP_E_TYPEMISMATCH;
src_signed = *res < 0;
break;
+ }
default:
FIXME("unhandled vt %d\n", pv->vt);
return E_NOTIMPL;
@@ -240,7 +244,7 @@
case VT_BSTR:
if (propvarIn->u.pwszVal)
{
- DWORD size = (strlenW(propvarIn->u.pwszVal) + 1) * sizeof(WCHAR);
+ DWORD size = (lstrlenW(propvarIn->u.pwszVal) + 1) * sizeof(WCHAR);
res = CoTaskMemAlloc(size);
if(!res) return E_OUTOFMEMORY;
memcpy(res, propvarIn->u.pwszVal, size);
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Sep 17 22:56:55 2017
@@ -151,7 +151,7 @@
reactos/dll/win32/pidgen # Synced to WineStaging-2.9
reactos/dll/win32/powrprof # Forked at Wine-1.0rc5
reactos/dll/win32/printui # Synced to WineStaging-2.9
-reactos/dll/win32/propsys # Synced to WineStaging-2.9
+reactos/dll/win32/propsys # Synced to WineStaging-2.16
reactos/dll/win32/pstorec # Synced to WineStaging-2.2
reactos/dll/win32/qmgr # Synced to WineStaging-2.9
reactos/dll/win32/qmgrprxy # Synced to WineStaging-2.9