regex: -G<pattern> feeds a non NUL-terminated string to regexec() and fails