propsys: Use snprintf in PROPVAR_ConvertFILETIME.
Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
68c095302f
commit
6df21d4015
|
@ -50,13 +50,15 @@ static HRESULT PROPVAR_ConvertFILETIME(PROPVARIANT *ppropvarDest,
|
|||
static const char format[] = "%04d/%02d/%02d:%02d:%02d:%02d.%03d";
|
||||
|
||||
ppropvarDest->u.pszVal = HeapAlloc(GetProcessHeap(), 0,
|
||||
lstrlenA(format) + 1);
|
||||
sizeof(format));
|
||||
if (!ppropvarDest->u.pszVal)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
sprintf(ppropvarDest->u.pszVal, format, time.wYear, time.wMonth,
|
||||
time.wDay, time.wHour, time.wMinute,
|
||||
time.wSecond, time.wMilliseconds);
|
||||
snprintf( ppropvarDest->u.pszVal, sizeof(format),
|
||||
format,
|
||||
time.wYear, time.wMonth, time.wDay,
|
||||
time.wHour, time.wMinute, time.wSecond,
|
||||
time.wMilliseconds );
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue