summaryrefslogtreecommitdiff
path: root/sw/inc/tox.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-04-29 13:53:13 +0200
committerMichael Stahl <mstahl@redhat.com>2014-04-29 14:18:43 +0200
commita03c88eded807da34d0490ab4e1830e7573338e9 (patch)
treef4311096b0d5b7d46c3aec7569e6fcc5739549df /sw/inc/tox.hxx
parentf09d4bc2853be2fa3faa0502b8efe94ad9719731 (diff)
fdo#77308: SwFormTokensHelper avoid infinite loop on invalid input
In 4.1 this loops because the input is truncated to 64k length; try to avoid looping when the input is invalid and the terminating ">" cannot be found. Change-Id: I9261d9350f84ab366b822addde725645a46be830
Diffstat (limited to 'sw/inc/tox.hxx')
-rw-r--r--sw/inc/tox.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 859374fc29af..c626bda2d1b2 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -30,6 +30,7 @@
#include <calbck.hxx>
#include <vector>
+#include <boost/optional.hpp>
namespace com { namespace sun { namespace star {
namespace text { class XDocumentIndexMark; }
@@ -274,7 +275,7 @@ class SW_DLLPUBLIC SwFormTokensHelper
@return the token
*/
- SAL_DLLPRIVATE SwFormToken BuildToken( const OUString & sPattern,
+ SAL_DLLPRIVATE boost::optional<SwFormToken> BuildToken( const OUString & sPattern,
sal_Int32 & nCurPatternPos ) const;
/**