[Libreoffice-commits] core.git: dbaccess/source include/sal
Javier Fernandez
jfernandez at igalia.com
Thu Jun 6 07:59:17 PDT 2013
dbaccess/source/ui/dlg/generalpage.cxx | 5 +++++
include/sal/log-areas.dox | 1 +
2 files changed, 6 insertions(+)
New commits:
commit b6a91e6d30e2a15880638d570d4c7d1e6c4a1853
Author: Javier Fernandez <jfernandez at igalia.com>
Date: Thu Jun 6 09:14:49 2013 +0000
Prevent out-of-range values coming from ListBox GetSelectEntryPos.
Change-Id: Ia787c412408ef53db3c8458f54c7843c669c81ad
Reviewed-on: https://gerrit.libreoffice.org/4174
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
Tested-by: Lionel Elie Mamane <lionel at mamane.lu>
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 3eea60a..0373916 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -329,6 +329,11 @@ namespace dbaui
{
// get the type from the entry data
sal_Int16 nSelected = _pBox->GetSelectEntryPos();
+ if (nSelected < 0 || nSelected >= m_aURLPrefixes.size() )
+ {
+ SAL_WARN("dbaui.OGeneralPage", "Got out-of-range value '" << nSelected << "' from the DatasourceType selection ListBox's GetSelectEntryPos(): " << ((nSelected < 0) ? "negative" : "no corresponding URL prefix") );
+ return 0L;
+ }
const OUString sURLPrefix = m_aURLPrefixes[ nSelected ];
setParentTitle( sURLPrefix );
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index a6d14de..8917815 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -345,6 +345,7 @@ certain functionality.
@li @c dbaccess
@li @c dbaccess.ui
+ at li @c dbaccess.OGeneralPage
@section svx
More information about the Libreoffice-commits
mailing list