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

LazySegmentBytes fix: always read bytes at the offset #2063

merged 1 commit into from Mar 14, 2017


None yet
2 participants

lossyrob commented Mar 14, 2017

Fixes #1959

The problem here was that we were using the same ByteReader extension method that we use for TiffTag reading to read the segment bytes. The TiffTag bytes have a property that if the length is less than 4 bytes, the value is stored inside the offset field. This property does not apply to segment bytes, so I refactored LazySegmentBytes so that it uses it's own straightforward byte reading code. ArraySegmentBytes delegates to LazySegmentBytes, so this fixes both streaming and non-streaming cases.

@lossyrob lossyrob added this to the 1.1 milestone Mar 14, 2017

@lossyrob lossyrob merged commit e21f88e into locationtech:master Mar 14, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@lossyrob lossyrob removed the in progress label Mar 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment