This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Fix '%s' directive argument is null
authorKarl Williamson <khw@cpan.org>
Thu, 23 May 2019 16:48:30 +0000 (10:48 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 24 May 2019 23:09:30 +0000 (17:09 -0600)
This was just an oversight.  THe code doesn't get executed unless it's
trying to panic

locale.c

index 9fad0cb..bbf9093 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -5085,6 +5085,7 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
             s++;
             e = strchr(s, UTF8NESS_PREFIX[0]);
             if (! e) {
+                e = PL_locale_utf8ness + strlen(PL_locale_utf8ness);
                 Perl_croak(aTHX_
                            "panic: %s: %d: Corrupt utf8ness_cache: missing"
                            " separator %.*s<-- HERE %s\n",