diff options
author | Eike Rathke <erack@redhat.com> | 2017-07-04 15:22:23 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-07-06 15:36:48 +0200 |
commit | 7ae220a53b671175a0f15e3ee70ed5b28de1f008 (patch) | |
tree | e66763954a33ff7350fec294734acefa478bca11 /include | |
parent | 3d39e0e1456aa00baa68c0a7e38b864a9b9a4d9e (diff) |
Set error on more than max params (255) per function
Parameter count is size byte, so.. SUM(1,1,1,...) with 256 arguments resulted
in 0 (uint8 wrapping around).
(cherry picked from commit 209cc5c211260a6c20cc6fb5ac02fd5a88100314)
Change-Id: Ib9997ad0d0d13d4c5171f276148b6c5cad570d5b
Reviewed-on: https://gerrit.libreoffice.org/39506
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 1d1bdfd94fc2963d0281ea4fd8d3a98e39f4ccf7)
Diffstat (limited to 'include')
-rw-r--r-- | include/formula/FormulaCompiler.hxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index 37da2ef8becc..5293c504b1dd 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -38,6 +38,7 @@ #define FORMULA_MAXJUMPCOUNT 32 /* maximum number of jumps (ocChoose) */ #define FORMULA_MAXTOKENS 8192 /* maximum number of tokens in formula */ +#define FORMULA_MAXPARAMS 255 /* maximum number of parameters per function (byte) */ namespace com { namespace sun { namespace star { |