Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Normal
Description
There are a few places in the code where it loops across a byte buffers backing array wrong:
for (int i=bytes.position()bytes.arrayOffset(); i<bytes.limit(); i+)
This is incorrect as the limit() does not account for arrayOffset()
for (int i=bytes.position()bytes.arrayOffset(); i<bytes.limit()+bytes.arrayOffset(); i+)
is the correct code.
There is also a few places where the unit tests would fail if we used non wrapped byte arrays.