Commit e2d05a8e6b71d2b9382bc71cf24cbf84bdf8b049
1 parent
be5c30ab
oleform: fixed issue #260, removed long integer literals
Showing
1 changed file
with
6 additions
and
3 deletions
oletools/oleform.py
| 1 | 1 | #!/usr/bin/env python |
| 2 | 2 | |
| 3 | +# CHANGELOG: | |
| 4 | +# 2018-02-19 v0.53 PL: - fixed issue #260, removed long integer literals | |
| 5 | + | |
| 3 | 6 | import struct |
| 4 | 7 | |
| 5 | 8 | class OleFormParsingError(Exception): |
| ... | ... | @@ -118,7 +121,7 @@ def consume_TextProps(stream): |
| 118 | 121 | def consume_GuidAndFont(stream): |
| 119 | 122 | # GuidAndFont: [MS-OFORMS] 2.4.7 |
| 120 | 123 | UUIDS = stream.unpacks('<LHH', 8) + stream.unpacks('>Q', 8) |
| 121 | - if UUIDS == (199447043, 36753, 4558, 11376937813817407569L): | |
| 124 | + if UUIDS == (199447043, 36753, 4558, 11376937813817407569): | |
| 122 | 125 | # UUID == {0BE35203-8F91-11CE-9DE300AA004BB851} |
| 123 | 126 | # StdFont: [MS-OFORMS] 2.4.12 |
| 124 | 127 | stream.check_value('StdFont (version)', '<B', 1, 1) |
| ... | ... | @@ -126,7 +129,7 @@ def consume_GuidAndFont(stream): |
| 126 | 129 | stream.read(9) |
| 127 | 130 | bFaceLen = stream.unpack('<B', 1) |
| 128 | 131 | stream.read(bFaceLen) |
| 129 | - elif UUIDS == (2948729120, 55886, 4558, 13349514450607572916L): | |
| 132 | + elif UUIDS == (2948729120, 55886, 4558, 13349514450607572916): | |
| 130 | 133 | # UUID == {AFC20920-DA4E-11CE-B94300AA006887B4} |
| 131 | 134 | consume_TextProps(stream) |
| 132 | 135 | else: |
| ... | ... | @@ -136,7 +139,7 @@ def consume_GuidAndPicture(stream): |
| 136 | 139 | # GuidAndPicture: [MS-OFORMS] 2.4.8 |
| 137 | 140 | # UUID == {0BE35204-8F91-11CE-9DE3-00AA004BB851} |
| 138 | 141 | stream.check_values('GuidAndPicture (UUID part 1)', '<LHH', 8, (199447044, 36753, 4558)) |
| 139 | - stream.check_value('GuidAndPicture (UUID part 1)', '>Q', 8, 11376937813817407569L) | |
| 142 | + stream.check_value('GuidAndPicture (UUID part 1)', '>Q', 8, 11376937813817407569) | |
| 140 | 143 | # StdPicture: [MS-OFORMS] 2.4.13 |
| 141 | 144 | stream.check_value('StdPicture (Preamble)', '<L', 4, 0x0000746C) |
| 142 | 145 | size = stream.unpack('<L', 4) | ... | ... |