summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-03-26 15:38:51 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-03-26 17:45:00 +0100
commitc8fa7c01aa8a3e263c07b5cf4f72ace70f1d9308 (patch)
treee91d7972902504c3870ffd3c47f87c557d5d974f
parent8a2b065d2a414ca90b3412c803533c8fd0109b30 (diff)
crash on deref null parent on attempting to find labelcp-23.05.10-1
ImplFindDlgCtrlWindow always calls ImplGetChildWindow with first arg which does pParent = ImplGetTopParentOfTabHierarchy( pParent ); vcl::Window* pWindow = ImplGetSubChildWindow( pParent, n, nIndex ); ImplGetSubChildWindow always derefs its first arg and ImplGetTopParentOfTabHierarchy only returns null if its input was null so ImplFindDlgCtrlWindow shouldn't be called with null program/libmergedlo.so(_ZNK3vcl6Window13ImplGetWindowEv+0x4)[0x7513e2a40e54] program/libmergedlo.so(+0x33ba57c)[0x7513e29ba57c] program/libmergedlo.so(+0x33ba97c)[0x7513e29ba97c] program/libmergedlo.so(+0x33baf64)[0x7513e29baf64] program/libmergedlo.so(+0x3378d47)[0x7513e2978d47] program/libmergedlo.so(_ZNK3vcl6Window30GetAccessibleRelationLabeledByEv+0x19c)[0x7513e297866c] program/libmergedlo.so(_ZN3vcl6Window18DumpAsPropertyTreeERN5tools10JsonWriterE+0x241)[0x7513e2a4b301] program/libmergedlo.so(_ZN6Dialog18DumpAsPropertyTreeERN5tools10JsonWriterE+0x2e)[0x7513e29b217e] program/libmergedlo.so(_ZN3vcl6Window18DumpAsPropertyTreeERN5tools10JsonWriterE+0x182)[0x7513e2a4b242] program/libmergedlo.so(_ZN3vcl3lok9dumpStateERN3rtl13OStringBufferE+0xc0)[0x7513e2d6ee80] Change-Id: I732550bd67c3af38627849a7d96d8ee6140008b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165348 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--vcl/source/window/legacyaccessibility.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx
index 346e1fdc8f2a..a0f4aff33919 100644
--- a/vcl/source/window/legacyaccessibility.cxx
+++ b/vcl/source/window/legacyaccessibility.cxx
@@ -109,7 +109,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabelFor() const
static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Window* pLabeled )
{
Window* pWindow = nullptr;
- if ( (nMyType != WindowType::GROUPBOX) && (nMyType != WindowType::FIXEDLINE) )
+ if (pFrameWindow && nMyType != WindowType::GROUPBOX && nMyType != WindowType::FIXEDLINE)
{
// search for a control that labels this window
// a label is considered the last fixed text, fixed line or group box