From 7922da99e27037fa2b01e113e5af171354053ffa Mon Sep 17 00:00:00 2001 From: Ahmed Zaki Date: Thu, 8 Jun 2017 20:03:18 +0100 Subject: [PATCH] Rtfobj binparser bugfix (#143) --- oletools/rtfobj.py | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/oletools/rtfobj.py b/oletools/rtfobj.py index dad78c3..b2f9384 100644 --- a/oletools/rtfobj.py +++ b/oletools/rtfobj.py @@ -499,6 +499,9 @@ class RtfParser(object): def _bin(self, matchobject, param): binlen = int(param) + if binlen < 0: + binlen = int(param.strip('-')) + log.debug('\\bin: reading %d bytes of binary data' % binlen) # TODO: handle optional space? # TODO: handle negative length, and length greater than data -- libgit2 0.21.4