In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/ecdda93980cc109c179a7cdcc139922d59ba78a5?hp=30457add2d1f514977190c5b66b67eae3b64bcc6>
- Log ----------------------------------------------------------------- commit ecdda93980cc109c179a7cdcc139922d59ba78a5 Author: Karl Williamson <k...@cpan.org> Date: Mon Feb 19 21:15:21 2018 -0700 locale.c: Add STATIC_ASSERT I tried this in a smoke earlier, and got one failure, and to keep on going, removed it temporarily. But many other changes later, I tried again in a smoke, and it isn't failing. A legitimate failure of this assertion would mean reading/writing past a buffer end. ----------------------------------------------------------------------- Summary of changes: locale.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/locale.c b/locale.c index 9f5f8426f2..b22efac5e9 100644 --- a/locale.c +++ b/locale.c @@ -582,6 +582,10 @@ S_emulate_setlocale(const int category, return (char *) querylocale(mask, cur_obj); # else + + /* If this assert fails, adjust the size of curlocales in intrpvar.h */ + STATIC_ASSERT_STMT(C_ARRAY_LENGTH(PL_curlocales) > LC_ALL_INDEX); + # if defined(_NL_LOCALE_NAME) && defined(DEBUGGING) { -- Perl5 Master Repository