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

images: what to do about length indicator mismatches with ImageData? #105

Open
adamdecaf opened this issue Aug 1, 2020 · 1 comment
Open
Labels
bug Something isn't working enhancement New feature or request

Comments

@adamdecaf
Copy link
Member

What were you trying to do?
A few files have been reported where a decoding step was needed prior to parsing. This decoding seems to change the bytes we need to read for ImageData, but the LengthImageData field isn't updated as part of this decoding. Thus the Parse method won't read past the array and returns without populating any ImageData.

The images appear empty / null, but we can read the rest of the line and everything works out.

What did you expect to see?
Images are read properly even through an extra decode step prior to parsing.

@adamdecaf adamdecaf added bug Something isn't working enhancement New feature or request labels Aug 1, 2020
@adamdecaf
Copy link
Member Author

I need to review the spec, but is there any problem with reading the rest of the line into ImageData? Sure we should limit it to 10k characters or something, but is this check too strict for real-world files?

In specific it's this length check:

https://github.com/moov-io/imagecashletter/blob/v0.4.3/imageViewData.go#L206-L211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant