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

Tor Lillqvist tml at collabora.com
Wed Jan 3 11:10:03 UTC 2018


 connectivity/source/drivers/firebird/Tables.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e44499a5777e58f08e104d563b51910919d273e4
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Jan 1 13:04:36 2018 +0200

    Don't call getLength() on OUStringBuffer after makeStringAndClear()
    
    It's the length of the OUString that we just made from the
    OUStringBuffer that we want.
    
    Fixes a problem where the code would try to execute an erronoeus SQL
    statement like:
    
    ')EATE TABLE "Tasks" ("Notes" VARCHAR(32765),"TaskID" INTEGER,"EndDate" DATE,"StartDate" DATE,"Description" VARCHAR(65000),'
    
    Too lazy to file a bug for this, the error should be obvious by just
    reading the code.
    
    Change-Id: I473cd8a7a9791700ca8b6467a84f4bad5dee4d55
    Reviewed-on: https://gerrit.libreoffice.org/47230
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    (cherry picked from commit d48edd1e854e0df012b61f833d83efcd19fbe99b)
    Reviewed-on: https://gerrit.libreoffice.org/47231

diff --git a/connectivity/source/drivers/firebird/Tables.cxx b/connectivity/source/drivers/firebird/Tables.cxx
index f1423763ab16..c78939cdc201 100644
--- a/connectivity/source/drivers/firebird/Tables.cxx
+++ b/connectivity/source/drivers/firebird/Tables.cxx
@@ -162,7 +162,7 @@ ObjectType Tables::appendObject(const OUString& rName,
     else
     {
         if ( sSql.endsWith(",") )
-            sSql = sSql.replaceAt(aSqlBuffer.getLength()-1, 1, ")");
+            sSql = sSql.replaceAt(sSql.getLength()-1, 1, ")");
         else
             sSql += ")";
     }


More information about the Libreoffice-commits mailing list