summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2011-12-01 11:23:42 -0500
committerAugust Sodora <augsod@gmail.com>2011-12-01 11:23:42 -0500
commitecbed27f6a2b61a6544c92178367eacfa2ea0b50 (patch)
tree9811472f50e90eb32684c9a4d37ec67b71dc3327 /dbaccess
parent60795da6a87f751e69eaf5f731c86d45a040a97e (diff)
Check length before operator[]
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 50bf0b1598f2..9da1a0e729d9 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()));