https://git.reactos.org/?p=reactos.git;a=commitdiff;h=247c1892639e74b73927af...
commit 247c1892639e74b73927af8a27c95ebd094c5634 Author: Nguyen Trung Khanh nguyentrungkhanh97@gmail.com AuthorDate: Tue Aug 25 23:28:39 2020 +0700 Commit: GitHub noreply@github.com CommitDate: Tue Aug 25 19:28:39 2020 +0300
[NTGDI] Fix stack memory disclosure in ftGdiGetTextMetricsW (#2991) --- win32ss/gdi/ntgdi/freetype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index c53bf1a12aa..79c825f0170 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -4560,6 +4560,7 @@ ftGdiGetTextMetricsW( EngSetLastError(STATUS_INVALID_PARAMETER); return FALSE; } + RtlZeroMemory(ptmwi, sizeof(TMW_INTERNAL));
if (!(dc = DC_LockDc(hDC))) { @@ -4612,7 +4613,6 @@ ftGdiGetTextMetricsW( FillTM(&ptmwi->TextMetric, FontGDI, pOS2, pHori, !Error ? &Win : 0);
/* FIXME: Fill Diff member */ - RtlZeroMemory(&ptmwi->Diff, sizeof(ptmwi->Diff)); }
IntUnLockFreeType();