This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid undeflow in regex poscache count
authorDavid Mitchell <davem@iabyn.com>
Mon, 3 Jun 2013 10:45:05 +0000 (11:45 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 3 Jun 2013 14:14:17 +0000 (15:14 +0100)
commit338e600ab7ba30b4ff23b08ecd51d91387a08853
tree4234fa2c97dd36651051e51f966651ea4784f797
parent46f1e811d4f7565aa05f3d7151074b8e8bcfa9b2
avoid undeflow in regex poscache count

reginfo->poscache_iter is used to count down to zero; at zero, the
superlinear cache is enabled; and for values below zero the cache is
tested. After I32_MAX iterations the count might wrap to a positive value
on 32-bit systems. So don't do that.
regexec.c