diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-09-06 20:19:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-07 07:29:26 +0000 |
commit | 4349b6b060c95ca42f5a2ecebafe389e0e9dbb48 (patch) | |
tree | 198a92c4ef900aab7be1f9c3a55366046f62d138 /writerfilter | |
parent | 6d812e114f1fac014da82955a73b44212b2c6022 (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/28707
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtftokenizer.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx index 4b7f76cab4cc..5afceabaaaa4 100644 --- a/writerfilter/source/rtftok/rtftokenizer.cxx +++ b/writerfilter/source/rtftok/rtftokenizer.cxx @@ -283,7 +283,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; } |