-
Notifications
You must be signed in to change notification settings - Fork 49
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
Crash on invalid ifdoffset
#87
Comments
Actually, the
See attached image that reproduces this. I also notice that you are converting |
Also, the line It would be better to use a Otherwise the line |
I just encountered this same issue in a product I maintain; I was about to file a new issue and stumbled across this one. I'm going to file a PR to fix the first two things @ziriax mentioned (moving the |
The issue is more severe I'm afraid. |
This line of code should be moved to before the for loop
Otherwise
conv.ToUInt16(header, ifdoffset);
crashes and no more metadata is read.So the code should be
I can provide a PR if you want, but that is most likely more overhead than just moving the line; unless you also want unit tests for this of course...
The text was updated successfully, but these errors were encountered: