diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2020-05-08 07:51:53 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-06-05 11:19:51 +0200 |
commit | ede39fd49c03f2f604507bb1b79ac32fe52da493 (patch) | |
tree | 47c4fc7df105b8abc72689476fb238f06e937fa1 | |
parent | cdcbf109c47d366539b98c6e379874ae08de08e1 (diff) |
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@mamane.lu>
(cherry picked from commit b6ab865a371f5c46f96d931721f03afde82b7ec1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93787
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
-rw-r--r-- | connectivity/source/parse/sqlflex.l | 4 |
1 files changed, 3 insertions, 1 deletions
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 { |