Easy Commons

SourceHelper.toByteArray() can return byte arrays with extra data

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: easycommons-util-2.3.1
  • Fix Version/s: easycommons-util-2.4.0
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    SourceHelper.toByteArray() relies on reflection to avoid useless conversions from ByteArrayInputStream, but does not compute the right value for its byte buffer: the array can be bigger than the actual relevant value in it.
    We should take the count field into account!

    Show
    SourceHelper.toByteArray() relies on reflection to avoid useless conversions from ByteArrayInputStream, but does not compute the right value for its byte buffer: the array can be bigger than the actual relevant value in it. We should take the count field into account!
  • Environment:
    -

People

Dates

  • Created:
    Fri, 13 Jan 2017 - 16:48:27 +0100
    Updated:
    Fri, 13 Jan 2017 - 17:12:07 +0100
    Resolved:
    Fri, 13 Jan 2017 - 17:12:07 +0100