diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-12-06 21:27:55 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-12-06 21:27:55 +0000 |
commit | 8edd5f42cf54cdbf0218037ce0d38a9e2e2d58d9 (patch) | |
tree | 667f471dd4f2cb40fd0bf4d3a45b6927add1d26e /t/comp/parser.t | |
parent | a33bf49bf7b1088ee6ac580e9e39716ad87ae72a (diff) | |
download | perl-8edd5f42cf54cdbf0218037ce0d38a9e2e2d58d9.tar.gz |
Fix two cases of buffer overflow in the lexer.
p4raw-id: //depot/perl@18251
Diffstat (limited to 't/comp/parser.t')
-rw-r--r-- | t/comp/parser.t | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/t/comp/parser.t b/t/comp/parser.t index ab43e7340e..40ae5f18cf 100644 --- a/t/comp/parser.t +++ b/t/comp/parser.t @@ -9,7 +9,7 @@ BEGIN { } require "./test.pl"; -plan( tests => 10 ); +plan( tests => 12 ); eval '%@x=0;'; like( $@, qr/^Can't modify hash dereference in repeat \(x\)/, '%@x=0' ); @@ -51,3 +51,18 @@ like( $@, qr/error/, 'lexical block discarded by yacc' ); # bug #18573, used to corrupt memory eval q{ "\c" }; like( $@, qr/^Missing control char name in \\c/, q("\c" string) ); + +# two tests for memory corruption problems in the said variables +# (used to dump core or produce strange results) + +is( "\Q\Q\Q\Q\Q\Q\Q\Q\Q\Q\Q\Q\Qa", "a", "PL_lex_casestack" ); + +eval { +{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ +{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ +{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} +}; +is( $@, '', 'PL_lex_brackstack' ); |