Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #12081 (accepted)

Opened 6 years ago

Last modified 4 years ago

Bug: C++ PixelBuffer needs a companion proxy pixel buffer

Reported by: rleigh Owned by: rleigh
Priority: minor Milestone: Unscheduled
Component: Bio-Formats Version: 5.0.0
Keywords: cpp Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

In order to allow safe access to sub-regions of a pixel buffer, we need a proxy buffer which allows access to a range of bytes within an existing buffer. This will remove the possibility of buffer overflows when reading arbitrary ranges of bytes into the buffer since we won't need to use raw pointers.

Change History (10)

comment:1 Changed 6 years ago by rleigh

  • Keywords cpp added

comment:3 Changed 6 years ago by rleigh

  • Add iterator types; see http://www.boost.org/doc/libs/1_55_0/libs/iterator/doc/index.html for helpers. Use a random_access_iterator_tag.
  • Add begin/end methods.
  • Add ctor from iterator range to both plain and shared pixel buffer.
  • Iterators should store a reference to the buffer
  • Shared buffer should store reference obtained from iterator (and validate the begin and end are in the same buffer)
  • Also check that iterators are not reversed
  • Check subrange bounds are within the bounds of the original buffer

comment:4 Changed 5 years ago by rleigh

  • Status changed from new to accepted

Note that #11827 should permit this once Boost.MultiArray? subsetting methods are added.

comment:5 Changed 5 years ago by rleigh

This is achievable using multi_array (subarray), but since subarray doesn't derive from multi_array_ref, this will require adding it to the PixelBuffer? internal variant, and updating code using direct pixel access (e.g. IFD visitors) to special case transfers so that sparse storage works without corrupting the pixel data.

comment:6 Changed 5 years ago by rleigh

  • Summary changed from Bug: C++ PixelBufferRaw needs a companion proxy pixel buffer to Bug: C++ PixelBuffer needs a companion proxy pixel buffer

This can be done directly inside PixelBuffer? if it can be extended nicely to include support for multi_array_ref, with methods to create a reference from an existing pixel buffer.

comment:7 Changed 5 years ago by rleigh

  • Milestone changed from 5.1.0 to 5.1.2

comment:8 Changed 4 years ago by jamoore

  • Milestone changed from 5.1.4 to B-F-5.1.4

Splitting 5.1.4 due to milestone decoupling

comment:9 Changed 4 years ago by jburel

  • Milestone changed from B-F-5.1.5 to B-F-5.1.6

comment:10 Changed 4 years ago by sbesson

  • Milestone changed from B-F-5.2.0 to Unscheduled
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.79251 sec.)

We're Hiring!