Boost C++ Libraries: Ticket #7048: Iterator's value is not checked properly in range_run class. https://svn.boost.org/trac10/ticket/7048 <p> In File boost/spirit/home/classic/utility/impl/chset/range_run.ipp </p> <p> <br /> <br /> </p> <pre class="wiki">if (iter != run.end() &amp;&amp; iter-&gt;includes(v)) return true; if (iter != run.begin()) return (--iter)-&gt;includes(v); } return false; </pre><p> <br /> </p> <p> Here <strong>iter = run.end()</strong> condition is not checked.<br />So, attached patch is the fix for it. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7048 Trac 1.4.3 g.gupta@… Fri, 29 Jun 2012 07:02:25 GMT attachment set https://svn.boost.org/trac10/ticket/7048 https://svn.boost.org/trac10/ticket/7048 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">range_run.ipp_patch</span> </li> </ul> <p> Patch file for the reported Bug. </p> Ticket Joel de Guzman Fri, 29 Jun 2012 23:24:48 GMT <link>https://svn.boost.org/trac10/ticket/7048#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7048#comment:1</guid> <description> <p> Do you have a minimal test case exhibiting this edge case problem? I'll need one. I think the logic is just fine as it is. If iter is at the end, it gets decremented before dereferencing it (but only if it's not at begin already). </p> </description> <category>Ticket</category> </item> <item> <author>Nikita Kniazev <nok.raven@…></author> <pubDate>Thu, 21 Dec 2017 19:29:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7048#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7048#comment:2</guid> <description> <p> There is no problem to decrement an end iterator, C++ Standard allows it. So it is preferably valid code and I see no reason to check add a check for end <code>iter != run.end()</code> before decrementing <code>--iter</code>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Sat, 23 Dec 2017 00:40:10 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7048#comment:3 https://svn.boost.org/trac10/ticket/7048#comment:3 <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">invalid</span> </li> </ul> Ticket