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

Lionel Elie Mamane (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 5 09:20:22 UTC 2020


 connectivity/source/parse/sqlflex.l |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit ede39fd49c03f2f604507bb1b79ac32fe52da493
Author:     Lionel Elie Mamane <lionel at mamane.lu>
AuthorDate: Fri May 8 07:51:53 2020 +0200
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Fri Jun 5 11:19:51 2020 +0200

    tdf#122461 SQL identifiers (names) can contain newlines
    
    Change-Id: Ic58e6b65e146b2e0d9cb656aa5fa06cfe955d11d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93690
    Tested-by: Jenkins
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    (cherry picked from commit b6ab865a371f5c46f96d931721f03afde82b7ec1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93787
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index 1002ecef7970..2269d1c6e52c 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -526,6 +526,8 @@ sal_Int32 gatherString(int delim, sal_Int32 nTyp)
     int ch;
     OStringBuffer sBuffer(256);
 
+    assert(nTyp == 0 || nTyp == 1 || nTyp == 2);
+
     while (!checkeof(ch = yyinput()))
     {
         if (ch == delim)
@@ -554,7 +556,7 @@ sal_Int32 gatherString(int delim, sal_Int32 nTyp)
             }
 
         }
-        else if (nTyp != 1 && (ch == '\r' || ch == '\n') )
+        else if (nTyp == 2 && (ch == '\r' || ch == '\n') )
             break;
         else
         {


More information about the Libreoffice-commits mailing list