diff options
Diffstat (limited to 'vcl/unx/gtk/gtksalframe.cxx')
-rw-r--r-- | vcl/unx/gtk/gtksalframe.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 899f1a1a291f..a4e6e0fdcd2d 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -3660,6 +3660,13 @@ static uno::Reference<accessibility::XAccessibleEditableText> } } + bool bSafeToIterate = true; + sal_Int32 nCount = xContext->getAccessibleChildCount(); + if (nCount < 0 || nCount > SAL_MAX_UINT16 /* slow enough for anyone */) + bSafeToIterate = false; + if (!bSafeToIterate) + return uno::Reference< accessibility::XAccessibleEditableText >(); + for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i) { uno::Reference< accessibility::XAccessible > xChild = xContext->getAccessibleChild(i); |