From: Karl Williamson Date: Sun, 6 May 2012 15:12:19 +0000 (-0600) Subject: utf8.c: Add assertion X-Git-Tag: v5.17.0~75 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/50ba90ffe5821effdba066df4bc3986dee904e0c?ds=sidebyside utf8.c: Add assertion --- diff --git a/utf8.c b/utf8.c index dfebf72..29b30cf 100644 --- a/utf8.c +++ b/utf8.c @@ -2707,6 +2707,8 @@ Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags, b PERL_ARGS_ASSERT__TO_UTF8_FOLD_FLAGS; + assert(p != ustrp); /* Otherwise overwrites */ + if (UTF8_IS_INVARIANT(*p)) { if (flags & FOLD_FLAGS_LOCALE) { result = toLOWER_LC(*p);