Skip to content

Commit

Permalink
[WIN32SS:NTGDI] FontFamilyFillInfo(): Check returned IntGetOutlineTex…
Browse files Browse the repository at this point in the history
…tMetrics() size...

... before allocating pool memory, as it is done everywhere else in the code.
  • Loading branch information
HBelusca committed Jan 23, 2025
1 parent bab23a2 commit dbf7844
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions win32ss/gdi/ntgdi/freetype.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dbf7844

Please sign in to comment.