summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/filter/hsqldb/utils.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/dbaccess/source/filter/hsqldb/utils.cxx b/dbaccess/source/filter/hsqldb/utils.cxx
index 724ffccfb37f..8387a34e0bf4 100644
--- a/dbaccess/source/filter/hsqldb/utils.cxx
+++ b/dbaccess/source/filter/hsqldb/utils.cxx
@@ -21,6 +21,7 @@
#include <comphelper/string.hxx>
#include <comphelper/processfactory.hxx>
#include <connectivity/dbexception.hxx>
+#include <sal/log.hxx>
#include "utils.hxx"
@@ -109,6 +110,11 @@ OUString utils::getTableNameFromStmt(std::u16string_view sSql)
while (!bProperEndAposFound)
{
nAposEnd = sSql.find('"', nAposEnd + 1);
+ if (nAposEnd == std::u16string_view::npos)
+ {
+ SAL_WARN("dbaccess", "no matching \"");
+ return OUString();
+ }
if (sSql[nAposEnd - 1] != u'\\')
bProperEndAposFound = true;
}