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

[perl #134325] Heap buffer overflow

Thread Previous
Karl Williamson via RT
August 23, 2019 20:27
[perl #134325] Heap buffer overflow
Message ID:
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

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About