[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - connectivity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Dec 21 15:10:00 UTC 2018
connectivity/source/drivers/firebird/PreparedStatement.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit a3c838986e58896a925f381c198d3bf592f874a7
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Dec 21 13:00:33 2018 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Dec 21 16:09:31 2018 +0100
tdf#120576 avoid crash during database migration
0xFFFF cast to short turned into -1 so wasn't seen as > 8000
Change-Id: I57592020c3c31751bec43f2619bf65d41ac47e87
Reviewed-on: https://gerrit.libreoffice.org/65539
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index e0d120d0cfec..648f3f678ff4 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -208,7 +208,7 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex,
{
str = str.copy(0, max_varchar_len);
}
- const short nLength = str.getLength();
+ const auto nLength = str.getLength();
memcpy(pVar->sqldata, &nLength, 2);
// Actual data
memcpy(pVar->sqldata + 2, str.getStr(), str.getLength());
@@ -847,7 +847,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex,
{
xBytesCopy.realloc( nMaxSize );
}
- const short nSize = xBytesCopy.getLength();
+ const auto nSize = xBytesCopy.getLength();
// 8000 corresponds to value from lcl_addDefaultParameters
// in dbaccess/source/filter/hsqldb/createparser.cxx
if (nSize > 8000)
More information about the Libreoffice-commits
mailing list