summaryrefslogtreecommitdiff
path: root/pp_pack.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-02-06 01:00:43 +0000
committerNicholas Clark <nick@ccl4.org>2008-02-06 01:00:43 +0000
commitc6f750d1077663994219dbd69f4fb02631f69b10 (patch)
treef7d194211923012d2c17f3b7398cb3320f8ae110 /pp_pack.c
parentcd6d5856d5ee73b0989ba820bc38a8cc253f9190 (diff)
downloadperl-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 'pp_pack.c')
-rw-r--r--pp_pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pp_pack.c b/pp_pack.c
index 7bf1ce1746..98d4869f9c 100644
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -1258,6 +1258,7 @@ S_unpack_rec(pTHX_ tempsym_t* symptr, const char *s, const char *strbeg, const c
symptr->previous = &savsym;
symptr->level++;
PUTBACK;
+ if (len && unpack_only_one) len = 1;
while (len--) {
symptr->patptr = savsym.grpbeg;
if (utf8) symptr->flags |= FLAG_PARSE_UTF8;