Introducing regcomp_safe(), where it will check for patterns that can cause infinite loops. Also, added prevention in case stylebuf is NULL.