[PATCH] Preventing out-of-range values comming from ListBox GetSelec...
Javier Fernandez (via Code Review)
gerrit at gerrit.libreoffice.org
Thu Jun 6 02:34:43 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4174
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/74/4174/1
Preventing out-of-range values comming from ListBox GetSelectEntryPos.
Change-Id: Ia787c412408ef53db3c8458f54c7843c669c81ad
---
M dbaccess/source/ui/dlg/generalpage.cxx
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 3eea60a..da591d9 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -329,6 +329,11 @@
{
// get the type from the entry data
sal_Int16 nSelected = _pBox->GetSelectEntryPos();
+ if (nSelected < 0)
+ {
+ SAL_WARN("dbaui.OGeneralPage", "out-of-range value got from the DataSource selection's ListBox.");
+ return 0L;
+ }
const OUString sURLPrefix = m_aURLPrefixes[ nSelected ];
setParentTitle( sURLPrefix );
--
To view, visit https://gerrit.libreoffice.org/4174
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia787c412408ef53db3c8458f54c7843c669c81ad
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez <javier.fgb at gmail.com>
More information about the LibreOffice
mailing list