Sat Sep 13 09:38:49 2008: Request 39233 was acted upon.
Transaction: Correspondence added by [EMAIL PROTECTED]
Queue: PAR
Subject: Re: [rt.cpan.org #39233] Suspected buffer overflow while running
executable made by Par::Packer
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: [EMAIL PROTECTED]
Status: open
Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=39233 >
Hi again,
Clarke, Dave S via RT wrote:
> Fri Sep 12 16:31:35 2008: Request 39233 was acted upon.
> Transaction: Ticket created by [EMAIL PROTECTED]
> Queue: PAR
> Subject: Suspected buffer overflow while running executable made by
> Par::Packer
[...]
> $_ =
> q[TEXT="some_very_large_text_to_be_extracted_between_double_quotes"];
> my $rQStr = qr/"((?:""|[^"])*)"/;
> # String between double quotes (")
> my $key = 'TEXT';
> if (m/${key}=${rQStr}/) {
> $_ = $1;
It's likely that this isn't a PAR::Packer issue after all. That regex
was triggering some alarms when I first saw it, but I wasn't entirely
sure at the time. Since then, I talked to somebody who knows Perl
regexes inside out and he simply called it a "diabolical pattern". It'll
use one stack frame per input character. The details aren't clear to me,
but it's pretty obvious that by replacing the regex with a less evil
one, you'll fix the code.
The quick suggestion was:
my $rQStr = qr/"((?>(""|[^"]+)*))"/;
He wasn't entirely sure it'd be right because it was way past end of
work time for both of us.
Best regards,
Steffen