-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
[Bug] get wrong stream position while get "FileHeader" stream in ".hwp" file #1
Comments
Thanks for checking out this library! If I understand correctly, in Thanks for pointing me to this issue, |
Also, the error is specifically in this snippet in data = dataReader.readDataToEnd()
signature = String(data: dataReader.readData(ofLength: 32), encoding: .utf16LittleEndian) ?? "Error" You've used Does that resolve your issue? |
Thank you for your kind answer and for investigating my error! I open this file with ole-py, which is another ole/com tool written in python. As a result, the "FileHeader" stream of .hwp file starts with the signature "HWP Document File" encoded with ASCII.
However, when I use OLEKit, I have a result below.
Can you help me what is wrong? Sorry for using the infamous file format :) |
Thanks for the update, this looks like a bug to me, I'm investigating now... |
The sector data truncation logic was checking the constant value passed to the `oleStream` function, instead of the incremented iteration index. Resolves #1.
Hello, I'm using OLEKit with hwp file which use in Korea.
It has stream "FileHeader" with fixed size 256 bytes.
However, OLEKit throws uncaught error Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
when I try to get data of stream by readDataToEnd()
You can also find this code snippet in my repo sboh1214/HwpKit
In hex, stream "FileHeader" should read as ascii (about in position 16112)
Overall, thanks for your library!
The text was updated successfully, but these errors were encountered: