This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sprintf-as-multiconcat: fix \x80 issue
authorDavid Mitchell <davem@iabyn.com>
Wed, 1 Nov 2017 17:14:58 +0000 (17:14 +0000)
committerDavid Mitchell <davem@iabyn.com>
Thu, 2 Nov 2017 08:58:27 +0000 (08:58 +0000)
commitb3baa1fe7b5f973daeb2a46cb3afae8624d0f0ab
tree02a8fdae2a485a87bc89e8d07214e8c916753f96
parent78a643379185d2a728ff615b2a20bee0c66f9d4b
sprintf-as-multiconcat: fix \x80 issue

My recent OP_MULTICONCAT merge which (amongst other things) converts
sprintfs with a constant format that only containing %s's into a
multiconcat op, miscounted variant chars (i.e. chars like \x80, which if
upgraded to utf8, expand the number of bytes they require).
This could cause buffer overruns.

Spotted by Karl Williamson++

NPD
op.c
t/op/sprintf2.t