-
Notifications
You must be signed in to change notification settings - Fork 41
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
DescriptorStructure can occur inside an ImageResourcesBlock #40
Comments
Hey, thanks for reporting this issue. Can you create a minimal PSD that can be used to reproduce this issue? Here are some examples https://github.com/chinedufn/psd/tree/master/tests/fixtures Then we'd add a test to the image resources section. Here's an example test psd/tests/image_resources_section.rs Lines 8 to 32 in 3d4c196
From there we can figure out how to get the test passing. |
Inside
read_resource_block
, someresource_id
s like3000
expect the value to be a Descriptor. I actually encountered this because when it is a Descriptor, I'm not sure what the deal is withdata_len
, but it is way off. This caused an Index out of bounds error, as it was trying to read the cursor way too far.I tried to reverse engineer the binary, along with reading from the PSD file spec, but there's still just some bits in there I can't figure out, especially at the beginning with the data length.
I think something similar to what you're doing in
read_slice_block
could work, but I'm not quite sure how to set that up properly inread_resource_block
The text was updated successfully, but these errors were encountered: