develooper Front page | perl.perl5.porters | Postings from October 2005

[perl #37384] Buffer overflow on erroneous regexp match syntax

Thread Next
Dan Dascalescu
October 8, 2005 02:36
[perl #37384] Buffer overflow on erroneous regexp match syntax
Message ID:
# New Ticket Created by  Dan Dascalescu 
# Please include the string:  [perl #37384]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from danvdascalescu,
generated with the help of perlbug 1.35 running under perl v5.8.7.

[Please enter your report here]

It seems perl suffers from a buffer overflow when it encounters a
binding operator with the right-hand side argument not being a proper

For example:
perl -we "$a=qr//; $b=qr//x; 1 =~ ($a|$b)"

For a more spectacular error, try

#! perl -w
use strict;

my $Yahoo_Mail_RE = qr'
  | YMail:STRINGS:intlYMailStrings.dict

my $Yahoo_ABCalNp_RE = qr'
  | AddrBook2K2:S:i

print 1 !~ ($Yahoo_Mail_RE|$Yahoo_ABCalNp_RE);

I have not included the site configuration information because 'lzh'
on #perl kindly tested this on 5.4.5 to 5.9.2 and reproduced the issue
on all version. I have attached that log.

Dan Dascalescu

[Please do not change anything below this line]

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