This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Check for invlist_search() returning negative array indices.
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 3 Feb 2016 21:33:20 +0000 (16:33 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 7 Feb 2016 13:23:46 +0000 (08:23 -0500)
commit8bde5eaff72a564896ec5826551f06f4003f6485
tree555663f80ad3eb0d93de591e3a70ac2b8e3bdbb5
parent1d41bb72a83da5edae35c341de2a89563c136fe7
Check for invlist_search() returning negative array indices.

Coverity CID 135014: Negative array index read (NEGATIVE_RETURNS)
Coverity CID 135015: Negative array index read (NEGATIVE_RETURNS)

Multiple cases, all the getLB_...() uses in regexec.c.

Address this by under DEBUGGING rerouting the invlist_search()
result through a static helper function which does the sanity
checking against negatives and then returns the result.
regexec.c