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:
    -

Activity

Victor NOËL made changes - Fri, 13 Jan 2017 - 17:02:01 +0100
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Major [ 3 ]
Victor NOËL made changes - Fri, 13 Jan 2017 - 17:02:06 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
Victor NOËL made changes - Fri, 13 Jan 2017 - 17:06:56 +0100
Fix Version/s easycommons-util-2.3.2 [ 10721 ]
Affects Version/s easycommons-util-2.3.1 [ 10720 ]
Affects Version/s 2.0 [ 10357 ]
Victor NOËL made changes - Fri, 13 Jan 2017 - 17:12:07 +0100
Status In Progress [ 10003 ] Resolved [ 10004 ]
Resolution Fixed [ 1 ]

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