diff options
author | Hugo van der Sanden <hv@crypt.org> | 2021-05-22 19:39:11 +0100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-05-31 07:00:12 -0600 |
commit | 8a2e41ffbc376a86586e2b42daa43293299622c5 (patch) | |
tree | 77cd7b5636c434fcbf15c6b291a9bedbf6014c76 /locale.c | |
parent | fef07e7ee7d3a793984bce01ede271a218c02cb6 (diff) | |
download | perl-8a2e41ffbc376a86586e2b42daa43293299622c5.tar.gz |
gh17824: zero curlocales[]
Static analysis tools such as Coverity and clang report that we can
otherwise end up reading uninitialized data, and inspection agrees.
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3388,6 +3388,9 @@ Perl_init_i18nl10n(pTHX_ int printwarn) my_strlcpy(PL_locale_utf8ness, C_and_POSIX_utf8ness, sizeof(PL_locale_utf8ness)); + /* See https://github.com/Perl/perl5/issues/17824 */ + Zero(curlocales, NOMINAL_LC_ALL_INDEX, char *); + # ifdef USE_THREAD_SAFE_LOCALE # ifdef WIN32 |