Avoid undefined behavior with huge regexp interval counts.
commit4618713ae48aac51c6f1a2474cc981f32c2bbede
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 12 Dec 2013 19:23:25 +0000 (12 11:23 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 12 Dec 2013 19:23:25 +0000 (12 11:23 -0800)
tree11ede5202ee196ab2fb658a6c5a4bcffc4dc413b
parent01633a17e74e638f31ec71c3587481f0084574f2
Avoid undefined behavior with huge regexp interval counts.

* regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
since it's now specialized to interval counts. All uses changed.
Do not assume wrapraound on signed integer overflow.
(regex_compile): Simplify based on the above changes.
src/ChangeLog
src/regex.c