<div class="markdown_content"><p>Analysis of the problem:<br/>
<em> CQP parser accepts any integer numbers in repetition counts, without checking their validity<br/>
</em> to make matters worse, the code -1 is used internally for infinite repetition, i.e. * is equivalent to the range (0, -1) and + to the range (1, -1)</p>
<p>Solution: modify parser to abort with syntax errors if repetition count isn't valid.</p>
<hr/>
<p><strong> <a class="alink" href="https://sourceforge.net/p/cwb/bugs/64/">[bugs:#64]</a> CQP accepts negative repetition counts</strong></p>
<p><strong>Status:</strong> open<br/>
<strong>Group:</strong> TODO-3.5<br/>
<strong>Created:</strong> Sat Aug 19, 2017 10:04 AM UTC by Stefan Evert<br/>
<strong>Last Updated:</strong> Sat Aug 19, 2017 10:04 AM UTC<br/>
<strong>Owner:</strong> Stefan Evert</p>
<p>CQP accepts negative repetition counts such as (...){-1}, as well as invalid repetition ranges such as (...){3,0} and (...){2,1}.  All these examples lead to unexpected behaviour, segmentations faults or out of memory conditions.</p>
<hr/>
<p>Sent from sourceforge.net because cwb@sslmit.unibo.it is subscribed to <a href="https://sourceforge.net/p/cwb/bugs/">https://sourceforge.net/p/cwb/bugs/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="https://sourceforge.net/p/cwb/admin/bugs/options.">https://sourceforge.net/p/cwb/admin/bugs/options.</a>  Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>