[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
2025-01-23 23:20:54 +01:00
parent bab23a250b
commit dbf784472e
+2 -2
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)