[Libreoffice-commits] core.git: connectivity/source

Tor Lillqvist tml at collabora.com
Mon Jan 1 12:58:45 UTC 2018


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

New commits:
commit d48edd1e854e0df012b61f833d83efcd19fbe99b
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>

diff --git a/connectivity/source/drivers/firebird/Tables.cxx b/connectivity/source/drivers/firebird/Tables.cxx
index 06d3033443c0..b41ea4e2d21b 100644
--- a/connectivity/source/drivers/firebird/Tables.cxx
+++ b/connectivity/source/drivers/firebird/Tables.cxx
@@ -191,7 +191,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