Commit a51513585117fedab6bc8c37a58a674ec26ae0a5
1 parent
2c8866de
FormSiteData: jump to the end of the object in any case
Showing
1 changed file
with
6 additions
and
5 deletions
oletools/oleform.py
| ... | ... | @@ -277,11 +277,12 @@ def consume_FormControl(stream): |
| 277 | 277 | consume_SiteClassInfo(stream) |
| 278 | 278 | (CountOfSites, CountOfBytes) = stream.unpacks('<LL', 8) |
| 279 | 279 | remaining_SiteDepthsAndTypes = CountOfSites |
| 280 | - with stream.will_pad(): | |
| 281 | - while remaining_SiteDepthsAndTypes > 0: | |
| 282 | - remaining_SiteDepthsAndTypes -= consume_FormObjectDepthTypeCount(stream) | |
| 283 | - for i in range(CountOfSites): | |
| 284 | - yield consume_OleSiteConcreteControl(stream) | |
| 280 | + with stream.will_jump_to(CountOfBytes): | |
| 281 | + with stream.will_pad(): | |
| 282 | + while remaining_SiteDepthsAndTypes > 0: | |
| 283 | + remaining_SiteDepthsAndTypes -= consume_FormObjectDepthTypeCount(stream) | |
| 284 | + for i in range(CountOfSites): | |
| 285 | + yield consume_OleSiteConcreteControl(stream) | |
| 285 | 286 | |
| 286 | 287 | def consume_MorphDataControl(stream): |
| 287 | 288 | # MorphDataControl: [MS-OFORMS] 2.2.5.1 | ... | ... |