This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
S_scan_const: Make sure room for NUL in dest
authorKarl Williamson <khw@cpan.org>
Sat, 27 Apr 2019 20:30:02 +0000 (14:30 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 3 May 2019 16:58:50 +0000 (10:58 -0600)
commit2ede6705761661369c948352ae60121492698a7c
tree269a35d2c35314f4bdcb64e3ecf14f7b7e097a59
parent3fdfceb306b900b57c3ce5ad662aea091cfb53a6
S_scan_const: Make sure room for NUL in dest

At the end of a constant, we add a trailing NUL.  This commit makes sure
there's room for it.  But the code earlier was supposed to have already
made enough space, so its a bug if there isn't enough space.  So on
DEBUGGING builds, we panic, as we've done before.  But otherwise we can
continue on with no actual harm having been done.
toke.c