[WIN32SS:NTGDI] FontFamilyFillInfo(): Check returned IntGetOutlineTextMetrics() size...

... before allocating pool memory, as it is done everywhere else in the code.
This commit is contained in:
Hermès Bélusca-Maïto 2024-09-14 18:05:40 +02:00
parent bab23a250b
commit dbf784472e
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -3472,11 +3472,11 @@ FontFamilyFillInfo(PFONTFAMILYINFO Info, LPCWSTR FaceName,
RtlZeroMemory(Info, sizeof(FONTFAMILYINFO));
ASSERT_FREETYPE_LOCK_HELD();
Size = IntGetOutlineTextMetrics(FontGDI, 0, NULL, TRUE);
if (!Size)
return;
Otm = ExAllocatePoolWithTag(PagedPool, Size, GDITAG_TEXT);
if (!Otm)
{
return;
}
ASSERT_FREETYPE_LOCK_HELD();
Size = IntGetOutlineTextMetrics(FontGDI, Size, Otm, TRUE);
if (!Size)