summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-01-21 17:56:25 +0100
committerEike Rathke <erack@redhat.com>2013-01-21 18:01:17 +0100
commitaa2b8bde171bf9562536dc14b2cf81d81e31b438 (patch)
treecaacb541b710acc1ac01798630f19adcbcb15238
parentc10758417ee87dde4989a53d3695ae71e40a9929 (diff)
resolved fdo#59583 prevent inappropriate column/row label detection
If followed by '(' (with or without space inbetween) an identifier can not be a column/row label. Prevent arbitrary content detection in case a macro function of the same name is meant (fdo#59583) or if it wouldn't resolve to a known function name at all, that earlier resulted in #REF! instead of #NAME? in the case of unknown function but label found. Change-Id: Id36a0c9ebad2d62867b4f9fe00ae78d464e77109
-rw-r--r--sc/source/core/tool/compiler.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 7b7ab88f95bd..ac0d10b4ccdc 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3686,7 +3686,9 @@ bool ScCompiler::NextNewToken( bool bInArray )
return true;
if (IsDBRange( aUpper ))
return true;
- if (IsColRowName( aUpper ))
+ // If followed by '(' (with or without space inbetween) it can not be a
+ // column/row label. Prevent arbitrary content detection.
+ if (!bMayBeFuncName && IsColRowName( aUpper ))
return true;
if (bMayBeFuncName && IsMacro( aUpper ))
return true;