diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-02-06 01:00:43 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-02-06 01:00:43 +0000 |
commit | c6f750d1077663994219dbd69f4fb02631f69b10 (patch) | |
tree | f7d194211923012d2c17f3b7398cb3320f8ae110 /t/op/pack.t | |
parent | cd6d5856d5ee73b0989ba820bc38a8cc253f9190 (diff) | |
download | perl-c6f750d1077663994219dbd69f4fb02631f69b10.tar.gz |
in unpack, () groups in scalar context were still returning a list,
resulting in garbage on the stack, which could manifest as a SEGV
(Bug 50256)
p4raw-id: //depot/perl@33239
Diffstat (limited to 't/op/pack.t')
-rwxr-xr-x | t/op/pack.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/op/pack.t b/t/op/pack.t index 9312646cbb..4b5f9a5bc5 100755 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -12,7 +12,7 @@ my $no_endianness = $] > 5.009 ? '' : my $no_signedness = $] > 5.009 ? '' : "Signed/unsigned pack modifiers not available on this perl"; -plan tests => 14696; +plan tests => 14697; use strict; use warnings qw(FATAL all); @@ -1980,3 +1980,8 @@ is(unpack('c'), 65, "one-arg unpack (change #18751)"); # defaulting to $_ is(unpack('@!4 a*', "\x{301}\x{302}\x{303}\x{304}\x{305}"), "\x{303}\x{304}\x{305}", 'Test basic utf8 @!'); } +{ + #50256 + my ($v) = split //, unpack ('(B)*', 'ab'); + is($v, 0); # Doesn't SEGV :-) +} |