[Libreoffice-commits] core.git: svtools/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 28 12:31:55 UTC 2019
svtools/source/svrtf/parrtf.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 8849e38f4f46b832d75d310021de8414ece1101d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Nov 28 10:42:19 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Nov 28 13:30:54 2019 +0100
ofz#13513 infinite loop with negative value for \bin
Change-Id: Ia2960598a837b3d0c48125980137171aa7944adb
Reviewed-on: https://gerrit.libreoffice.org/83986
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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)
More information about the Libreoffice-commits
mailing list