summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2024-09-28 14:24:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-09-28 18:08:33 +0200
commitc2306ddbac82e643cf05773ce39fe09195937af6 (patch)
tree0d06da63d9cb855b53bb5d5b3d3e81ab157ddb95
parentf063ea562c6ba14db15b9773bdcbb18af4a72ff8 (diff)
cid#1607790 Overflowed constant
Change-Id: Ia2b180d6a93f139a0f83653ee45b4ad929ccef45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174110 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--dbaccess/source/filter/hsqldb/utils.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/dbaccess/source/filter/hsqldb/utils.cxx b/dbaccess/source/filter/hsqldb/utils.cxx
index d8addd33623e..4ed05ae5075a 100644
--- a/dbaccess/source/filter/hsqldb/utils.cxx
+++ b/dbaccess/source/filter/hsqldb/utils.cxx
@@ -90,7 +90,7 @@ OUString utils::convertToUTF8(std::string_view original)
OUString utils::getTableNameFromStmt(std::u16string_view sSql)
{
- auto stmtComponents = comphelper::string::split(sSql, sal_Unicode(u' '));
+ std::vector<OUString> stmtComponents = comphelper::string::split(sSql, sal_Unicode(u' '));
assert(stmtComponents.size() > 2);
auto wordIter = stmtComponents.begin();
@@ -105,6 +105,7 @@ OUString utils::getTableNameFromStmt(std::u16string_view sSql)
if (wordIter->indexOf("\"") >= 0)
{
size_t nAposBegin = sSql.find('"');
+ assert(nAposBegin != std::u16string_view::npos); // make coverity happy
size_t nAposEnd = nAposBegin;
bool bProperEndAposFound = false;
while (!bProperEndAposFound)