[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - connectivity/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Dec 23 17:10:31 UTC 2018


 connectivity/source/drivers/firebird/PreparedStatement.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f2d8aa40c811d78b71302285711bc2eccdbcd9ea
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: Sun Dec 23 18:10:10 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/65540
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    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 fee4029088f4..be81eef324a3 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -207,7 +207,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());
@@ -841,7 +841,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