[Boost-bugs] [Boost C++ Libraries] #9020: kth_channel_view fails when used with virtual views

Subject: [Boost-bugs] [Boost C++ Libraries] #9020: kth_channel_view fails when used with virtual views
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-20 16:50:46


#9020: kth_channel_view fails when used with virtual views
-------------------------------------------------+---------------------
 Reporter: Shaun Marko <smarko@…> | Owner: hljin
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: GIL
  Version: Boost 1.52.0 | Severity: Problem
 Keywords: kth_channel_view virtual_2d_locator |
-------------------------------------------------+---------------------
 Given an image_view with a virtual_2d_locator that returns a
 planar_pixel_reference, kth_channel_view produces a kth_channel_deref_fn
 with an incorrect result_type which may result an invalid pointer
 dereference.

 For example, consider a virtual_2d_locator instantiated with a dereference
 functor that returns a 'planar_pixel_reference<bits8&, rgb_t>'

 An image_view instantiated with such a locator will have a reference type
 of 'planar_pixel_reference<bits8&,rgb_t>'. Now suppose this image_view is
 passed to kth_channel_view(). This results in the instantiation of a
 kth_channel_deref_fn with a result_type of 'pixel<bits8&,
 gray_layout_t>&'; however, the deref functor will initialize this
 result_type with a pixel<bits8,gray_layout_t>&'.

 detail::kth_channel_deref_fn needs to ensure the channel type of its
 result_type is not a reference type.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9020>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC