This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In Perl_pv_escape(), avoid reading 1 byte beyond the end of the buffer.
authorNicholas Clark <nick@ccl4.org>
Tue, 24 May 2011 20:37:26 +0000 (21:37 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 24 May 2011 20:37:26 +0000 (21:37 +0100)
commitbbae360abd6ec863e8a99ca4ab058873737dbf45
tree2db48f5e97fb63616b948b786cc8690692e4b2b8
parentceb12f1f0217ba8594a71e20be18f84b4356adba
In Perl_pv_escape(), avoid reading 1 byte beyond the end of the buffer.

The check for whether to use 3 digits of octal was not correct, and was capable
of reading the byte beyond the passed in buffer. Except for the small
possibility that that byte was not mapped memory, it wouldn't change the
semantic correctness of the escaped output, but it would lead to
non-deterministic choice of which format to use.
dump.c