re_intuit_start(): assert substr offsets are >= 0.
authorDavid Mitchell <davem@iabyn.com>
Thu, 16 Jan 2014 16:59:50 +0000 (16:59 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 7 Feb 2014 22:39:36 +0000 (22:39 +0000)
commitfb9bbddb6b02a2d577c2b249a099cbd7156c0be8
tree9d7792530dafc6ef83afe746e043134f759e594c
parent8e9f2289b28bd22cb8af0c73dee7f73d590dca2c
re_intuit_start(): assert substr offsets are >= 0.

Some parts of this function handle the negative offset case, while other
parts don't. Also, nothing in the test suite generates negative offsets.

So for now, assert that all offsets are positive, and strip out any
code that handles negative offsets. This will make my current activity
in fixing and refactoring this function easier. If at some future point
someone wants to add support for negative offsets (e.g. with look-behind)
then they'll have to add support fully to re_intuit_start() from scratch.
regexec.c