-
Notifications
You must be signed in to change notification settings - Fork 85
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
struct.error: unpack requires a buffer of 4 bytes #83
Comments
Thank you for reporting! This bug doesn't seem easy, and I can't think of a way to debug it without a sample. However, if I figure something out in the future, I will make fixes. Any information is also welcome. (A quick possible fix would be changing |
Thank you. Yes, |
Unfortunately I cannot share the file that triggers this exception.
But looking at
xls97.py
line 418, the code assumes thatself.data.read(4)
returns either exactly 4 bytes or nothing:msoffcrypto-tool/msoffcrypto/format/xls97.py
Lines 411 to 423 in f727b42
I'm not sure what
self.data
there is but normallyread(n)
is guaranteed to return at most 4 bytes, not exactly 4 bytes.The text was updated successfully, but these errors were encountered: