summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-09-06 20:19:04 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-09-08 21:09:30 +0000
commit4112594d60961d2d1a6b0f90422ce1b0924bf07d (patch)
treef0ef31cce6bc5de9fb9abcba04e1fd397179f7e4
parent10da1cf5b1e2446470b4892f0e49132217baf33d (diff)
rtf: don't skip backwards on skipping bin specified bytes
otherwise we could end up re-parsing the block endlessly Change-Id: Ia90a9e5b513951c91e1917483f9e030dbee98ffb Reviewed-on: https://gerrit.libreoffice.org/28710 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--writerfilter/source/rtftok/rtftokenizer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index cb7808575c3c..1afbc101ca64 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -285,7 +285,7 @@ RTFError RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nPara
{
// skip binary data explicitely, to not trip over rtf markup
// control characters
- if (rKeyword.equals("bin"))
+ if (rKeyword.equals("bin") && nParam > 0)
Strm().SeekRel(nParam);
return RTFError::OK;
}