summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/source/svrtf/parrtf.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index 349ca2e37bb6..c3a43bf8a34d 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <rtl/character.hxx>
#include <rtl/strbuf.hxx>
@@ -557,7 +558,9 @@ void SvRTFParser::SkipGroup()
if (nToken == RTF_BIN)
{
rInput.SeekRel(-1);
- rInput.SeekRel(nTokenValue);
+ SAL_WARN_IF(nTokenValue < 0, "svtools", "negative value argument for rtf \\bin keyword");
+ if (nTokenValue > 0)
+ rInput.SeekRel(nTokenValue);
nNextCh = GetNextChar();
}
while (nNextCh==0xa || nNextCh==0xd)