develooper Front page | perl.perl5.porters | Postings from August 2019

[perl #134325] Heap buffer overflow

Thread Previous
From:
Karl Williamson via RT
Date:
August 23, 2019 20:27
Subject:
[perl #134325] Heap buffer overflow
Message ID:
rt-4.0.24-31574-1566592039-1937.134325-15-0@perl.org
On Mon, 12 Aug 2019 05:47:29 -0700, hv wrote:
> On Mon, 12 Aug 2019 05:46:19 -0700, hv wrote:
> > I was unaware of the compounding effect of
> > multiple \Q - I would have expected "\Q\Q+" to result in '\Q\+' rather
> > than '\\\+'
> 
> Er, I would have expected '\\Q\+', I mean.

Using Tony's, case, this is not the same thing as #134329.

But again, it's caused by the same lack of switching to long jumps.  To reduce the number of passes, if we're already having to do a pass because we need to count the parenthetical groups, the code doesn't restart immediately when it decides it needs to use long jumps.  This works, except in a few cases, it can't really keep going.  And this ticket is one of them.

The easiest thing is to restart immediately even when counting parens.  This adds a pass.  The other way would be to restart immediately only in those cases where it might be needed.  I have to examine the code to decide how clear cut that is.  If it isn't, err on the side of safety and always restart immediately.
-- 
Karl Williamson


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

Thread Previous


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