In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/5b05192fea0c4ca81a055932c9efddaa78e85484?hp=aef6dd01c82b1066ab5442eedbf3627480dc984f>

- Log -----------------------------------------------------------------
commit 5b05192fea0c4ca81a055932c9efddaa78e85484
Author: Chris 'BinGOs' Williams <[email protected]>
Date:   Fri Jan 18 16:54:50 2013 +0000

    Update Socket to CPAN version 2.009
    
      [DELTA]
    
      2013/01/18
      2.009   CHANGES:
             * Fix building in core by skipping check_for() as it doesn't work
               there (RT82760)
    
      2012/12/27
      2.008   CHANGES:
             * Fix uninitialised memory read (RT82119)
    
      2012/12/16
      2.007   CHANGES:
             * Test %Config keys for definedness, not mere existence (RT79854)
             * Fix missing argument in sprintf in Socket.xs (from perl.git
               5d6dfea82e1c4b6, RT82007)
-----------------------------------------------------------------------

Summary of changes:
 Porting/Maintainers.pl  |    2 +-
 cpan/Socket/Makefile.PL |    3 ++-
 cpan/Socket/Socket.pm   |    2 +-
 cpan/Socket/Socket.xs   |   16 ++++++++++------
 4 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index d41711b..72875ef 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1637,7 +1637,7 @@ use File::Glob qw(:case);
 
     'Socket' => {
         'MAINTAINER'   => 'pevans',
-        'DISTRIBUTION' => 'PEVANS/Socket-2.006.tar.gz',
+        'DISTRIBUTION' => 'PEVANS/Socket-2.009.tar.gz',
         'FILES'        => q[cpan/Socket],
         'UPSTREAM'     => 'cpan',
     },
diff --git a/cpan/Socket/Makefile.PL b/cpan/Socket/Makefile.PL
index 639a57c..117d778 100644
--- a/cpan/Socket/Makefile.PL
+++ b/cpan/Socket/Makefile.PL
@@ -13,7 +13,8 @@ my $seq = 0;
 sub check_for
 {
     my %args = @_;
-    return if exists $Config{$args{confkey}};
+    return if $ENV{PERL_CORE};
+    return if defined $Config{$args{confkey}};
 
     require ExtUtils::CBuilder;
     $cb ||= ExtUtils::CBuilder->new( quiet => 1 );
diff --git a/cpan/Socket/Socket.pm b/cpan/Socket/Socket.pm
index a3a38d9..270e4ed 100644
--- a/cpan/Socket/Socket.pm
+++ b/cpan/Socket/Socket.pm
@@ -3,7 +3,7 @@ package Socket;
 use strict;
 { use 5.006001; }
 
-our $VERSION = '2.006_001';
+our $VERSION = '2.009';
 
 =head1 NAME
 
diff --git a/cpan/Socket/Socket.xs b/cpan/Socket/Socket.xs
index 4bfaada..0690435 100644
--- a/cpan/Socket/Socket.xs
+++ b/cpan/Socket/Socket.xs
@@ -895,7 +895,7 @@ inet_ntop(af, ip_address_sv)
        SV *    ip_address_sv
        CODE:
 #ifdef HAS_INETNTOP
-       STRLEN addrlen, struct_size;
+       STRLEN addrlen;
 #ifdef AF_INET6
        struct in6_addr addr;
        char str[INET6_ADDRSTRLEN];
@@ -910,19 +910,17 @@ inet_ntop(af, ip_address_sv)
 
        ip_address = SvPV(ip_address_sv, addrlen);
 
-       struct_size = sizeof(addr);
-
        switch(af) {
          case AF_INET:
            if(addrlen != 4)
                croak("Bad address length for Socket::inet_ntop on AF_INET;"
-                     " got %d, should be 4", addrlen);
+                     " got %"UVuf", should be 4", (UV)addrlen);
            break;
 #ifdef AF_INET6
          case AF_INET6:
            if(addrlen != 16)
                croak("Bad address length for Socket::inet_ntop on AF_INET6;"
-                     " got %d, should be 16", addrlen);
+                     " got %"UVuf", should be 16", (UV)addrlen);
            break;
 #endif
          default:
@@ -935,7 +933,13 @@ inet_ntop(af, ip_address_sv)
                      "Socket::inet_ntop", af);
        }
 
-       Copy(ip_address, &addr, sizeof addr, char);
+       if(addrlen < sizeof(addr)) {
+           Copy(ip_address, &addr, addrlen, char);
+           Zero(((char*)&addr) + addrlen, sizeof(addr) - addrlen, char);
+       }
+       else {
+           Copy(ip_address, &addr, sizeof addr, char);
+       }
        inet_ntop(af, &addr, str, sizeof str);
 
        ST(0) = sv_2mortal(newSVpvn(str, strlen(str)));

--
Perl5 Master Repository

Reply via email to