Boost C++ Libraries: Ticket #9020: kth_channel_view fails when used with virtual views https://svn.boost.org/trac10/ticket/9020 <p> 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. </p> <p> For example, consider a virtual_2d_locator instantiated with a dereference functor that returns a 'planar_pixel_reference&lt;bits8&amp;, rgb_t&gt;' </p> <p> An image_view instantiated with such a locator will have a reference type of 'planar_pixel_reference&lt;bits8&amp;,rgb_t&gt;'. 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&lt;bits8&amp;, gray_layout_t&gt;&amp;'; however, the deref functor will initialize this result_type with a pixel&lt;bits8,gray_layout_t&gt;&amp;'. </p> <p> detail::kth_channel_deref_fn needs to ensure the channel type of its result_type is not a reference type. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9020 Trac 1.4.3 Shaun Marko <smarko@…> Tue, 20 Aug 2013 16:52:45 GMT attachment set https://svn.boost.org/trac10/ticket/9020 https://svn.boost.org/trac10/ticket/9020 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">image_view_factory.hpp.patch</span> </li> </ul> <p> patch to kth_channel_deref_fn in image_view_factory.hpp </p> Ticket Shaun Marko <smarko@…> Tue, 20 Aug 2013 16:53:30 GMT attachment set https://svn.boost.org/trac10/ticket/9020 https://svn.boost.org/trac10/ticket/9020 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">kth.cpp</span> </li> </ul> <p> Example program illustrating the issue. </p> Ticket Shaun Marko <smarko@…> Fri, 23 Aug 2013 17:33:31 GMT <link>https://svn.boost.org/trac10/ticket/9020#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9020#comment:1</guid> <description> <p> Please retract this bug report. The proposed fix makes the kth_channel_view read-only for virtual views with reference types of planar_pixel_reference. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Mateusz Loskot</dc:creator> <pubDate>Thu, 16 Feb 2017 10:52:21 GMT</pubDate> <title>cc set https://svn.boost.org/trac10/ticket/9020#comment:2 https://svn.boost.org/trac10/ticket/9020#comment:2 <ul> <li><strong>cc</strong> <span class="trac-author">mateusz@…</span> added </li> </ul> Ticket Stefan Seefeld Sat, 01 Jul 2017 21:15:54 GMT owner changed https://svn.boost.org/trac10/ticket/9020#comment:3 https://svn.boost.org/trac10/ticket/9020#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Hailin Jin</span> to <span class="trac-author">Stefan Seefeld</span> </li> </ul> Ticket Mateusz Loskot Mon, 08 Oct 2018 09:58:36 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9020#comment:4 https://svn.boost.org/trac10/ticket/9020#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Moved to <a class="ext-link" href="https://github.com/boostorg/gil/issues/151"><span class="icon">​</span>https://github.com/boostorg/gil/issues/151</a> </p> Ticket