Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


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@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.