From f4da38627108fe1535942a5724c34b2f476d4549 Mon Sep 17 00:00:00 2001 From: Pavol PlaskoĊˆ Date: Fri, 1 Jun 2018 07:49:45 +0200 Subject: [PATCH] Fix ignoring of whitespace after \bin for Python 2 and 3. --- oletools/rtfobj.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oletools/rtfobj.py b/oletools/rtfobj.py index 4f2259a..0878bd4 100644 --- a/oletools/rtfobj.py +++ b/oletools/rtfobj.py @@ -578,7 +578,7 @@ class RtfParser(object): # it should be treated as a null length: binlen=0 # ignore optional space after \bin - if self.data[self.index] == ord(' '): + if ord(self.data[self.index:self.index + 1]) == ord(' '): log.debug('\\bin: ignoring whitespace before data') self.index += 1 log.debug('\\bin: reading %d bytes of binary data' % binlen) -- libgit2 0.21.4