libc - Disallow an excessively large pattern space
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 7 Feb 2015 06:16:40 +0000 (22:16 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 7 Feb 2015 06:16:40 +0000 (22:16 -0800)
commit2841837793bd095a82f477e9c370cfe6cfb3862c
treea21d6471d999104da3e4e8d901a1745a53bef7fa
parent4d133046c59a851141519d03553a70e903b3eefc
libc - Disallow an excessively large pattern space

* Disallow pattern spaces which would cause intermediate calculations
  to overflow size_t.

* Since the pattern length must be in the hundreds of megabytes to trigger
  the issue on a 32-bit machine (and something insane on a 64-bit machine),
  it is unlikely that any software is at risk.  But still a good idea to
  deal with the case.

CERT: VU#695940
lib/libc/regex/regcomp.c