This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
S_do_op_dump_bar(): don't print TRANS op_pv field
authorDavid Mitchell <davem@iabyn.com>
Mon, 27 Feb 2017 13:15:31 +0000 (13:15 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 27 Feb 2017 13:15:31 +0000 (13:15 +0000)
commitf49e84642c2886177a0ec4ddff2ef186df4c6441
tree0c3ba845a0dbe8b0dd7647da54260770cc949106
parent41b1e858a075694f88057b9514f5fc78c80b5355
S_do_op_dump_bar(): don't print TRANS op_pv field

My recent commit v5.25.9-32-gabd07ec made dump.c display the op_pv
string of OP_NEXT, OP_TRANS etc ops. However, for OP_TRANS/OP_TRANSR,
the string is basically a 256-byte potentially non null-temrinated array.
This was causing a buffer read overrun and garbage to be displayed.

The simple solution is to only display the address but not contents
for a trans op. OP_NEXT ec labels continue to be displayed.
dump.c