diff --git a/oletools/msodde.py b/oletools/msodde.py index 0295383..c5d752e 100644 --- a/oletools/msodde.py +++ b/oletools/msodde.py @@ -45,8 +45,9 @@ from __future__ import print_function #------------------------------------------------------------------------------ # CHANGELOG: # 2017-10-18 v0.52 PL: - first version +# 2017-10-20 PL: - fixed issue #202 (handling empty xml tags) -__version__ = '0.52dev1' +__version__ = '0.52dev2' #------------------------------------------------------------------------------ # TODO: detect beginning/end of fields, to separate each field @@ -107,8 +108,9 @@ def process_file(filepath): # find all the tags 'w:instrText': # (each is a chunk of a DDE link) for elem in root.iter(TAG_W_INSTRTEXT): - # concatenate the text of the field: - text += elem.text + # concatenate the text of the field, if present: + if elem.text is not None: + text += elem.text return text diff --git a/setup.py b/setup.py index f2d3bff..4842dd4 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ import os, fnmatch #--- METADATA ----------------------------------------------------------------- name = "oletools" -version = '0.52dev1' +version = '0.52dev2' desc = "Python tools to analyze security characteristics of MS Office and OLE files (also called Structured Storage, Compound File Binary Format or Compound Document File Format), for Malware Analysis and Incident Response #DFIR" long_desc = open('oletools/README.rst').read() author = "Philippe Lagadec"