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

New commits:
commit ecbed27f6a2b61a6544c92178367eacfa2ea0b50
Author: August Sodora <aug...@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()));
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to