Commit 62940506f86f3a1cea5e83b68bc30dfbf7c09950
1 parent
2ea8bb47
oleobj: fixed issue #274 in read_length_prefixed_string
Showing
2 changed files
with
4 additions
and
3 deletions
oletools/oleobj.py
| @@ -83,8 +83,9 @@ from oletools.ooxml import ZipSubFile | @@ -83,8 +83,9 @@ from oletools.ooxml import ZipSubFile | ||
| 83 | # 2017-05-03 PL: - fixed absolute imports (issue #141) | 83 | # 2017-05-03 PL: - fixed absolute imports (issue #141) |
| 84 | # 2018-01-18 v0.52 CH: - added support for zipped-xml-based types (docx, pptx, | 84 | # 2018-01-18 v0.52 CH: - added support for zipped-xml-based types (docx, pptx, |
| 85 | # xlsx), and ppt | 85 | # xlsx), and ppt |
| 86 | +# 2018-03-27 PL: - fixed issue #274 in read_length_prefixed_string | ||
| 86 | 87 | ||
| 87 | -__version__ = '0.52' | 88 | +__version__ = '0.52.4' |
| 88 | 89 | ||
| 89 | # ----------------------------------------------------------------------------- | 90 | # ----------------------------------------------------------------------------- |
| 90 | # TODO: | 91 | # TODO: |
| @@ -260,7 +261,7 @@ def read_length_prefixed_string(data, index): | @@ -260,7 +261,7 @@ def read_length_prefixed_string(data, index): | ||
| 260 | null_char = data.read(1) | 261 | null_char = data.read(1) |
| 261 | else: | 262 | else: |
| 262 | ansi_string = data[index:index+length-1] | 263 | ansi_string = data[index:index+length-1] |
| 263 | - null_char = data[index+length] | 264 | + null_char = data[index+length-1] |
| 264 | index += length | 265 | index += length |
| 265 | # TODO: only in strict mode: | 266 | # TODO: only in strict mode: |
| 266 | # check the presence of the null char: | 267 | # check the presence of the null char: |
setup.py
| @@ -43,7 +43,7 @@ import os, fnmatch | @@ -43,7 +43,7 @@ import os, fnmatch | ||
| 43 | #--- METADATA ----------------------------------------------------------------- | 43 | #--- METADATA ----------------------------------------------------------------- |
| 44 | 44 | ||
| 45 | name = "oletools" | 45 | name = "oletools" |
| 46 | -version = '0.52.3' | 46 | +version = '0.52.4' |
| 47 | 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" | 47 | 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" |
| 48 | long_desc = open('oletools/README.rst').read() | 48 | long_desc = open('oletools/README.rst').read() |
| 49 | author = "Philippe Lagadec" | 49 | author = "Philippe Lagadec" |