Perl_delimcpy(): handle backslash as last char
authorDavid Mitchell <[email protected]>
Thu, 25 Aug 2016 16:48:34 +0000 (17:48 +0100)
committerDavid Mitchell <[email protected]>
Wed, 7 Sep 2016 20:00:16 +0000 (21:00 +0100)
commit19e1655416b3c03817d6123958721515e146fc9f
tree39f2a98d0bbd12a2df23ccae9b2c83e2fb812868
parent080fd4dcd52885dea532a80002eafcd53b541a4b
Perl_delimcpy(): handle backslash as last char

[perl #129064] heap-buffer-overflow S_scan_heredoc
[perl #129176] Conditional jump depends on uninitialized values in
               S_scan_heredoc

Perl_delimcpy() is supposed to copy a delimited string to another buffer;
it handles \-<delimiter> escapes, but if the backslash is the last
character in the src buffer, it could overrun the end of the buffer
slightly.

Also document a bit better what this function is supposed to do.
t/op/heredoc.t
util.c