FAQ
In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/81547f2e05510b240d229ed703948ebd9a1a515a?hp=17f41037d4817b6618a903e12aa1377ae078f66a>

- Log -----------------------------------------------------------------
commit 81547f2e05510b240d229ed703948ebd9a1a515a
Author: David Mitchell <davem@iabyn.com>
Date: Tue May 24 23:45:48 2016 +0100

     locale.c: don't use strcpy()

     A recent commit added a strcpy() to locale.c.

     This is Frowned Upon, and was making porting/libperl.t fail.

     Since PL_strxfrm_min_char appears to be a 3-byte buffer, I've just changed
     it to manually copy 3 individual bytes - which is probably more efficient
     than a full-blown Copy(). But I haven't looked closely at whether this is
     correct - this is more of quick fix to get smoking passing again.
-----------------------------------------------------------------------

Summary of changes:
  locale.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/locale.c b/locale.c
index 97cc735..67843d2 100644
--- a/locale.c
+++ b/locale.c
@@ -1525,7 +1525,9 @@ Perl__mem_collxfrm(pTHX_ const char *input_string,
strLT(x + COLLXFRM_HDR_LEN,
                               cur_min_x + COLLXFRM_HDR_LEN))
                  {
- strcpy(PL_strxfrm_min_char, cur_source);
+ PL_strxfrm_min_char[0] = cur_source[0];
+ PL_strxfrm_min_char[1] = cur_source[1];
+ PL_strxfrm_min_char[2] = cur_source[2];
                      cur_min_x = x;
  #ifdef DEBUGGING
                      cur_min_cp = j;

--
Perl5 Master Repository

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-changes @
categoriesperl
postedMay 24, '16 at 11:00p
activeMay 24, '16 at 11:00p
posts1
users1
websiteperl.org

1 user in discussion

Dave Mitchell: 1 post

People

Translate

site design / logo © 2018 Grokbase