https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1bf982ff88b1c0400c1a6…
commit 1bf982ff88b1c0400c1a66ed9aaa8faeba74a75c
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Oct 22 09:29:15 2019 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Tue Oct 22 09:29:15 2019 +0900
[WIN32SS][NTGDI] 'otm' is always non-NULL in epilogue
---
win32ss/gdi/ntgdi/font.c | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/win32ss/gdi/ntgdi/font.c b/win32ss/gdi/ntgdi/font.c
index ba51f26608d..db79c534ca6 100644
--- a/win32ss/gdi/ntgdi/font.c
+++ b/win32ss/gdi/ntgdi/font.c
@@ -928,25 +928,24 @@ NtGdiGetOutlineTextMetricsInternalW (HDC hDC,
return 0;
}
IntGetOutlineTextMetrics(FontGDI, Size, potm);
- if (otm)
+
+ _SEH2_TRY
{
- _SEH2_TRY
- {
- ProbeForWrite(otm, Size, 1);
- RtlCopyMemory(otm, potm, Size);
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- Status = _SEH2_GetExceptionCode();
- }
- _SEH2_END
+ ProbeForWrite(otm, Size, 1);
+ RtlCopyMemory(otm, potm, Size);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = _SEH2_GetExceptionCode();
+ }
+ _SEH2_END
- if (!NT_SUCCESS(Status))
- {
- EngSetLastError(ERROR_INVALID_PARAMETER);
- Size = 0;
- }
+ if (!NT_SUCCESS(Status))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ Size = 0;
}
+
ExFreePoolWithTag(potm,GDITAG_TEXT);
return Size;
}