[Libreoffice-commits] .: dbaccess/source

August Sodora augsod at kemper.freedesktop.org
Thu Dec 1 08:24:45 PST 2011


 dbaccess/source/filter/xml/xmlExport.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ecbed27f6a2b61a6544c92178367eacfa2ea0b50
Author: August Sodora <augsod at gmail.com>
Date:   Thu Dec 1 11:23:42 2011 -0500

    Check length before operator[]

diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 50bf0b1..9da1a0e 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -565,7 +565,7 @@ void ODBExport::exportConnectionData()
                 {
                     ::svt::OFileNotation aTransformer( sFileName );
                     ::rtl::OUStringBuffer sURL( aTransformer.get( ::svt::OFileNotation::N_URL ) );
-                    if (sURL[sURL.getLength() - 1] != '/')
+                    if (sURL.getLength() == 0 || sURL[sURL.getLength() - 1] != '/')
                         sURL.append('/');
 
                     AddAttribute(XML_NAMESPACE_XLINK,XML_HREF,GetRelativeReference(sURL.makeStringAndClear()));


More information about the Libreoffice-commits mailing list