https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5b83d86af52907ff7c77ff...
commit 5b83d86af52907ff7c77fff9c2fea3f5d714f5e6 Author: Thomas Faber thomas.faber@reactos.org AuthorDate: Tue Dec 31 21:07:39 2019 +0100 Commit: Thomas Faber thomas.faber@reactos.org CommitDate: Fri Jan 3 11:21:24 2020 +0100
[WIN32K:NTGDI] Add missing probe to NtGdiGetPath. --- win32ss/gdi/ntgdi/path.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/win32ss/gdi/ntgdi/path.c b/win32ss/gdi/ntgdi/path.c index 4a5277a9fe1..552bc9c4f54 100644 --- a/win32ss/gdi/ntgdi/path.c +++ b/win32ss/gdi/ntgdi/path.c @@ -222,7 +222,7 @@ BOOL PATH_RestorePath( DC *dst, DC *src ) PATH_AssignGdiPath(pdstPath, psrcPath);
PATH_UnlockPath(pdstPath); - PATH_UnlockPath(psrcPath); + PATH_UnlockPath(psrcPath); } else { @@ -1405,7 +1405,7 @@ PATH_PathToRegion( INT Mode, PREGION Rgn) { - int i, pos, polygons; + int i, pos, polygons; PULONG counts; int Ret;
@@ -2694,8 +2694,21 @@ NtGdiGetPath( { INT ret = -1; PPATH pPath; + DC *dc; + + _SEH2_TRY + { + ProbeForWrite(Points, nSize * sizeof(*Points), sizeof(ULONG)); + ProbeForWrite(Types, nSize, 1); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + SetLastNtError(_SEH2_GetExceptionCode()); + _SEH2_YIELD(return -1); + } + _SEH2_END
- DC *dc = DC_LockDc(hDC); + dc = DC_LockDc(hDC); DPRINT("NtGdiGetPath start\n"); if (!dc) {