This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_sv_vcatpvfn_flags: avoid wrap on precision
authorDavid Mitchell <davem@iabyn.com>
Tue, 30 May 2017 14:55:29 +0000 (15:55 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 7 Jun 2017 08:11:07 +0000 (09:11 +0100)
commit1cf776efbdf4c0ec9c63db594557fb05e588123e
treeaccb9f27cb18b3f3327484c2dd721d71f6973ba2
parent8a015f6ec969acd841529dbca037e9fc0e3046a4
Perl_sv_vcatpvfn_flags: avoid wrap on precision

Where the precision is specified literally in the format string,
the integer precision value could wrap. Instead, make it croak with

    Integer overflow in format string

As in other recent commits, the upper limit is set at 1/4 of STRLEN.
sv.c
t/op/sprintf.t
t/op/sprintf2.t