Commit 6df21d40 authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

propsys: Use snprintf in PROPVAR_ConvertFILETIME.

parent 68c09530
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment