develooper Front page | perl.perl5.porters | Postings from September 2016

[perl #129176] Conditional jump depends on uninitialized values inS_scan_heredoc

Thread Next
From:
Father Chrysostomos via RT
Date:
September 3, 2016 05:31
Subject:
[perl #129176] Conditional jump depends on uninitialized values inS_scan_heredoc
Message ID:
rt-4.0.24-29980-1472880697-1269.129176-15-0@perl.org
On Fri Sep 02 13:38:21 2016, dcollinsn@gmail.com wrote:
> $ perl -e 'print "<<`\\"' | valgrind ../bin/perl
...
> Can't find string terminator "\" anywhere before EOF at - line 1.

Wrong error message.

delimcpy (used to find the end of the `\... after <<) is going one byte past the end of the buffer passed to it, because the trailing null is ‘escaped’ with a backslash.  delimcpy needs fixing.

scan_heredoc perfectly reasonably croaks only if s==PL_bufend, since if s<PL_bufend the terminating ` was found.  In this case s>PL_bufend, which would not happen with a properly functioning delimcpy.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=129176

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About