[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 10 20:02:01 UTC 2020
vcl/source/window/mouse.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8dd46a846fcdfd2b8cb81557b92c74e5e65e8d28
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Jan 29 21:06:35 2020 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Thu Dec 10 21:01:24 2020 +0100
vcl: fix UB in vcl::Cursor::ImplDoShow()
pWindow->mpWindowImpl can be nullptr here, see online.git's
unit-load-torture test:
vcl/source/window/cursor.cxx:204:54: runtime error: member access within null pointer of type 'WindowImpl'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior vcl/source/window/cursor.cxx:204:54 in
(And one more similar case in Window::ImplGrabFocus().)
Change-Id: Idd145082b58c10139be53e9b997efedeb0cec364
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87709
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Signed-off-by: Michael Meeks <michael.meeks at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107578
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 0aea5205fbb5..16993d199987 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -312,7 +312,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
pSVData->mpWinData->mpFocusWin = this;
- if ( pOldFocusWindow )
+ if ( pOldFocusWindow && pOldFocusWindow->mpWindowImpl )
{
// Cursor hidden
if ( pOldFocusWindow->mpWindowImpl->mpCursor )
More information about the Libreoffice-commits
mailing list