In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/d35c1b5e43e773f353239d9182ddccb41cdab3d6?hp=ec6a838b571a4b5cfee06d966a14af600ae2c278>

- Log -----------------------------------------------------------------
commit d35c1b5e43e773f353239d9182ddccb41cdab3d6
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Jul 31 19:21:02 2016 -0700

    [perl #128740] Check for null in pp_ghostent et al.
    
    Specifically in the S_space_join_names_mortal static function that
    several pp functions call.  On some platforms (such as Gentoo Linux
    with torsocks), hent->h_aliases (where hent is a struct hostent *) may
    be null after a gethostent call.
-----------------------------------------------------------------------

Summary of changes:
 embed.fnc | 2 +-
 pp_sys.c  | 4 +---
 proto.h   | 2 --
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/embed.fnc b/embed.fnc
index c0b7a3e..2021b3e 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -2132,7 +2132,7 @@ s |OP*    |doform         |NN CV *cv|NN GV *gv|NULLOK OP 
*retop
 #  if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
 sR     |int    |dooneliner     |NN const char *cmd|NN const char *filename
 #  endif
-s      |SV *   |space_join_names_mortal|NN char *const *array
+s      |SV *   |space_join_names_mortal|NULLOK char *const *array
 #endif
 p      |OP *   |tied_method|NN SV *methname|NN SV **sp \
                                |NN SV *const sv|NN const MAGIC *const mg \
diff --git a/pp_sys.c b/pp_sys.c
index 3bf2673..d16a0e5 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4934,9 +4934,7 @@ S_space_join_names_mortal(pTHX_ char *const *array)
 {
     SV *target;
 
-    PERL_ARGS_ASSERT_SPACE_JOIN_NAMES_MORTAL;
-
-    if (*array) {
+    if (array && *array) {
        target = newSVpvs_flags("", SVs_TEMP);
        while (1) {
            sv_catpv(target, *array);
diff --git a/proto.h b/proto.h
index a06b6d0..da11ced 100644
--- a/proto.h
+++ b/proto.h
@@ -4859,8 +4859,6 @@ STATIC OP*        S_doform(pTHX_ CV *cv, GV *gv, OP 
*retop);
 #define PERL_ARGS_ASSERT_DOFORM        \
        assert(cv); assert(gv)
 STATIC SV *    S_space_join_names_mortal(pTHX_ char *const *array);
-#define PERL_ARGS_ASSERT_SPACE_JOIN_NAMES_MORTAL       \
-       assert(array)
 #endif
 #if defined(PERL_IN_REGCOMP_C)
 STATIC SV*     S__make_exactf_invlist(pTHX_ RExC_state_t *pRExC_state, regnode 
*node)

--
Perl5 Master Repository

Reply via email to