Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ppt_record_parser.IterStream.readinto() always return desired length #715

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 14, 2021

  1. Make IterStream.readinto() return desired length

    IterStream is derived from io.RawIOBase which is not guaranteed to
    return the desired bytes during read(). Unfortunately, olefile.py is
    expecting read() to return all bytes (except for the last sector):
    
    https://github.com/decalage2/olefile/blob/cc0bdc07194fb7dc21e75a95c9e771e5240952b2/olefile/olefile.py#L666-L676
    
    Since IterStream implementation was already buffered, I changed
    readinto() to always return the desired length whenever possible.
    Andrea DePasquale committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    f4e1c71 View commit details
    Browse the repository at this point in the history