projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a081e12
)
[NTGDI] Fix stack memory disclosure in ftGdiGetTextMetricsW (#2991)
author
Nguyen Trung Khanh
<nguyentrungkhanh97@gmail.com>
Tue, 25 Aug 2020 16:28:39 +0000
(23:28 +0700)
committer
GitHub
<noreply@github.com>
Tue, 25 Aug 2020 16:28:39 +0000
(19:28 +0300)
win32ss/gdi/ntgdi/freetype.c
patch
|
blob
|
history
diff --git
a/win32ss/gdi/ntgdi/freetype.c
b/win32ss/gdi/ntgdi/freetype.c
index
c53bf1a
..
79c825f
100644
(file)
--- 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();