https://git.reactos.org/?p=reactos.git;a=commitdiff;h=602db402771064216d834…
commit 602db402771064216d834b31a0c944afa866e307
Author: Michael Fritscher <reactos(a)mifritscher.de>
AuthorDate: Sun Mar 11 17:49:17 2018 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Mar 11 20:31:40 2018 +0100
[CONSRV] Initialize rcFramebuffer in every case, otherwise it is left unintialized in
case of e.g. console termination. (#428, #429)
Fixes CORE-14463. Debugged and and fix suggested by Timo Kreuzer.
Signed-off-by: Michael Fritscher <reactos(a)mifritscher.de>
---
win32ss/user/winsrv/consrv/frontends/gui/graphics.c | 2 ++
win32ss/user/winsrv/consrv/frontends/gui/text.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/win32ss/user/winsrv/consrv/frontends/gui/graphics.c
b/win32ss/user/winsrv/consrv/frontends/gui/graphics.c
index 67c2516ba2..6b7084b8c6 100644
--- a/win32ss/user/winsrv/consrv/frontends/gui/graphics.c
+++ b/win32ss/user/winsrv/consrv/frontends/gui/graphics.c
@@ -129,6 +129,8 @@ GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer,
PCONSRV_CONSOLE Console = Buffer->Header.Console;
// ASSERT(Console == GuiData->Console);
+ SetRectEmpty(&rcFramebuffer);
+
if (Buffer->BitMap == NULL) return;
if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return;
diff --git a/win32ss/user/winsrv/consrv/frontends/gui/text.c
b/win32ss/user/winsrv/consrv/frontends/gui/text.c
index a206fcd00b..21355ed81f 100644
--- a/win32ss/user/winsrv/consrv/frontends/gui/text.c
+++ b/win32ss/user/winsrv/consrv/frontends/gui/text.c
@@ -358,6 +358,8 @@ GuiPaintTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer,
HFONT OldFont, NewFont;
BOOLEAN IsUnderline;
+ SetRectEmpty(&rcFramebuffer);
+
if (Buffer->Buffer == NULL) return;
if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return;