In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/9bceefdb82ae645c3112967e6c233ed719b425f9?hp=21dce8f4eb9136875a886371016aa25788f5144f>
- Log ----------------------------------------------------------------- commit 9bceefdb82ae645c3112967e6c233ed719b425f9 Author: Tony Cook <t...@develop-help.com> Date: Thu Aug 8 10:09:01 2019 +1000 bump $PerlIO::via::VERSION commit 12e1284a67e5e3404c704c3f864749fd9f04c7c4 Author: Tony Cook <t...@develop-help.com> Date: Wed Aug 7 14:58:14 2019 +1000 PerlIO::Via: check arg is non-NULL before using it. I can't find any code in core that ends up calling the _pushed handler with arg == NULL, but PerlIO_push() is API, and there might be CPAN or DarkPAN code out there that does, escpecially since there's a check for arg being non-NULL further down. CID 169261. commit f7724052d1b8b75339f5ec2cc3d5b35ca5d130b5 Author: Tony Cook <t...@develop-help.com> Date: Wed Aug 7 11:13:53 2019 +1000 Storable: make count large enough AvARRAY() could be very large, and we check for that at line 3807, but int was (potentially) too small to make that comparison meaningful. CID 174681. ----------------------------------------------------------------------- Summary of changes: dist/Storable/Storable.xs | 6 +++--- ext/PerlIO-via/via.pm | 2 +- ext/PerlIO-via/via.xs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs index 6a45d8adf2..d75125b839 100644 --- a/dist/Storable/Storable.xs +++ b/dist/Storable/Storable.xs @@ -3662,7 +3662,7 @@ static int store_hook( SV *ref; AV *av; SV **ary; - int count; /* really len3 + 1 */ + IV count; /* really len3 + 1 */ unsigned char flags; char *pv; int i; @@ -3752,7 +3752,7 @@ static int store_hook( SvREFCNT_dec(ref); /* Reclaim temporary reference */ count = AvFILLp(av) + 1; - TRACEME(("store_hook, array holds %d items", count)); + TRACEME(("store_hook, array holds %" IVdf " items", count)); /* * If they return an empty list, it means they wish to ignore the @@ -3986,7 +3986,7 @@ static int store_hook( */ TRACEME(("SX_HOOK (recursed=%d) flags=0x%x " - "class=%" IVdf " len=%" IVdf " len2=%" IVdf " len3=%d", + "class=%" IVdf " len=%" IVdf " len2=%" IVdf " len3=%" IVdf, recursed, flags, (IV)classnum, (IV)len, (IV)len2, count-1)); /* SX_HOOK <flags> [<extra>] */ diff --git a/ext/PerlIO-via/via.pm b/ext/PerlIO-via/via.pm index 30083feae8..84e54bbd5c 100644 --- a/ext/PerlIO-via/via.pm +++ b/ext/PerlIO-via/via.pm @@ -1,5 +1,5 @@ package PerlIO::via; -our $VERSION = '0.17'; +our $VERSION = '0.18'; require XSLoader; XSLoader::load(); 1; diff --git a/ext/PerlIO-via/via.xs b/ext/PerlIO-via/via.xs index d91c6855fc..8456242bc0 100644 --- a/ext/PerlIO-via/via.xs +++ b/ext/PerlIO-via/via.xs @@ -134,8 +134,8 @@ PerlIOVia_pushed(pTHX_ PerlIO * f, const char *mode, SV * arg, { IV code = PerlIOBase_pushed(aTHX_ f, mode, Nullsv, tab); - if (SvTYPE(arg) >= SVt_PVMG - && mg_findext(arg, PERL_MAGIC_ext, &PerlIOVia_tag)) { + if (arg && SvTYPE(arg) >= SVt_PVMG + && mg_findext(arg, PERL_MAGIC_ext, &PerlIOVia_tag)) { return code; } -- Perl5 Master Repository