[perl #78040] regcomp.c: malloc enough space
Commit
9de15fec376a8ff90a38fad0ff322c72c2995765 introduced /u, /d, and
/l regex modifiers. Unfortunately, I forgot to adequately account for
them in the space required for the stringification of the regex.
This patch figures out separately if the caret is needed, and if one of
these charset modifiers is needed, and allocates space accordingly.
I could not figure out a simple test case for this fix. valgrind
prior to this will show errors, and after this doesn't.