Fix buffer size determination.
Fixes #8082.

svn path=/trunk/libs/regex/; revision=83967